template<int DIM>
class SAMRAI::hier::PatchData< DIM >
Class PatchData<DIM> is a pure virtual base class for the data storage defined over a box. Patch data objects are generally contained within a patch. Patch data defines the abstract virtual functions for data management and communication that must be supplied by the subclasses. Subclasses implement the virtual functions as appropriate for the derived type; for example, cell centered objects will copy data differently than face centered objects.
Patch data objects are created by patch data factories and associated subclasses. This separation into abstract factory and concrete implementation subclasses facilitates the creation of new patch data subtypes. See the Design Patterns book for more details about the Abstract Factory pattern.
The copy and pack/unpack functions in the patch data object take box overlap descriptions that describe the index space over which data is to be copied or packed/unpacked. Box overlaps are computed by the box geometry classes, which are accessed through the patch data factories. Box geometry classes are created by the patch data factories instead of the patch data objects because patch data objects are distributed across memory with patches and therefore may not exist on a particular processor. Patch data factories are guaranteed to exist on all processors independent of the patch-to-processor mapping.
- See also
- hier::BoxOverlap
-
hier::BoxGeometry
-
hier::Patch
-
hier::PatchDataFactory
-
hier::PatchDescriptor
A fast copy between the source and destination. Data is copied from the source into the destination where there is overlap in the underlying index space. The copy is performed on the interior plus the ghost cell width (for both the source and destination). If this copy does not understand how to copy data from the argument, then copy2() is called on the source object.
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::IndexData< NDIM, LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >, and SAMRAI::pdat::IndexData< DIM, IBTK::LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >.
A fast copy between the source and destination. Data is copied from the source into the destination where there is overlap in the underlying index space. The copy is performed on the interior plus the ghost cell width (for both the source and destination). If this copy does not understand how to copy data from the destination, then it may throw an exception (aka dump core in a failed assertion).
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::IndexData< NDIM, LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >, and SAMRAI::pdat::IndexData< DIM, IBTK::LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >.
Copy data from the source into the destination using the designated overlap descriptor. The overlap description will have been computed using the appropriate box geometry objects. If this member function cannot complete the copy from source (e.g., if it doesn't understand the type of source), then copy2() is called on the source object.
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::IndexData< NDIM, LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >, and SAMRAI::pdat::IndexData< DIM, IBTK::LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >.
Copy data from the source into the destination using the designated overlap descriptor. The overlap description will have been computed using the appropriate box geometry objects If this member function cannot complete the copy from the destination, then it may throw an exception (aka dump core in a failed assertion).
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::IndexData< NDIM, LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >, and SAMRAI::pdat::IndexData< DIM, IBTK::LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >.
Determines whether the patch data subclass can estimate the necessary stream size using only index space information. The return value will most likely be true for data types that are fixed size (such as doubles) but will be false for complex data types that allocate their own storage (such as lists of particles). This routine is used to estimate whether a processor can estimate space for incoming messages or whether it needs to receive a message size from the sending processor.
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, and SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >.
Calculate the number of bytes needed to stream the data lying in the specified box domain. This estimate must be an upper bound on the size of the data in the actual message stream. The upper bound should be close, however, since buffer space will be allocated according to these values, and excess buffer space will waste memory resources.
Implemented in SAMRAI::pdat::OuteredgeData< DIM, TYPE >, SAMRAI::pdat::OuternodeData< DIM, TYPE >, SAMRAI::pdat::OutersideData< DIM, TYPE >, SAMRAI::pdat::OuterfaceData< DIM, TYPE >, SAMRAI::pdat::SideData< DIM, TYPE >, SAMRAI::pdat::FaceData< DIM, TYPE >, SAMRAI::pdat::EdgeData< DIM, TYPE >, SAMRAI::pdat::NodeData< DIM, TYPE >, SAMRAI::pdat::CellData< DIM, TYPE >, SAMRAI::pdat::IndexData< DIM, TYPE, BOX_GEOMETRY >, SAMRAI::pdat::IndexData< NDIM, LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >, and SAMRAI::pdat::IndexData< DIM, IBTK::LSet< T >, SAMRAI::pdat::CellGeometry< NDIM > >.