#include <source/hierarchy/variables/PatchDataFactory.h>
Inheritance diagram for SAMRAI::hier::PatchDataFactory< DIM >:
Public Member Functions | |
PatchDataFactory (const IntVector< DIM > &ghosts) | |
virtual | ~PatchDataFactory () |
Virtual destructor for the patch data factory class. | |
virtual tbox::Pointer< PatchDataFactory< DIM > > | cloneFactory (const IntVector< DIM > &ghosts)=0 |
Abstract virtual function to clone a patch data factory. | |
virtual tbox::Pointer< PatchData< DIM > > | allocate (const Box< DIM > &box, tbox::Pointer< tbox::Arena > pool=(tbox::Arena *) NULL) const =0 |
Abstract virtual function to allocate a concrete patch data object. | |
virtual tbox::Pointer< PatchData< DIM > > | allocate (const Patch< DIM > &patch, tbox::Pointer< tbox::Arena > pool=(tbox::Arena *) NULL) const =0 |
Abstract virtual function to allocate a concrete patch data object. | |
virtual tbox::Pointer< BoxGeometry< DIM > > | getBoxGeometry (const Box< DIM > &box) const =0 |
Abstract virtual function to allocate a concrete box geometry object. | |
const IntVector< DIM > & | getGhostCellWidth () const |
Get the ghost cell width. | |
virtual size_t | getSizeOfMemory (const Box< DIM > &box) const =0 |
Abstract virtual function to compute the amount of memory needed to allocate for object data and to represent the object itself. | |
virtual bool | fineBoundaryRepresentsVariable () const=0 |
Return true if the fine data values represent the data quantity on coarse-fine interfaces if data lives on patch borders; false otherwise. | |
virtual bool | dataLivesOnPatchBorder () const=0 |
Return true if the variable data lives on patch borders; false otherwise. | |
virtual bool | validCopyTo (const tbox::Pointer< PatchDataFactory< DIM > > &dst_pdf) const =0 |
Abstract virtual function that returns whether the current PatchDataFactory can be copied to the supplied destination PatchDataFactory. | |
virtual MultiblockDataTranslator< DIM > * | getMultiblockDataTranslator () |
Protected Attributes | |
IntVector< DIM > | d_ghosts |
SAMRAI::hier::PatchDataFactory< DIM >::PatchDataFactory | ( | const IntVector< DIM > & | ghosts | ) | [inline] |
The default constructor for the patch data factory class.
ghosts | ghost cell width for concrete classes created from the factory. |
SAMRAI::hier::PatchDataFactory< DIM >::~PatchDataFactory | ( | ) | [virtual] |
Virtual destructor for the patch data factory class.
virtual tbox::Pointer< PatchDataFactory<DIM> > SAMRAI::hier::PatchDataFactory< DIM >::cloneFactory | ( | const IntVector< DIM > & | ghosts | ) | [pure virtual] |
Abstract virtual function to clone a patch data factory.
This will return a new instantiation of the abstract factory with the same properties. The properties of the cloned factory can then be changed without modifying the original.
ghosts | ghost cell width for concrete classes created from the factory. |
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual tbox::Pointer< PatchData<DIM> > SAMRAI::hier::PatchDataFactory< DIM >::allocate | ( | const Box< DIM > & | box, | |
tbox::Pointer< tbox::Arena > | pool = (tbox::Arena *) NULL | |||
) | const [pure virtual] |
Abstract virtual function to allocate a concrete patch data object.
The default information about the object (e.g., ghost cell width) is taken from the factory. If no memory pool is provided, then the allocation routine assumes some default memory pool.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual tbox::Pointer< PatchData<DIM> > SAMRAI::hier::PatchDataFactory< DIM >::allocate | ( | const Patch< DIM > & | patch, | |
tbox::Pointer< tbox::Arena > | pool = (tbox::Arena *) NULL | |||
) | const [pure virtual] |
Abstract virtual function to allocate a concrete patch data object.
Same as the previous the other allocate function, but passes in a patch instead of a box.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual tbox::Pointer< BoxGeometry<DIM> > SAMRAI::hier::PatchDataFactory< DIM >::getBoxGeometry | ( | const Box< DIM > & | box | ) | const [pure virtual] |
Abstract virtual function to allocate a concrete box geometry object.
The box geometry object will be used in the calculation of box intersections for the computation of data dependencies.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
const hier::IntVector< DIM > & SAMRAI::hier::PatchDataFactory< DIM >::getGhostCellWidth | ( | ) | const |
Get the ghost cell width.
This is the ghost cell width that will be used in the instantiation of concrete patch data instances. The ghost width is specified in the clone method.
virtual size_t SAMRAI::hier::PatchDataFactory< DIM >::getSizeOfMemory | ( | const Box< DIM > & | box | ) | const [pure virtual] |
Abstract virtual function to compute the amount of memory needed to allocate for object data and to represent the object itself.
This includes any dynamic storage, such as arrays, needed by the concrete patch data instance. Although the patch data subclass may choose not to allocate memory from the provided memory pool, it must not use more memory than requested here.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual bool SAMRAI::hier::PatchDataFactory< DIM >::fineBoundaryRepresentsVariable | ( | ) | const [pure virtual] |
Return true if the fine data values represent the data quantity on coarse-fine interfaces if data lives on patch borders; false otherwise.
The boolean return value is supplied by the concrete patch data factory subclass.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual bool SAMRAI::hier::PatchDataFactory< DIM >::dataLivesOnPatchBorder | ( | ) | const [pure virtual] |
Return true if the variable data lives on patch borders; false otherwise.
The boolean return value is supplied by the concrete patch data factory subclass.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
virtual bool SAMRAI::hier::PatchDataFactory< DIM >::validCopyTo | ( | const tbox::Pointer< PatchDataFactory< DIM > > & | dst_pdf | ) | const [pure virtual] |
Abstract virtual function that returns whether the current PatchDataFactory can be copied to the supplied destination PatchDataFactory.
Mechanisms to check for valid types are implemented in the patch data factory subclasses for particular datatypes.
Implemented in SAMRAI::pdat::CellDataFactory< DIM, TYPE >, SAMRAI::pdat::EdgeDataFactory< DIM, TYPE >, SAMRAI::pdat::FaceDataFactory< DIM, TYPE >, SAMRAI::pdat::IndexDataFactory< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::NodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuteredgeDataFactory< DIM, TYPE >, SAMRAI::pdat::OuterfaceDataFactory< DIM, TYPE >, SAMRAI::pdat::OuternodeDataFactory< DIM, TYPE >, SAMRAI::pdat::OutersideDataFactory< DIM, TYPE >, and SAMRAI::pdat::SideDataFactory< DIM, TYPE >.
MultiblockDataTranslator< DIM > * SAMRAI::hier::PatchDataFactory< DIM >::getMultiblockDataTranslator | ( | ) | [virtual] |
IntVector<DIM> SAMRAI::hier::PatchDataFactory< DIM >::d_ghosts [protected] |