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

#include <BoxIOUtility.h>

Public Types

enum  IOTYPE { READ = 0, WRITE = 1 }
 

Public Member Functions

 BoxIOUtility (const std::string &dirname, const IOTYPE iotype)
 
virtual ~BoxIOUtility ()
 
void getLevelBoxes (BoxArray< DIM > &level_boxes, const int level_number, const int entry_number)
 
void putLevelBoxes (const BoxArray< DIM > &level_boxes, const int level_number, const int entry_number)
 
int getNumberOfLevels ()
 
int getNumberOfEntries (const int level_number)
 
void writeLevelBoxesDatabase ()
 
void printBoxes (std::ostream &os)
 

Private Member Functions

void readLevelBoxesDatabase ()
 

Private Attributes

std::string d_hdf_dirname
 
IOTYPE d_iotype
 
tbox::Array< tbox::Array< BoxArray< DIM > > > d_level_boxes
 

Detailed Description

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

Class BoxIOUtility<DIM> supports writing and reading box information to an HDF file.

Member Enumeration Documentation

◆ IOTYPE

template<int DIM>
enum SAMRAI::hier::BoxIOUtility::IOTYPE

Enumerated type for specification of whether to read or write data.

  • READ { read from HDF database}
  • WRITE { write to HDF database};
Enumerator
READ 
WRITE 

Constructor & Destructor Documentation

◆ BoxIOUtility()

template<int DIM>
SAMRAI::hier::BoxIOUtility< DIM >::BoxIOUtility ( const std::string &  dirname,
const IOTYPE  iotype 
)

The constructor requires the name of the HDF database to write or read to, and the IOTYPE.

◆ ~BoxIOUtility()

template<int DIM>
virtual SAMRAI::hier::BoxIOUtility< DIM >::~BoxIOUtility ( )
virtual

Virtual destructor.

Member Function Documentation

◆ getLevelBoxes()

template<int DIM>
void SAMRAI::hier::BoxIOUtility< DIM >::getLevelBoxes ( BoxArray< DIM > &  level_boxes,
const int  level_number,
const int  entry_number 
)

Pulls refinement boxes corresponding to the provided level and entry number from storage array - returns a boxlist with the corresponding refine boxes.

◆ putLevelBoxes()

template<int DIM>
void SAMRAI::hier::BoxIOUtility< DIM >::putLevelBoxes ( const BoxArray< DIM > &  level_boxes,
const int  level_number,
const int  entry_number 
)

Puts new refinement boxes corresponding to the provided level and entry number into storage arrays.

◆ getNumberOfLevels()

template<int DIM>
int SAMRAI::hier::BoxIOUtility< DIM >::getNumberOfLevels ( )

Returns the number of levels in the database.

◆ getNumberOfEntries()

template<int DIM>
int SAMRAI::hier::BoxIOUtility< DIM >::getNumberOfEntries ( const int  level_number)

Returns the number of entries in the database for the specified level.

◆ writeLevelBoxesDatabase()

template<int DIM>
void SAMRAI::hier::BoxIOUtility< DIM >::writeLevelBoxesDatabase ( )

Opens and writes to an HDF database directory with the prescribed name a set of refinement boxes used during the run.

◆ printBoxes()

template<int DIM>
void SAMRAI::hier::BoxIOUtility< DIM >::printBoxes ( std::ostream &  os)

Print the boxes stored in the database to the specified IO stream.

◆ readLevelBoxesDatabase()

template<int DIM>
void SAMRAI::hier::BoxIOUtility< DIM >::readLevelBoxesDatabase ( )
private

Member Data Documentation

◆ d_hdf_dirname

template<int DIM>
std::string SAMRAI::hier::BoxIOUtility< DIM >::d_hdf_dirname
private

◆ d_iotype

template<int DIM>
IOTYPE SAMRAI::hier::BoxIOUtility< DIM >::d_iotype
private

◆ d_level_boxes

template<int DIM>
tbox::Array< tbox::Array< BoxArray<DIM> > > SAMRAI::hier::BoxIOUtility< DIM >::d_level_boxes
private

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