Chombo + EB + MF  3.2
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
AMRDataFileIF Class Reference

#include <AMRDataFileIF.H>

Inheritance diagram for AMRDataFileIF:
Inheritance graph
[legend]

Public Member Functions

 AMRDataFileIF (const char *const a_filename, const Real &a_value, const bool &a_inside, const bool &a_useCubicInterp=false)
 
 AMRDataFileIF (const AMRDataFileIF &a_inputIF)
 Copy constructor. More...
 
 AMRDataFileIF (const RefCountedPtr< Vector< LevelData< FArrayBox > * > > a_real_data, const RefCountedPtr< BaseFab< unsigned char > > a_char_data, const Real &a_noDataValue, const Box &a_baseDomain, const Vector< RealVect > &a_spacing, const RealVect &a_origin, const Vector< int > &a_refRatio, const Real &a_value, const bool &a_inside, const bool &a_useCubicInterp=false)
 
virtual ~AMRDataFileIF ()
 Destructor. More...
 
virtual void GetHeader (Box &a_baseDomain, Vector< RealVect > &a_vectDx, RealVect &a_origin) const
 
virtual void GetParams (Real &a_value, bool &a_inside, bool &a_useCubicInterp) const
 
virtual void SetParams (const Real &a_value, const bool &a_inside, const bool &a_useCubicInterp=false)
 
virtual void SetNoDataValue (const Real &a_value)
 
virtual Real value (const RealVect &a_point) const
 
virtual Real value (const IndexTM< Real, GLOBALDIM > &a_point) const
 
virtual Real value (const IndexTM< int, GLOBALDIM > &a_partialDerivative, const IndexTM< Real, GLOBALDIM > &a_point) const
 
virtual BaseIFnewImplicitFunction () const
 
void GetFullHeader (Box &a_baseDomain, Vector< RealVect > &a_vectDx, RealVect &a_origin)
 
RefCountedPtr< FArrayBoxGetRealData (void)
 
RefCountedPtr< BaseFab< unsigned char > > GetCharData (void)
 
- Public Member Functions inherited from BaseIF
 BaseIF ()
 Default constructor. More...
 
virtual ~BaseIF ()
 Default destructor. More...
 
virtual IndMomSpaceDim getExactVolumeMoments (const VolIndex &a_vof, const Real &a_dx) const
 return int x^p dV for the vof More...
 
virtual IndMomSpaceDim getExactEBMoments (const VolIndex &a_vof, const Real &a_dx) const
 return int_eb x^p dA for the eb More...
 
virtual IndMomSpaceDim getExactEBNormalMoments (const VolIndex &a_vof, const Real &a_dx, const int &a_ni) const
 return int_eb x^p n_i dA for the eb More...
 
virtual IndMomSpaceDim getExactEBNormalPartialDerivs (const VolIndex &a_vof, const Real &a_dx, const int &a_ni) const
 
virtual IndMomSDMinOne getExactFaceMoments (const FaceIndex &a_face, const Real &a_dx) const
 return int x^p dA for the face More...
 
virtual Real derivative (const IntVect &a_deriv, const RealVect &a_point) const
 return the partial derivative at the point More...
 
virtual Real value (const IntVect &a_deriv, const RealVect &a_point) const
 
