#include <source/hierarchy/variables/LocallyActiveDataPatchLevelManager.h>
typedef LocallyActiveDataPatchLevelIterator<DIM> SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::Iterator |
An iterator over patches on the patch level. The iterator will enumerate the patches that live on the local processor and on which a given patch data index is active (see constructor for LocallyActiveDataPatchLevelIterator).
Use iterator LocallyActiveDataPatchLevelManager::Iterator instead of LocallyActiveDataPatchLevelIterator<DIM>, since the iterator may be defined as a nested class in the future.
SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::LocallyActiveDataPatchLevelManager | ( | ) |
Default constructor for LocallyActiveDataPatchLevelManager class. The object state is invalid, hence the object cannot do anything useful, until it is set using the initialize() member function.
SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::LocallyActiveDataPatchLevelManager | ( | const hier::PatchLevel< DIM > & | level | ) |
Construct a new LocallyActiveDataPatchLevelManager object and initialize it based on the given patch level reference.
level | const reference to patch level. |
SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::LocallyActiveDataPatchLevelManager | ( | const tbox::Pointer< hier::PatchLevel< DIM > > | level | ) |
Construct a new LocallyActiveDataPatchLevelManager object and initialize it based on the given patch level pointer.
level | const pointer to patch level. |
SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::~LocallyActiveDataPatchLevelManager | ( | ) |
Destructor for LocallyActiveDataPatchLevelManager class frees internal storage.
LocallyActiveDataPatchLevelManager< DIM >::Iterator SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::getIterator | ( | const PatchDataId & | patch_data_id | ) | const [inline] |
Return an iterator that will enumerate the patches on the local processor and on which the given patch data index is active.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. |
LocallyActiveDataPatchLevelManager< DIM >::Iterator SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::getIterator | ( | const tbox::Pointer< hier::Variable< DIM > > | variable | ) | const [inline] |
Return an iterator that will enumerate the patches on the local processor and on which data for the given variable is active. Note that we assume that a variable is associated with only one patch data index.
variable | pointer to variable. |
variable | const smart pointer to variable. |
tbox::Pointer< hier::PatchLevel< DIM > > SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::getPatchLevel | ( | ) | const [inline] |
Return pointer to patch level associated with this manager object.
bool SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::checkLevel | ( | const hier::PatchLevel< DIM > & | level | ) | const [inline] |
Return true if argument level is same as that with which this LocallyActiveDataPatchLevelManager object was initialized; otherwise return false.
level | const reference to level. |
bool SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::checkLevel | ( | const tbox::Pointer< hier::PatchLevel< DIM > > | level | ) | const [inline] |
Return true if argument level is same as that with which this LocallyActiveDataPatchLevelManager object was initialized; otherwise return false.
level | const smart pointer to level. |
bool SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::checkLevel | ( | const hier::PatchLevel< DIM > * | level | ) | const [inline] |
Return true if argument level is same as that with which this LocallyActiveDataPatchLevelManager object was initialized; otherwise return false.
level | const pointer to level. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::reset | ( | const hier::PatchLevel< DIM > & | level | ) |
Reset the state of the LocallyActiveDataPatchLevelManager object to that associated with the given level. If the object was previously initialized based on a different level, that information is destroyed. and replaced with information from the argument level. Note that, at that point, it is impossible to recover the manager state associated with the previous level via this object.
level | const reference to patch level. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::reset | ( | const tbox::Pointer< hier::PatchLevel< DIM > > | level | ) |
Initialize the state of the LocallyActiveDataPatchLevelManager object to that associated with the given level. If the object was previously initialized based on a different level, that information is destroyed. and replaced with information from the argument level. Note that, at that point, it is impossible to recover the manager state associated with the previous level via this object.
level | const smart pointer to patch level. |
bool SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::getPatchDataActive | ( | const PatchDataId & | patch_data_id, | |
const PatchNumber & | patch_number | |||
) | const [inline] |
Check whether given patch data index is active on given patch and return boolean true if data is active on patch; false otherwise.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. | |
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
const hier::ComponentSelector & SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::getAllPatchDataActive | ( | const PatchNumber & | patch_number | ) | const [inline] |
Return const reference to component selector indicating active/inactive patch data indices for given patch.
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setPatchDataActive | ( | const PatchDataId & | patch_data_id, | |
const PatchNumber & | patch_number | |||
) | [inline] |
Set specified patch data active on given patch. Note that this function does not allocate the corresponding patch data.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. | |
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setPatchDataActive | ( | const hier::ComponentSelector & | active_indices, | |
const PatchNumber & | patch_number | |||
) | [inline] |
Set patch data active/inactive for given patch based on component selector information. Note that this function does not allocate/deallocate the corresponding patch data.
active_indices | const reference to component selector containing active/inactive patch data index information. | |
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setAllPatchDataActive | ( | const PatchNumber & | patch_number | ) | [inline] |
Set all patch data active for given patch. Note that this function does not allocate the corresponding patch data.
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setPatchDataActive | ( | const hier::ComponentSelector & | active_indices | ) | [inline] |
Set patch data active/inactive for all patches based on component selector information. Note that this function does not allocate/deallocate the corresponding patch data.
active_indices | const reference to component selector containing active/inactive patch data index information. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setPatchDataInactive | ( | const PatchDataId & | patch_data_id, | |
const PatchNumber & | patch_number | |||
) | [inline] |
Set specified patch data inactive on given patch. Note that this function does not deallocate the corresponding patch data.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. | |
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setAllPatchDataInactive | ( | const PatchNumber & | patch_number | ) | [inline] |
Set all patch data inactive for given patch. Note that this function does not deallocate the corresponding patch data.
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::setAllPatchDataInactive | ( | ) | [inline] |
Set all patch data inactive for all patches. Note that this function does not deallocate any patch data.
When assertion checking is active, an assertion will result when the manager has not been initialized with a level.
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::clearAllActiveDataInfo | ( | ) | [inline] |
Clear all information from locally-active data patch level manager object, setting object state to that created by the default constructor.
Note that this function does not deallocate any patch data.
bool SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::checkAllocated | ( | const PatchDataId & | patch_data_id | ) | const |
Check if data corresponding to given index is allocated on all active patches on the level.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::allocatePatchData | ( | const PatchDataId & | patch_data_id, | |
double | timestamp = 0.0 , |
|||
tbox::Pointer< tbox::Arena > | pool = 0 | |||
) | const |
Allocate data for given patch data index on all level patches on which the data is active. Each allocated patch data object will be stamped with the given time value.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. | |
timestamp | optional double data timestamp. | |
pool | optional pointer to memory arena for data. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::allocateAllPatchData | ( | double | timestamp = 0.0 , |
|
tbox::Pointer< tbox::Arena > | pool = 0 | |||
) | const [inline] |
Allocate all active patch data on all level patches associated with this manager object. Each allocated patch data object will be stamped with the given time value.
timestamp | optional double data timestamp. | |
pool | optional pointer to memory arena for data. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::allocateAllPatchData | ( | const PatchNumber & | patch_number, | |
double | timestamp = 0.0 , |
|||
tbox::Pointer< tbox::Arena > | pool = 0 | |||
) | const [inline] |
Allocate all active patch data for given patch. Each allocated patch data object will be stamped with the given time value.
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. | |
timestamp | optional double data timestamp. | |
pool | optional pointer to memory arena for data. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::deallocatePatchData | ( | const PatchDataId & | patch_data_id | ) | const |
Deallocate data for given patch data index on all level patches on which the data is active. Note that the state of this manager object remains intact after this operation.
patch_data_id | const reference to PatchDataId type indicating the patch data index of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::deallocateAllPatchData | ( | ) | const [inline] |
Deallocate all active patch data on all level patches associated with this manager object. Note that the state of this manager object remains intact after this operation.
When assertion checking is active, an assertion will result when the manager has not been initialized with a level.
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::deallocateAllPatchData | ( | const PatchNumber & | patch_number | ) | const [inline] |
Deallocate all active patch data for given patch. Note that the state of this manager object remains intact after this operation.
patch_number | const reference to PatchNumber type indicating the number of the patch of interest. |
void SAMRAI::hier::LocallyActiveDataPatchLevelManager< DIM >::printClassData | ( | std::ostream & | os = tbox::plog |
) | const [virtual] |
Print all active patch data information contained in the locally-active box set to the specified output stream.
os | optional reference to output stream (default is plog). |
friend class LocallyActiveDataPatchLevelIterator< DIM > [friend] |