IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM > Class Template Reference

#include <LocallyActiveVariableDatabase.h>

Public Member Functions

 LocallyActiveDataPatchLevelIterator ()
 
 LocallyActiveDataPatchLevelIterator (const tbox::Pointer< hier::Variable< DIM > > variable, const hier::PatchLevel< DIM > &pl)
 
 LocallyActiveDataPatchLevelIterator (const tbox::Pointer< hier::Variable< DIM > > variable, const hier::PatchLevel< DIM > *pl)
 
 LocallyActiveDataPatchLevelIterator (const PatchDataId &patch_data_id, const hier::PatchLevel< DIM > *pl, const tbox::Array< tbox::Pointer< hier::ComponentSelector > > *active_data_indices)
 
 LocallyActiveDataPatchLevelIterator (const LocallyActiveDataPatchLevelIterator< DIM > &iterator)
 
void initialize (const tbox::Pointer< hier::Variable< DIM > > variable, const hier::PatchLevel< DIM > &pl)
 
void initialize (const tbox::Pointer< hier::Variable< DIM > > variable, const hier::PatchLevel< DIM > *pl)
 
LocallyActiveDataPatchLevelIterator< DIM > & operator= (const LocallyActiveDataPatchLevelIterator< DIM > &iterator)
 
 ~LocallyActiveDataPatchLevelIterator ()
 
int operator* () const
 
int operator() () const
 
 operator bool () const
 
 operator const void * () const
 
bool operator! () const
 
void operator++ (int)
 
bool operator== (const LocallyActiveDataPatchLevelIterator< DIM > &iterator) const
 
bool operator!= (const LocallyActiveDataPatchLevelIterator &iterator) const
 

Private Member Functions

bool notActivePatch (int patch_number) const
 

Private Attributes

int d_patch
 
int d_data_index
 
const tbox::Array< tbox::Pointer< hier::ComponentSelector > > * d_active_patch_info
 
int d_number_patches
 
const hier::ProcessorMappingd_mapping
 

Static Private Attributes

static hier::LocallyActiveVariableDatabase< DIM > * s_variable_database
 

Detailed Description

template<int DIM>
class SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >

Class hier::LocallyActiveDataPatchLevelIterator iterates over the locally-owned (i.e., on processor) patches of a patch level on which data for a given variable or patch data index is active (i.e., can exist). This is consistent with the standard owner-computes rule and mimicks the behavior of the SAMRAI hier::PatchLevelIterator class. The iterator should be declared in user code as LocallyActiveDataPatchLevelManager<DIM>::Iterator since the implementation may change to be a nested class in the future. Also, since this class is not set up for general usage, it is recommended that an iterator object be obtained using one of the getIterator() functions in the LocallyActiveDataPatchLevelManager class.

See also
hier::PatchLevel
hier::LocallyActiveDataPatchLevelManager

Constructor & Destructor Documentation

◆ LocallyActiveDataPatchLevelIterator() [1/5]

Default constructor for the locally-active data patch iterator. This iterator must be initialized before it can be used to iterate over patches on a level.

See also
initialize()

◆ LocallyActiveDataPatchLevelIterator() [2/5]

template<int DIM>
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::LocallyActiveDataPatchLevelIterator ( const tbox::Pointer< hier::Variable< DIM > >  variable,
const hier::PatchLevel< DIM > &  pl 
)

Constructor for the locally-active data patch iterator. The iterator will enumerate the local patches in the patch level belonging to the local processor on which data for the given variable is active.

Parameters
variablesmart pointer to variable.
plconst reference to patch level.

◆ LocallyActiveDataPatchLevelIterator() [3/5]

template<int DIM>
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::LocallyActiveDataPatchLevelIterator ( const tbox::Pointer< hier::Variable< DIM > >  variable,
const hier::PatchLevel< DIM > *  pl 
)

Constructor for the locally-active data patch iterator. The iterator will enumerate the local patches in the patch level belonging to the local processor on which data for the given variable is active.

Parameters
variablesmart pointer to variable.
plconst pointer to patch level.

◆ LocallyActiveDataPatchLevelIterator() [4/5]

