Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::pdat::IndexData< DIM, TYPE > Class Template Reference

#include <source/patchdata/index/IndexData.h>

Inheritance diagram for SAMRAI::pdat::IndexData< DIM, TYPE >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef IndexIterator< DIM,
TYPE > 
Iterator

Public Member Functions

 IndexData (const hier::Box< DIM > &box, const hier::IntVector< DIM > &ghosts)
virtual ~IndexData ()
virtual void copy (const hier::PatchData< DIM > &src)
virtual void copy2 (hier::PatchData< DIM > &dst) const
virtual void copy (const hier::PatchData< DIM > &src, const hier::BoxOverlap< DIM > &overlap)
virtual void copy2 (hier::PatchData< DIM > &dst, const hier::BoxOverlap< DIM > &overlap) const
virtual bool canEstimateStreamSizeFromBox () const
virtual int getDataStreamSize (const hier::BoxOverlap< DIM > &overlap) const
virtual void packStream (tbox::AbstractStream &stream, const hier::BoxOverlap< DIM > &overlap) const
virtual void unpackStream (tbox::AbstractStream &stream, const hier::BoxOverlap< DIM > &overlap)
void appendItem (const hier::Index< DIM > &index, const TYPE &item)
void addItem (const hier::Index< DIM > &index, const TYPE &item)
void removeItem (const hier::Index< DIM > &index)
int getNumberItems () const
void removeInsideBox (const hier::Box< DIM > &box)
void removeOutsideBox (const hier::Box< DIM > &box)
void removeGhostItems ()
void removeAllItems ()
bool isElement (const hier::Index< DIM > &index) const
TYPE * getItem (const hier::Index< DIM > &index) const
virtual void getSpecializedFromDatabase (tbox::Pointer< tbox::Database > database)
virtual void putSpecializedToDatabase (tbox::Pointer< tbox::Database > database)

Friends

class IndexIterator< DIM, TYPE >

Detailed Description

template<int DIM, class TYPE>
class SAMRAI::pdat::IndexData< DIM, TYPE >

Class IndexData<DIM> is a templated patch data type for manipulating data over irregular cell-centered index sets. The template parameter TYPE defines the storage at each index location. It is derived from hier::PatchData<DIM>. For example, this class is used to represent embedded boundary features as a regular patch data type using the BoundaryCell class as the template type.

The data type TYPE must define the following five methods which are require by this class:

More information about the templated TYPE is provided in the IndexData README file.

IndexData<DIM> objects are created by the IndexDataFactory<DIM> factory object just as all other patch data types.

See also:
pdat::IndexData

hier::PatchData

pdat::IndexDataFactory


Member Typedef Documentation

template<int DIM, class TYPE>
typedef IndexIterator<DIM,TYPE> SAMRAI::pdat::IndexData< DIM, TYPE >::Iterator
 

Define the iterator.


Constructor & Destructor Documentation

template<int DIM, class TYPE>
SAMRAI::pdat::IndexData< DIM, TYPE >::IndexData const hier::Box< DIM > &  box,
const hier::IntVector< DIM > &  ghosts
 

The constructor for an IndexData object. The box describes the interior of the index space and the ghosts vector describes the ghost nodes in each coordinate direction.

template<int DIM, class TYPE>
SAMRAI::pdat::IndexData< DIM, TYPE >::~IndexData  )  [virtual]
 

The virtual destructor for an IndexData object.


Member Function Documentation

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::copy const hier::PatchData< DIM > &  src  )  [virtual]
 

A fast copy between the source and destination. All data is copied from the source into the destination where there is overlap in the index space.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::copy2 hier::PatchData< DIM > &  dst  )  const [virtual]
 

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::copy const hier::PatchData< DIM > &  src,
const hier::BoxOverlap< DIM > &  overlap
[virtual]
 

Copy data from the source into the destination using the designated overlap descriptor. The overlap description should have been computed previously from computeIntersection().

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::copy2 hier::PatchData< DIM > &  dst,
const hier::BoxOverlap< DIM > &  overlap
const [virtual]
 

template<int DIM, class TYPE>
bool SAMRAI::pdat::IndexData< DIM, TYPE >::canEstimateStreamSizeFromBox  )  const [virtual]
 

Determines whether the hier::PatchData subclass can estinate the necessary stream size using only index space information.

Implements SAMRAI::hier::PatchData< DIM >.

template<int DIM, class TYPE>
int SAMRAI::pdat::IndexData< DIM, TYPE >::getDataStreamSize const hier::BoxOverlap< DIM > &  overlap  )  const [virtual]
 

Calculate the number of bytes needed to stream the data lying in the specified box domain.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::packStream tbox::AbstractStream stream,
const hier::BoxOverlap< DIM > &  overlap
const [virtual]
 

Pack data lying on the specified index set into the output stream.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::unpackStream tbox::AbstractStream stream,
const hier::BoxOverlap< DIM > &  overlap
[virtual]
 

Unpack data from the message stream into the specified index set.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::appendItem const hier::Index< DIM > &  index,
const TYPE &  item
 

Add a new item to the tail of the irregular index set

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::addItem const hier::Index< DIM > &  index,
const TYPE &  item
 

Add a new item to the head of the irregular index set

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::removeItem const hier::Index< DIM > &  index  ) 
 

Remove (deallocate) the item in the irregular index set located at the specified hier::Index.

template<int DIM, class TYPE>
int SAMRAI::pdat::IndexData< DIM, TYPE >::getNumberItems  )  const
 

Return the number of data items (i.e. the number of indices) in the index data list.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::removeInsideBox const hier::Box< DIM > &  box  ) 
 

Remove (deallocate) any items in the irregular index set located in the index space of the hier::Box.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::removeOutsideBox const hier::Box< DIM > &  box  ) 
 

Remove (deallocate) any items in the irregular index set located outside of the index space of the hier::Box.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::removeGhostItems  ) 
 

Remove (deallocate) the items in the irregular index set located in the ghost region of the patch.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::removeAllItems  ) 
 

Remove (deallocate) all items in the irregular index set.

template<int DIM, class TYPE>
bool SAMRAI::pdat::IndexData< DIM, TYPE >::isElement const hier::Index< DIM > &  index  )  const
 

Returns true if there is an element of the irregular index set at the specified hier::Index.

template<int DIM, class TYPE>
TYPE * SAMRAI::pdat::IndexData< DIM, TYPE >::getItem const hier::Index< DIM > &  index  )  const
 

Given an index, return a pointer to the item located at that index. If there is no item at the index, null is returned.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::getSpecializedFromDatabase tbox::Pointer< tbox::Database database  )  [virtual]
 

Check to make sure that the class version number is the same as the restart file version number.

Assertions: database must be a non-null pointer.

Implements SAMRAI::hier::PatchData< DIM >.

template<int DIM, class TYPE>
void SAMRAI::pdat::IndexData< DIM, TYPE >::putSpecializedToDatabase tbox::Pointer< tbox::Database database  )  [virtual]
 

Write out the class version number to the database.

Assertions: database must be a non-null pointer.

Implements SAMRAI::hier::PatchData< DIM >.


Friends And Related Function Documentation

template<int DIM, class TYPE>
friend class IndexIterator< DIM, TYPE > [friend]
 


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:29:35 2005 for SAMRAI by  doxygen 1.4.2