SAMRAI::xfer::RefineClasses< DIM > Class Template Reference

#include <source/transfer/datamovers/standard/RefineClasses.h>

List of all members.

Public Member Functions

 RefineClasses ()
virtual ~RefineClasses ()
int getNumberOfEquivalenceClasses () const
const RefineClasses< DIM
>::Data
getClassRepresentative (int equiv_class_id) const
tbox::List< typename RefineClasses<
DIM >::Data >::Iterator 
getIterator (int equiv_class_id)
void insertEquivalenceClassItem (const typename RefineClasses< DIM >::Data &data, tbox::Pointer< hier::PatchDescriptor< DIM > > descriptor=(hier::PatchDescriptor< DIM > *) NULL)
bool checkRefineItem (const typename RefineClasses< DIM >::Data &data_item, tbox::Pointer< hier::PatchDescriptor< DIM > > descriptor=(hier::PatchDescriptor< DIM > *) NULL) const
bool checkConsistency (tbox::Pointer< RefineClasses< DIM > > test_classes, tbox::Pointer< hier::PatchDescriptor< DIM > > descriptor=(hier::PatchDescriptor< DIM > *) NULL) const
virtual void printClassData (std::ostream &stream) const
void printRefineItem (std::ostream &stream, const typename RefineClasses< DIM >::Data &data) const

Classes

struct  Data


Detailed Description

template<int DIM>
class SAMRAI::xfer::RefineClasses< DIM >

Class RefineClasses<DIM> is used by the RefineSchedule<DIM> and RefineAlgorithm<DIM> classes to manage a set of refinement data items that describe interpatch communication of patch data on an AMR hierarchy. Specifically, this class organizes these items into equivalence clases. Two items are equivalent if their source and destination data represent the same data types and have the same ghost cell widths, respectively.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::xfer::RefineClasses< DIM >::RefineClasses (  ) 

The constructor creates an empty array of refine classes.

template<int DIM>
SAMRAI::xfer::RefineClasses< DIM >::~RefineClasses (  )  [virtual]

The virtual destructor destroys the refinement data items owned by this object (and the associated RefineAlgorithm<DIM> object).


Member Function Documentation

template<int DIM>
int SAMRAI::xfer::RefineClasses< DIM >::getNumberOfEquivalenceClasses (  )  const

Return number of equivalence classes maintained by this object (i.e., the number of lists of refinement data items).

template<int DIM>
const RefineClasses< DIM >::Data & SAMRAI::xfer::RefineClasses< DIM >::getClassRepresentative ( int  equiv_class_id  )  const

Return const reference to representative element of equivalence class with the given integer identifier. When assertion checking is active, the id will be checked for validity.

template<int DIM>
tbox::List< typename RefineClasses< DIM >::Data >::Iterator SAMRAI::xfer::RefineClasses< DIM >::getIterator ( int  equiv_class_id  ) 

Return an iterator for the refine data list corresponding to the equivalence class with the given integer identifier. The number of equivalence classes can be determined via the getNumberOfEquivalenceClasses() member function. Valid integer arguments are 0,...,getNumberOfEquivalenceClasses()-1. When assertion checking is active, the id will be checked for validity.

Note that the list should not be modified through this iterator. When assertion checking is active, the id will be checked for validity.

template<int DIM>
void SAMRAI::xfer::RefineClasses< DIM >::insertEquivalenceClassItem ( const typename RefineClasses< DIM >::Data data,
tbox::Pointer< hier::PatchDescriptor< DIM > >  descriptor = (hier::PatchDescriptor< DIM > *) NULL 
)

Insert a data item into the refine data list for the proper equivalence class. Items are inserted in order of operator priority so that communication algorithms apply refinement operators with the lowest numerical priority before those with higher numerical priority.

If a null patch descriptor argument is passed (or ommitted), the descriptor associated with the variable database Singleton object will be used to determine the equivalence class.

template<int DIM>
bool SAMRAI::xfer::RefineClasses< DIM >::checkRefineItem ( const typename RefineClasses< DIM >::Data data_item,
tbox::Pointer< hier::PatchDescriptor< DIM > >  descriptor = (hier::PatchDescriptor< DIM > *) NULL 
) const

Check refine data item so that scratch data entry has at least as many ghost cells as destination data entry and stencil width of operator. If so, return true; else return false. A descriptive error message will be reported when a problem appears and the program halts.

If a null patch descriptor argument is passed (or ommitted), the descriptor associated with the variable database Singleton object will be used.

template<int DIM>
bool SAMRAI::xfer::RefineClasses< DIM >::checkConsistency ( tbox::Pointer< RefineClasses< DIM > >  test_classes,
tbox::Pointer< hier::PatchDescriptor< DIM > >  descriptor = (hier::PatchDescriptor< DIM > *) NULL 
) const

Compare refine data items in this refine classes object against those in the argument refine classes object. Return true if they all match with regard to the patch data types, patch data ghost cell widths, operator stencils, etc. that they refer to and return false otherwise.

If a null patch descriptor argument is passed (or ommitted), the descriptor associated with the variable database Singleton object will be used.

template<int DIM>
void SAMRAI::xfer::RefineClasses< DIM >::printClassData ( std::ostream &  stream  )  const [virtual]

Print all equivalence class data to the specified output stream.

template<int DIM>
void SAMRAI::xfer::RefineClasses< DIM >::printRefineItem ( std::ostream &  stream,
const typename RefineClasses< DIM >::Data data 
) const

Print single equivalence class item to the specified output stream.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:10 2009 for SAMRAI by  doxygen 1.5.1