[petsc-dev] Integrating PFLOTRAN, PETSC & SAMRAI

Jed Brown jed at 59A2.org
Tue Jun 7 13:40:06 CDT 2011


On Tue, Jun 7, 2011 at 20:24, Philip, Bobby <philipb at ornl.gov> wrote:

> The overhead of constructing a native PETSc vector across all refinement
> levels would involve writing a global ordering
> scheme that numbers nodes/cells/edges etc (depending on the data centering)
> and then doing maps back and forth. For my larger simulations
> the cost for this would be too high because this would not be a one time
> cost.
>

Did you profile this? The cost seems very dependent on the implementation.
The fundamental part is basically a copy from contiguous to discontiguous
data. That memcpy for each patch might not be very expensive compared to
e.g. the traversal.

Is this whole hierarchy manipulated directly by the user, or is there an
iterator for patches? Could an iterator be made to extract the patch with
ghosts from a contiguous PETSc vector?


> I would have to do this each time PETSc KSP made a call to
> one of my multilevel preconditioners such as FAC.
>

It seems to me that setup should only need to happen when the mesh adapts.
Are you adapting the mesh inside of a KSPSolve? (I think that would be
strange.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110607/724b5c4b/attachment.html>


More information about the petsc-dev mailing list