template<int DIM>
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::LocallyActiveDataPatchLevelIterator ( const PatchDataId patch_data_id,
const hier::PatchLevel< DIM > *  pl,
const tbox::Array< tbox::Pointer< hier::ComponentSelector > > *  active_data_indices 
)

Constructor for the locally-active data patch iterator. The iterator will enumerate the local patches in the patch level belonging to the local processor on which the give patch data index is active.

Note that this is a very special constructor used by the LocallyActiveDataPatchLevelManager class.

Parameters
patch_data_idconst reference to PatchDataId type indicating the patch data index of interest.
plconst pointer to patch level.
active_data_indicesconst array of pointers to component selectors describing active data on patch level.

◆ LocallyActiveDataPatchLevelIterator() [5/5]

Const copy constructor for the locally-active data patch iterator.

◆ ~LocallyActiveDataPatchLevelIterator()

Destructor for the iterator releases all internal storage.

Member Function Documentation

◆ initialize() [1/2]

template<int DIM>
void SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::initialize ( const tbox::Pointer< hier::Variable< DIM > >  variable,
const hier::PatchLevel< DIM > &  pl 
)

Initializer for the locally-active data patch iterator. The iterator will enumerate the local patches in the patch level belonging to the local processor on which data for the given variable is active.

Parameters
variableconst smart pointer to variable.
plconst reference to patch level.

◆ initialize() [2/2]

template<int DIM>
void SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::initialize ( const tbox::Pointer< hier::Variable< DIM > >  variable,
const hier::PatchLevel< DIM > *  pl 
)

Initializer for the locally-active data patch iterator. The iterator will enumerate the local patches in the patch level belonging to the local processor on which data for the given variable is active.

Parameters
variableconst smart pointer to variable.
plconst pointer to patch level.

◆ operator=()

Assignment operator for the iterator sets calling object to state of the argument iterator.

◆ operator*()

template<int DIM>
int SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator* ( ) const

Extract the integer patch index corresponding to the current patch in the patch level.

◆ operator()()

template<int DIM>
int SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator() ( ) const

Extract the integer patch index corresponding to the current patch in the patch level.

◆ operator bool()

template<int DIM>
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator bool ( ) const

Return true if the iterator points to a valid patch on the level; i.e., patch exists on the level and variable with which iterator is initialized is active on that patch.

◆ operator const void *()

template<int DIM>
SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator const void * ( ) const

Return non-NULL if the iterator points to a valid patch on the level; i.e., patch exists on the level and variable with which iterator is initialized is active on that patch.

◆ operator!()

template<int DIM>
bool SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator! ( ) const

Return true if the iterator points to a valid patch in the level (patch exists on the level and variable with which iterator is initialized is active on that patch); false otherwise. This operator mimics the !p operation applied to a pointer p.

◆ operator++()

template<int DIM>
void SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator++ ( int  )

Increment the iterator to point to the next local patch on which the variable with which iterator is initialized is active on the level.

◆ operator==()

template<int DIM>
bool SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator== ( const LocallyActiveDataPatchLevelIterator< DIM > &  iterator) const

Test whether two iterators point to the same patch index.

◆ operator!=()

template<int DIM>
bool SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::operator!= ( const LocallyActiveDataPatchLevelIterator< DIM > &  iterator) const

Test whether two iterators point to different patch indices.

◆ notActivePatch()

template<int DIM>
bool SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::notActivePatch ( int  patch_number) const
private

Member Data Documentation

◆ d_patch

template<int DIM>
int SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::d_patch
private

◆ d_data_index

template<int DIM>
int SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::d_data_index
private

◆ d_active_patch_info

template<int DIM>
const tbox::Array< tbox::Pointer<hier::ComponentSelector> >* SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::d_active_patch_info
private

◆ d_number_patches

template<int DIM>
int SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::d_number_patches
private

◆ d_mapping

template<int DIM>
const hier::ProcessorMapping* SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::d_mapping
private

◆ s_variable_database

template<int DIM>
hier::LocallyActiveVariableDatabase<DIM>* SAMRAI::hier::LocallyActiveDataPatchLevelIterator< DIM >::s_variable_database
staticprivate

The documentation for this class was generated from the following file: