[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PETSc jacobian
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: PETSc jacobian
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Tue, 6 Mar 2007 16:04:51 -0600
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Gt93PJdOD6SgbkjmCiQ7Rc29qDJ4WpMreF5ITl8mwQQt8eZSBTdOL5p/TByzykAFKt2jnNPyTGrEEKe/0AhYtDZ8f+27kEaEDcvK0cIGdDgLpJfHP2YnpT+nGzpKMcUkijbhnwCJh+SnxYTftRwcPLp+iktsYAF+6OSoiyb6CCs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fmIAF46Q7qrQj0kUYIhUyAAwW1RJhZwU+cDtALcyMa6Jim+P5AeYD4uvF/r4i3JgdzlYS5kfo8eGCWsU8suSaFwJp5cJEMTCW1Ytvxq7+ec9dycdliADfdRvLtPx7OPV692Ih+88QFwe2+zSCaim4iY16zcEeLwulVXlvB87ekc=
- In-reply-to: <63516a2e0703061204j68768e0eyda6ddb876ad49a26@mail.gmail.com>
- References: <63516a2e0703061204j68768e0eyda6ddb876ad49a26@mail.gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
On 3/6/07, Jianing Shi <jianings@xxxxxxxxx> wrote:
Hi PETSc designers,
I have a non-trivial extension to a diffusion problem, that involves
talking between neighboring (neighboring band) points. I have a
question about the data structures in PETSc, since I am fantasized
about elegant designs.
I have two options: 1) use structured grid (DA) 2) in some
applications, my grid can be unstructured, in fact a directed graph.
I am considering the first option now (since I still need to read up
onto the PETSc mesh/graph).
Suppose I need to represent the connectivity of a point to its
neighboring points, I need a weight matrix. I guess I can
(A) use a DA structure, setting DOF = total number of points connected
to a point (assuming the connectivity range for each point is the
same).
or
(B) use a Jacobian matrix data structure to store these weights. In
this case, I guess I will use MATMPIAIJ or MATMPIBAIJ.
- What is the difference between these two types of Jacobian matrix?
One has a fixed Cartesian topology (connectivity). The other can have
an arbitrary connectivity.
- For distributed sparse matrix like MATMPIAIJ, MATMPIBAIJ, how
efficient is it to extract one column of the matrix M(i,:) ? Does
PETSc have routines to do this?
It is there, but it is not efficient. Row extraction is efficient.
- How is such a distributed sparse matrix stored on different
processors, how is it divided up, and collected?
Row-wise. There is a picture in the manual.
I want to understand this, because if a distributed sparse matrix is
an efficient representation of my sparse weight matrix, I will go for
this option (B). Otherwise, I will opt for option (A).
I think you are confusing two issues. The DA is not an operator or a matrix.
it is a topology or connectivity. It can create an AIJ matrix with that
connectivity automatically.
Matt
Thanks!
Jianing
--
One trouble is that despite this system, anyone who reads journals widely
and critically is forced to realize that there are scarcely any bars to eventual
publication. There seems to be no study too fragmented, no hypothesis too
trivial, no literature citation too biased or too egotistical, no design too
warped, no methodology too bungled, no presentation of results too
inaccurate, too obscure, and too contradictory, no analysis too self-serving,
no argument too circular, no conclusions too trifling or too unjustified, and
no grammar and syntax too offensive for a paper to end up in print. --
Drummond Rennie