[petsc-dev] [pflotran-dev: 976] Re: [pflotran-users: 998] Distorted structured grid

Jed Brown jedbrown at mcs.anl.gov
Fri Nov 15 12:34:19 CST 2013


Paolo Orsini <paolo.orsini at gmail.com> writes:

> Hi Jed,
>
> I am back to work on this now...
>
> Thanks for explaining how I can do this. it makes perfectly sense:
>
> A. Assign entries values = 1, when forming the Adj matrix,
>
> B. Convert the Adj matrix to AIJ matrix, so I can use MatMatTransposeMult
> (or form AIJ directly): can I preallocate AIJ before calling MatConvert? To
> avoid slow performance? Is there any conflict between the preallocoation
> functions and MatConvert?

MatConvert() should be fast.

> C. Filter AIJ, to remove entries with values <3 (for 3d problems). What
> function shall I use to do this operation?

Don't try to do it in-place.  Do you want the result in a matrix or in
another data structure?  Anyway, I would just walk along calling
MatGetRow() and picking out the column indices that have values of at
least 3.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131115/990dff78/attachment.sig>


More information about the petsc-dev mailing list