[petsc-dev] Integrating PFLOTRAN, PETSC & SAMRAI

Boyce Griffith griffith at cims.nyu.edu
Mon Jun 6 15:49:33 CDT 2011



On 6/6/11 4:33 PM, Jed Brown wrote:
> On Mon, Jun 6, 2011 at 22:26, Boyce Griffith <griffith at cims.nyu.edu
> <mailto:griffith at cims.nyu.edu>> wrote:
>
>     I'm sure you already know this --- but just to be clear --- Bobby
>     and I are managing different SAMRAI-PETSc wrapper codes, which are
>     in turn used in different application codes.
>
>
> And both of these are different from the "upstream" wrappers?

I'm not sure what you mean by "upstream" here...

> This was not clear to me. Are they sufficiently similar that they can
> reasonably be merged? Or are they really special-purpose for one
> application?

Probably.

SAMRAI has a class for bundling up data defined on an AMR grid hierarchy 
into a vector-like data structure that provides standard vector space 
objects.  The wrapper code that Bobby and I have basically consists of a 
bunch of C functions that call the appropriate methods on the SAMRAI 
objects --- mapping VecAXPY to SAMRAIVectorReal::axpy(), for instance. 
I stash a pointer to the SAMRAI vector object in the PETSc Vec as vec->data.

At least when this stuff was first written, the only way to interface 
the SAMRAI vector class with PETSc was to make a new "subclass" of Vec. 
  Perhaps there is a better way to do this in 3.1 or petsc-dev?

-- Boyce



More information about the petsc-dev mailing list