Chombo + EB + MF  3.2
Macros | Functions
NodeAMRIO.H File Reference
#include "REAL.H"
#include "LevelData.H"
#include "RealVect.H"
#include "Vector.H"
#include "NodeFArrayBox.H"
#include <string>
#include "IntVect.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Include dependency graph for NodeAMRIO.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _NODEAMRIO_H_
 

Functions

void WriteAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Box &a_domain, const Real &a_dx, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const int &a_numLevels, const RealVect &a_origin=RealVect::Zero, const Interval &a_comps=Interval())
 
void WriteAnisotropicAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Box &a_domain, const RealVect &a_dx, const Real &a_dt, const Real &a_time, const Vector< IntVect > &a_vectRatios, const int &a_numLevels, const RealVect &a_origin=RealVect::Zero, const Interval &a_comps=Interval())
 
void WriteAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< Vector< LevelData< NodeFArrayBox > * > > &a_vectData, const Vector< string > &a_vectNames, const Box &a_domain, const Real &a_dx, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const int &a_numLevels)
 
void WriteAMRHierarchyHDF5 (HDF5Handle &handle, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Box &a_domain, const Real &a_dx, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const int &a_numLevels, const RealVect &a_origin=RealVect::Zero, const Interval &a_comps=Interval())
 
void WriteAnisotropicAMRHierarchyHDF5 (HDF5Handle &handle, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Box &a_domain, const RealVect &a_dx, const Real &a_dt, const Real &a_time, const Vector< IntVect > &a_vectRatios, const int &a_numLevels, const RealVect &a_origin=RealVect::Zero, const Interval &a_comps=Interval())
 
void WriteAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Box &a_domain, const Vector< int > &a_vectRatio, const int &a_numLevels)
 
void WriteAMRHierarchyHDF5 (HDF5Handle &handle, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< NodeFArrayBox > * > &a_vectData, const Box &a_domain, const Vector< int > &a_vectRatio, const int &a_numLevels)
 
int ReadAMRHierarchyHDF5 (const string &filename, Vector< DisjointBoxLayout > &a_vectGrids, Vector< LevelData< NodeFArrayBox > * > &a_vectData, Vector< string > &a_vectNames, Box &a_domain, Real &a_dx, Real &a_dt, Real &a_time, Vector< int > &a_refRatio, int &a_numLevels, bool a_setGhost=false)
 
int ReadAMRHierarchyHDF5 (HDF5Handle &handle, Vector< DisjointBoxLayout > &a_vectGrids, Vector< LevelData< NodeFArrayBox > * > &a_vectData, Vector< string > &a_vectNames, Box &a_domain, Real &a_dx, Real &a_dt, Real &a_time, Vector< int > &a_refRatio, int &a_numLevels, bool a_setGhost=false)
 
int ReadAMRHierarchyHDF5 (const string &filename, Vector< DisjointBoxLayout > &a_vectGrids, Vector< LevelData< NodeFArrayBox > * > &a_vectData, Box &a_domain, Vector< int > &a_refRatio, int &a_numLevels, bool a_setGhost=false)
 
int ReadAMRHierarchyHDF5 (HDF5Handle &handle, Vector< DisjointBoxLayout > &a_vectGrids, Vector< LevelData< NodeFArrayBox > * > &a_vectData, Box &a_domain, Vector< int > &a_refRatio, int &a_numLevels, bool a_setGhost=false)
 
void writeNFAB (const NodeFArrayBox *a_dataPtr)
 
void viewNFAB (const NodeFArrayBox *a_dataPtr)
 
void writeNFABname (const NodeFArrayBox *a_dataPtr, const char *a_filename)
 
void writeNodeLevel (const LevelData< NodeFArrayBox > *a_dataPtr)
 
void viewNodeLevel (const LevelData< NodeFArrayBox > *a_dataPtr)
 
void writeNodeLevelname (const LevelData< NodeFArrayBox > *a_dataPtr, const char *a_filename)
 
void WritePartialAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< FArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Box &a_baseDomain, const Real &a_baseDx, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const Interval &a_levels)
 
void WritePartialAMRHierarchyHDF5 (const string &filename, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< Vector< LevelData< NodeFArrayBox > * > > &a_vectData, const Vector< string > &a_vectNames, const Box &a_baseDomain, const Real &a_baseDx, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const Interval &a_levels)
 

Macro Definition Documentation

◆ _NODEAMRIO_H_

#define _NODEAMRIO_H_

Function Documentation

◆ WriteAMRHierarchyHDF5() [1/5]

void WriteAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_domain,
const Real a_dx,
const Real a_dt,
const Real a_time,
const Vector< int > &  a_vectRatio,
const int &  a_numLevels,
const RealVect a_origin = RealVect::Zero,
const Interval a_comps = Interval() 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out
a_originphysical coordinates of lower corner of cell at IntVect 0
a_compsInterval of components to be written

◆ WriteAnisotropicAMRHierarchyHDF5() [1/2]

void WriteAnisotropicAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_domain,
const RealVect a_dx,
const Real a_dt,
const Real a_time,
const Vector< IntVect > &  a_vectRatios,
const int &  a_numLevels,
const RealVect a_origin = RealVect::Zero,
const Interval a_comps = Interval() 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing in each direction at coarsest level
a_dttime step at coarsest level
a_timetime
a_vectRatiosrefinement ratios in each direction between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out
a_originphysical coordinates of lower corner of cell at IntVect 0
a_compsInterval of components to be written

◆ WriteAMRHierarchyHDF5() [2/5]

void WriteAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< Vector< LevelData< NodeFArrayBox > * > > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_domain,
const Real a_dx,
const Real a_dt,
const Real a_time,
const Vector< int > &  a_vectRatio,
const int &  a_numLevels 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This function differs from the previous one in that a_vectData[ind][lev] indexes a LevelData<NodeFArrayBox>* (which may have several components) at level lev.

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by set and then by level
a_vectNamesnames of variables in a_vectData: first the names of the components of a_vectData[0], then the names of the components of a_vectData[1], etc.
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out

◆ WriteAMRHierarchyHDF5() [3/5]

void WriteAMRHierarchyHDF5 ( HDF5Handle handle,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_domain,
const Real a_dx,
const Real a_dt,
const Real a_time,
const Vector< int > &  a_vectRatio,
const int &  a_numLevels,
const RealVect a_origin = RealVect::Zero,
const Interval a_comps = Interval() 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is not blocking.

Parameters
handlehandle to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out
a_originphysical coordinates of lower corner of cell at IntVect 0
a_compsInterval of components to be written

◆ WriteAnisotropicAMRHierarchyHDF5() [2/2]

void WriteAnisotropicAMRHierarchyHDF5 ( HDF5Handle handle,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_domain,
const RealVect a_dx,
const Real a_dt,
const Real a_time,
const Vector< IntVect > &  a_vectRatios,
const int &  a_numLevels,
const RealVect a_origin = RealVect::Zero,
const Interval a_comps = Interval() 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is not blocking.

Parameters
handlehandle to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_vectRatiosrefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out
a_originphysical coordinates of lower corner of cell at IntVect 0
a_compsInterval of components to be written

◆ WriteAMRHierarchyHDF5() [4/5]

void WriteAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Box a_domain,
const Vector< int > &  a_vectRatio,
const int &  a_numLevels 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_domaindomain at coarsest level
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out

◆ WriteAMRHierarchyHDF5() [5/5]

void WriteAMRHierarchyHDF5 ( HDF5Handle handle,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
const Box a_domain,
const Vector< int > &  a_vectRatio,
const int &  a_numLevels 
)

Writes hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation.

This is not blocking.

Parameters
handlehandle to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_domaindomain at coarsest level
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to write out

◆ ReadAMRHierarchyHDF5() [1/4]

int ReadAMRHierarchyHDF5 ( const string &  filename,
Vector< DisjointBoxLayout > &  a_vectGrids,
Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
Vector< string > &  a_vectNames,
Box a_domain,
Real a_dx,
Real a_dt,
Real a_time,
Vector< int > &  a_refRatio,
int &  a_numLevels,
bool  a_setGhost = false 
)

Reads hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation. Returns 0 on success.

Returns status code with values:

  • 0: success
  • -1: bogus number of levels
  • -2: bogus number of components
  • -3: error in readlevel
  • -4: file open failed

This is blocking.

Parameters
filenamefile to read input from
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_refRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to read in

◆ ReadAMRHierarchyHDF5() [2/4]

int ReadAMRHierarchyHDF5 ( HDF5Handle handle,
Vector< DisjointBoxLayout > &  a_vectGrids,
Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
Vector< string > &  a_vectNames,
Box a_domain,
Real a_dx,
Real a_dt,
Real a_time,
Vector< int > &  a_refRatio,
int &  a_numLevels,
bool  a_setGhost = false 
)

Reads hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation. Returns 0 on success.

Returns status code with values:

  • 0: success
  • -1: bogus number of levels
  • -2: bogus number of components
  • -3: error in readlevel
  • -4: file open failed

This is not blocking.

Parameters
handlehandle to read input from
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_domaindomain at coarsest level
a_dxgrid spacing at coarsest level
a_dttime step at coarsest level
a_timetime
a_refRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to read in

◆ ReadAMRHierarchyHDF5() [3/4]

int ReadAMRHierarchyHDF5 ( const string &  filename,
Vector< DisjointBoxLayout > &  a_vectGrids,
Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
Box a_domain,
Vector< int > &  a_refRatio,
int &  a_numLevels,
bool  a_setGhost = false 
)

Reads hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation. Returns 0 on success.

Returns status code with values:

  • 0: success
  • -1: bogus number of levels
  • -2: bogus number of components
  • -3: error in readlevel
  • -4: file open failed

This is blocking.

Parameters
filenamefile to read input from
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_domaindomain at coarsest level
a_refRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to read in

◆ ReadAMRHierarchyHDF5() [4/4]

int ReadAMRHierarchyHDF5 ( HDF5Handle handle,
Vector< DisjointBoxLayout > &  a_vectGrids,
Vector< LevelData< NodeFArrayBox > * > &  a_vectData,
Box a_domain,
Vector< int > &  a_refRatio,
int &  a_numLevels,
bool  a_setGhost = false 
)

Reads hierarchy of levels in HDF5 format. Only available if the preprocessor macro HDF5 is defined at compilation. Returns 0 on success.

Returns status code with values:

  • 0: success
  • -1: bogus number of levels
  • -2: bogus number of components
  • -3: error in readlevel
  • -4: file open failed

This is not blocking.

Parameters
handlehandle to input from
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_domaindomain at coarsest level
a_refRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_numLevelsnumber of levels to read in

◆ writeNFAB()

void writeNFAB ( const NodeFArrayBox a_dataPtr)

Writes a plotfile using the same format as WriteAMRHierarchyHDF5, but for a NodeFArrayBox. This is useful for debugging. a_dataPtr is written to a file named nfab.hdf5

Referenced by InitWriteFAB().

◆ viewNFAB()

void viewNFAB ( const NodeFArrayBox a_dataPtr)

View *a_dataPtr by writing it to an HDF5 plotfile (to a temporary file) and then running ChomboVis with a python script which brings up a data browser by default. The file has the same format as WriteAMRHierarchyHDF5, but for a single NodeFArrayBox. This is useful for debugging.

Referenced by InitWriteFAB().

◆ writeNFABname()

void writeNFABname ( const NodeFArrayBox a_dataPtr,
const char *  a_filename 
)

Writes a plotfile using the same format as WriteAMRHierarchyHDF5, but for a NodeFArrayBox. This is useful for debugging. a_dataPtr is written to the file given by a_filename.

Referenced by InitWriteFAB().

◆ writeNodeLevel()

void writeNodeLevel ( const LevelData< NodeFArrayBox > *  a_dataPtr)

Write a plotfile using the same format as WriteAMRHierarchyHDF5, but for a single LevelData<NodeFArrayBox>. Useful for debugging. a_dataPtr is written to a file named LDF.hdf5.

Referenced by InitWriteFAB().

◆ viewNodeLevel()

void viewNodeLevel ( const LevelData< NodeFArrayBox > *  a_dataPtr)

View *a_dataPtr by writing it to an HDF5 plotfile (to a temporary file) and then running ChomboVis with a python script which brings up a data browser by default. The file has the same format as WriteAMRHierarchyHDF5, but for a single LevelData<NodeFArrayBox>. This is useful for debugging.

Referenced by InitWriteFAB().

◆ writeNodeLevelname()

void writeNodeLevelname ( const LevelData< NodeFArrayBox > *  a_dataPtr,
const char *  a_filename 
)

Write a plotfile using the same format as WriteAMRHierarchyHDF5, but for a single LevelData<FArrayBox>. Useful for debugging. a_dataPtr is written to the file given by a_filename.

Referenced by InitWriteFAB().

◆ WritePartialAMRHierarchyHDF5() [1/2]

void WritePartialAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< LevelData< FArrayBox > * > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_baseDomain,
const Real a_baseDx,
const Real a_dt,
const Real a_time,
const Vector< int > &  a_vectRatio,
const Interval a_levels 
)

Write a plotfile with levels that don't necessarily begin with 0 (will translate things so that base level comes out as level 0, etc.). Levels in Vector arguments should correspond with actual levels, and so should be defined for a_levels.begin() through a_levels.end().

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by level
a_vectNamesnames of variables in a_vectData
a_baseDomaindomain at base level given by a_levels.begin()
a_baseDxgrid spacing at base level
a_dttime step at base level
a_timetime
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_levelsindices of levels to write out

◆ WritePartialAMRHierarchyHDF5() [2/2]

void WritePartialAMRHierarchyHDF5 ( const string &  filename,
const Vector< DisjointBoxLayout > &  a_vectGrids,
const Vector< Vector< LevelData< NodeFArrayBox > * > > &  a_vectData,
const Vector< string > &  a_vectNames,
const Box a_baseDomain,
const Real a_baseDx,
const Real a_dt,
const Real a_time,
const Vector< int > &  a_vectRatio,
const Interval a_levels 
)

Write a plotfile with levels that don't necessarily begin with 0 (will translate things so that base level comes out as level 0, etc.). Levels in Vector arguments should correspond with actual levels, and so should be defined for a_levels.begin() through a_levels.end().

This function differs from the previous one in that a_vectData[ind][lev] indexes a LevelData<NodeFArrayBox>* (which may have several components) at level lev.

This is blocking.

Parameters
filenamefile to send output to
a_vectGridsgrids at each level
a_vectDatadata indexed by set and then by level
a_vectNamesnames of variables in a_vectData
a_baseDomaindomain at base level given by a_levels.begin()
a_baseDxgrid spacing at base level
a_dttime step at base level
a_timetime
a_vectRatiorefinement ratios between adjacent levels, starting with a_refRatio[0], the refinement ratio between levels 0 and 1; Vector length at least a_numLevels-1
a_levelsindices of levels to write out