virtual bool fastIntersection (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual bool fastIntersection (const RealVect &a_low, const RealVect &a_high) const
 
virtual GeometryService::InOut InsideOutside (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual GeometryService::InOut InsideOutside (const RealVect &a_low, const RealVect &a_high) const
 
virtual Real derivative (const IndexTM< int, GLOBALDIM > &a_deriv, const IndexTM< Real, GLOBALDIM > &a_point) const
 
virtual void print (ostream &out) const
 
virtual void makeGrids (const ProblemDomain &a_domain, DisjointBoxLayout &a_grids, const int &a_maxGridSize, const int &a_maxIrregGridSize)
 
virtual void boxLayoutChanged (const DisjointBoxLayout &a_newBoxLayout, const RealVect &a_dx)
 

Protected Member Functions

void ReadData (Real &a_maxValue, const char *const a_filename)
 
void MakeCorners (void)
 

Protected Attributes

Box m_baseDomain
 
Vector< RealVectm_vectDx
 
RealVect m_origin
 
Real m_value
 
bool m_inside
 
Vector< int > m_refRatio
 
int m_numLevels
 
RefCountedPtr< Vector< LevelData< FArrayBox > *> > m_real_data
 
RefCountedPtr< BaseFab< unsigned char > > m_char_data
 
Real m_noDataValue
 
IntVectSet m_cornersLinear
 
IntVectSet m_cornersCubic
 
bool m_useCubicInterp
 

Private Member Functions

 AMRDataFileIF ()
 
void operator= (const AMRDataFileIF &a_inputIF)
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseIF
static void corners (const Box &a_region, const RealVect &a_origin, const Real &a_dx, RealVect &a_lo, RealVect &a_hi)
 

Detailed Description

This implicit function reads data from a Chombo AMR HDF5 file and produces function values from the data read. The data lies on an AMR hierarchy of rectilinear grids specified in the file. Function values within the data region are obtained using trilinear interpolation. Function values outside the data region are the maximum value of the data read.

Constructor & Destructor Documentation

◆ AMRDataFileIF() [1/4]

AMRDataFileIF::AMRDataFileIF ( const char *const  a_filename,
const Real a_value,
const bool &  a_inside,
const bool &  a_useCubicInterp = false 
)

Constructor specifying filename (a_filename), level set value (a_value), and whether inside the domain is where data is less than the level set value (a_inside). Data is read from the file named, which must be a Chombo AMR HDF5 file.

◆ AMRDataFileIF() [2/4]

AMRDataFileIF::AMRDataFileIF ( const AMRDataFileIF a_inputIF)

Copy constructor.

◆ AMRDataFileIF() [3/4]

AMRDataFileIF::AMRDataFileIF ( const RefCountedPtr< Vector< LevelData< FArrayBox > * > >  a_real_data,
const RefCountedPtr< BaseFab< unsigned char > >  a_char_data,
const Real a_noDataValue,
const Box a_baseDomain,
const Vector< RealVect > &  a_spacing,
const RealVect a_origin,
const Vector< int > &  a_refRatio,
const Real a_value,
const bool &  a_inside,
const bool &  a_useCubicInterp = false 
)

This is used by the factory (see below) to create a new object. All objects created in this way share a refcounted pointer to their data.

Constructor specifying a refcounted pointer to the data (a_real_data or a_char_data), the no data value (a_noDataValue), the spacing (a_spacing), the physical origin (a_origin), the number of grid points in each direction (a_num), a level set value (a_value), and whether inside the domain is where data is less than the level set value (a_inside).

◆ ~AMRDataFileIF()

virtual AMRDataFileIF::~AMRDataFileIF ( )
virtual

Destructor.

◆ AMRDataFileIF() [4/4]

AMRDataFileIF::AMRDataFileIF ( )
inlineprivate

References MayDay::Abort().

Member Function Documentation

◆ GetHeader()

virtual void AMRDataFileIF::GetHeader ( Box a_baseDomain,
Vector< RealVect > &  a_vectDx,
RealVect a_origin 
) const
virtual

Return the header information

◆ GetParams()

virtual void AMRDataFileIF::GetParams ( Real a_value,
bool &  a_inside,
bool &  a_useCubicInterp 
) const
virtual

Return the parameter information

◆ SetParams()

virtual void AMRDataFileIF::SetParams ( const Real a_value,
const bool &  a_inside,
const bool &  a_useCubicInterp = false 
)
virtual

Set the parameter information

◆ SetNoDataValue()

virtual void AMRDataFileIF::SetNoDataValue ( const Real a_value)
virtual

value to use when we are outside

◆ value() [1/3]

virtual Real AMRDataFileIF::value ( const RealVect a_point) const
virtual

Return the value of the function at a_point using trilinear interpolation of the data. If a_point is outside the data then return the maximum data value.

Implements BaseIF.

◆ value() [2/3]

virtual Real AMRDataFileIF::value ( const IndexTM< Real, GLOBALDIM > &  a_point) const
virtual

Return the value of the function at a_point (of type INdexTM).

Reimplemented from BaseIF.

◆ value() [3/3]

virtual Real AMRDataFileIF::value ( const IndexTM< int, GLOBALDIM > &  a_partialDerivative,
const IndexTM< Real, GLOBALDIM > &  a_point 
) const
virtual

Reimplemented from BaseIF.

◆ newImplicitFunction()

virtual BaseIF* AMRDataFileIF::newImplicitFunction ( ) const
virtual

Return a newly allocated derived class. The responsibility for deleting the memory is left to the calling function.

Implements BaseIF.

◆ GetFullHeader()

void AMRDataFileIF::GetFullHeader ( Box a_baseDomain,
Vector< RealVect > &  a_vectDx,
RealVect a_origin 
)
inline

References m_baseDomain, m_origin, and m_vectDx.

◆ GetRealData()

RefCountedPtr<FArrayBox> AMRDataFileIF::GetRealData ( void  )
inline

References m_real_data.

◆ GetCharData()

RefCountedPtr<BaseFab<unsigned char> > AMRDataFileIF::GetCharData ( void  )
inline

◆ ReadData()

void AMRDataFileIF::ReadData ( Real a_maxValue,
const char *const  a_filename 
)
protected

Referenced by GetCharData().

◆ MakeCorners()

void AMRDataFileIF::MakeCorners ( void  )
protected

Referenced by GetCharData().

◆ operator=()

void AMRDataFileIF::operator= ( const AMRDataFileIF a_inputIF)
inlineprivate

References MayDay::Abort().

Member Data Documentation

◆ m_baseDomain

Box AMRDataFileIF::m_baseDomain
protected

Referenced by GetFullHeader().

◆ m_vectDx

Vector<RealVect> AMRDataFileIF::m_vectDx
protected

Referenced by GetFullHeader().

◆ m_origin

RealVect AMRDataFileIF::m_origin
protected

Referenced by GetFullHeader().

◆ m_value

Real AMRDataFileIF::m_value
protected

◆ m_inside

bool AMRDataFileIF::m_inside
protected

◆ m_refRatio

Vector<int> AMRDataFileIF::m_refRatio
protected

◆ m_numLevels

int AMRDataFileIF::m_numLevels
protected

◆ m_real_data

RefCountedPtr<Vector<LevelData<FArrayBox>* > > AMRDataFileIF::m_real_data
protected

Referenced by GetRealData().

◆ m_char_data

RefCountedPtr<BaseFab<unsigned char> > AMRDataFileIF::m_char_data
protected

Referenced by GetCharData().

◆ m_noDataValue

Real AMRDataFileIF::m_noDataValue
protected

◆ m_cornersLinear

IntVectSet AMRDataFileIF::m_cornersLinear
protected

◆ m_cornersCubic

IntVectSet AMRDataFileIF::m_cornersCubic
protected

◆ m_useCubicInterp

bool AMRDataFileIF::m_useCubicInterp
protected

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