[petsc-users] MATNEST with shell matrices

Jed Brown jedbrown at mcs.anl.gov
Thu Feb 21 17:55:40 CST 2013


On Thu, Feb 21, 2013 at 5:46 PM, Boyce Griffith <griffith at cims.nyu.edu>wrote:

> There are no index sets available for the SAMRAI vector data.  The
> interface only provides access to "capital-V Vector Space" operations
> (vector addition, scalar multiplication, dot product, etc.).
>
> We've discussed this briefly before on some list --- petsc-dev? --- with
> Bobby Philip, but the basic story is that SAMRAI does patch-based AMR and
> separately allocates data for each patch as simple FORTRAN-style arrays
> (e.g. ghost cells are "co-mingled" with patch DOFs).  This makes it
> cumbersome to generate a Vec representation that plays nice with PETSc.
>

Surely there is a way to distinguish ghost cells from non-ghost cells. Then
you define a contiguous ordering/index set by simply marching through the
non-ghost cells labeling them sequentially.


> I am working on some code to make it feasible to map SAMRAI data onto a
> native PETSc Vec and to generate unique indices for the different data
> centerings provided by SAMRAI that we use regularly, but at least for now
> Amneet isn't trying to use that stuff.  (And by "working on", here I really
> mean thinking about working on while I am instead writing grant
> applications. ;-)
>
> It also seems almost feasible to use one of the existing DMs to wrap the
> SAMRAI data.  I haven't thought about this in a while and don't remember
> what I thought sounded like it was feasible.
>
>
>  But if you really want to use those other vector space wrappers, you can
>> use VecNest.
>>
>
> Great --- this is what I had hoped and what Amneet was trying to figure
> out.
>

If you really don't want to have an IS, you can use VecNestGetSubVec(),
just be warned that this makes your code more brittle and harder to
interoperate with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130221/124b434a/attachment.html>


More information about the petsc-users mailing list