IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Classes | Public Member Functions | List of all members
IBTK::SAMRAIDataCache Class Reference

Class SAMRAIDataCache is a utility class for caching cloned SAMRAI patch data. Patch data are allocated as needed and should not be deallocated by the caller. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/SAMRAIDataCache.h>

Inheritance diagram for IBTK::SAMRAIDataCache:
Inheritance graph
[legend]

Classes

class  CachedPatchDataIndex
 Class for accessing cached patch data indices. More...
 

Public Member Functions

 SAMRAIDataCache ()=default
 Default constructor.
 
 ~SAMRAIDataCache ()
 Destructor.
 

Methods to set the hierarchy and range of levels.

void setPatchHierarchy (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy)
 Set the patch hierarchy to use in allocating patch data. More...
 
void resetLevels (int coarsest_ln, int finest_ln)
 Reset the range of patch levels over which operations occur. More...
 
int getCoarsestLevelNumber () const
 
int getFinestLevelNumber () const
 
CachedPatchDataIndex getCachedPatchDataIndex (int idx)
 Gets the cached patch data index. More...
 

Detailed Description

Class SAMRAIDataCache is a utility class for caching cloned SAMRAI patch data. Patch data are allocated as needed and should not be deallocated by the caller.

Member Function Documentation

◆ getCachedPatchDataIndex()

CachedPatchDataIndex IBTK::SAMRAIDataCache::getCachedPatchDataIndex ( int  idx)
inline

Gets the cached patch data index.

Parameters
[in]idxThe patch data index clone or lookup.
Returns
The cached patch data index.

◆ getCoarsestLevelNumber()

int IBTK::SAMRAIDataCache::getCoarsestLevelNumber ( ) const

Return the coarsest patch level for which scratch data is allocated.

◆ getFinestLevelNumber()

int IBTK::SAMRAIDataCache::getFinestLevelNumber ( ) const

Return the finest patch level for which scratch data is allocated.

◆ resetLevels()

void IBTK::SAMRAIDataCache::resetLevels ( int  coarsest_ln,
int  finest_ln 
)

Reset the range of patch levels over which operations occur.

Parameters
[in]coarsest_lnThe coarsest level number
[in]finest_lnThe finest level number

◆ setPatchHierarchy()

void IBTK::SAMRAIDataCache::setPatchHierarchy ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy)

Set the patch hierarchy to use in allocating patch data.

Parameters
[in]hierarchyThe patch hierarchy

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