SAMRAI::appu::CutCell< DIM > Class Template Reference

The CutCell struct holds data and methods to define a cut-cell on an irregular boundary. More...

#include <source/apputils/embedded_boundary/CutCell.h>

List of all members.

Public Member Functions

 CutCell ()
 CutCell (const pdat::CellIndex< DIM > &cut_cell)
 CutCell (const appu::CutCell< DIM > &cut_cell)
CutCellcopy (const appu::CutCell< DIM > &cut_cell)
 ~CutCell ()
pdat::CellIndex< DIM > getIndex () const
double getVolume () const
const double * getArea () const
double getArea (const int i) const
const double * getNormal () const
double getNormal (const int i) const
double getFrontArea () const
const double * getFrontCentroid () const
double getFrontCentroid (const int i) const
double getSurrVolume () const
double getNewBase (const int i, const int j) const
int getNumberOfBoundaryNodes () const
BoundaryNode< DIM > getBoundaryNode (const int i) const
double getFluxFront (const int m) const
void setVolume (const double volume)
void setArea (const double area, const int i)
void setNormal (const double normal, const int i)
void setNormal (const double *normal)
void setSurrVolume (const double surrvol)
void setFrontArea (const double area)
void setFrontCentroid (const double centroid, const int i)
void setSplit ()
void setNewBase (const double base, const int i, const int j)
void setNewBase (const double *base)
void setNewBase ()
void setFluxFront (const int m, const double front)
void setBoundaryNode (const BoundaryNode< DIM > &node)
void setBoundaryNode (const BoundaryNode< DIM > &node, const int i)
void setBoundaryNode (const pdat::NodeIndex< DIM > &node)
void printVolumeAndAreas (std::ostream &os) const
void printNormal (std::ostream &os) const
void printBoundaryNodes (std::ostream &os) const
void printAll (std::ostream &os) const
void copySourceItem (hier::Index< DIM > &index, const hier::IntVector< DIM > &src_offset, appu::CutCell< DIM > &src_item)
size_t getDataStreamSize ()
void packStream (tbox::AbstractStream &stream)
void unpackStream (tbox::AbstractStream &stream, const hier::IntVector< DIM > &offset)
void getFromDatabase (tbox::Pointer< tbox::Database > &database)
void putToDatabase (tbox::Pointer< tbox::Database > &database)

Static Public Member Functions

static void enableBoundaryNodeStorage ()
static bool boundaryNodesEnabled ()


Detailed Description

template<int DIM>
class SAMRAI::appu::CutCell< DIM >

The CutCell struct holds data and methods to define a cut-cell on an irregular boundary.

Information maintained by the struct includes the following:


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::appu::CutCell< DIM >::CutCell (  ) 

Create a new ``empty'' CutCell.

template<int DIM>
SAMRAI::appu::CutCell< DIM >::CutCell ( const pdat::CellIndex< DIM > &  cut_cell  ) 

Create a new cut cell with specified cell index.

template<int DIM>
SAMRAI::appu::CutCell< DIM >::CutCell ( const appu::CutCell< DIM > &  cut_cell  ) 

The copy constructor copies the data of the argument cell.

template<int DIM>
SAMRAI::appu::CutCell< DIM >::~CutCell (  ) 

The destructor for CutCell.


Member Function Documentation

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::enableBoundaryNodeStorage (  )  [static]

Static function to set whether storage will be allocated for boundary node information.

template<int DIM>
bool SAMRAI::appu::CutCell< DIM >::boundaryNodesEnabled (  )  [static]

Static function that returns whether storage is allocated for boundary node information.

template<int DIM>
CutCell< DIM > & SAMRAI::appu::CutCell< DIM >::copy ( const appu::CutCell< DIM > &  cut_cell  ) 

The assignment operator copies the data of the argument cell.

template<int DIM>
pdat::CellIndex< DIM > SAMRAI::appu::CutCell< DIM >::getIndex (  )  const

Returns the index (i,j,k) of the cell.

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getVolume (  )  const

Returns the volume fraction of cell.

template<int DIM>
const double * SAMRAI::appu::CutCell< DIM >::getArea (  )  const

Returns the area fraction of the cell (dimension 2*DIM) 0,1 - Xlower,Xupper 2,3 - Ylower,Yupper 4,5 - Zlower,Zupper

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getArea ( const int  i  )  const

Returns the area fraction of the cell for face i i = 0,1 - Xlower,Xupper i = 2,3 - Ylower,Yupper i = 4,5 - Zlower,Zupper

template<int DIM>
const double * SAMRAI::appu::CutCell< DIM >::getNormal (  )  const

Returns the normal vector (dimension DIM).

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getNormal ( const int  i  )  const

Returns the ith component of the normal vector.

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getFrontArea (  )  const

Returns the frontal area of exposed cut surface.

template<int DIM>
const double * SAMRAI::appu::CutCell< DIM >::getFrontCentroid (  )  const

Returns the front centroid vector (dimension DIM).

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getFrontCentroid ( const int  i  )  const

Returns the front centroid location for direction i.

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getSurrVolume (  )  const

Returns the volume of the cells surrounding the cut cell.

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getNewBase ( const int  i,
const int  j 
) const

Returns the new base with components (i,j).

template<int DIM>
int SAMRAI::appu::CutCell< DIM >::getNumberOfBoundaryNodes (  )  const

Return number of boundary nodes.

template<int DIM>
BoundaryNode< DIM > SAMRAI::appu::CutCell< DIM >::getBoundaryNode ( const int  i  )  const

Return boundary node class for location i.

template<int DIM>
double SAMRAI::appu::CutCell< DIM >::getFluxFront ( const int  m  )  const

TO BE REMOVED (eventually)

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setVolume ( const double  volume  ) 

Sets the volume fraction of cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setArea ( const double  area,
const int  i 
)

Sets the area fraction of the cell for face i i = 0,1 - Xlower,Xupper i = 2,3 - Ylower,Yupper i = 4,5 - Zlower,Zupper

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setNormal ( const double  normal,
const int  i 
)

Sets the normal vector for dimension i.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setNormal ( const double *  normal  ) 

Sets the normal vector (dimension DIM).

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setSurrVolume ( const double  surrvol  ) 

Sets the volume of the cells surrounding the cut cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setFrontArea ( const double  area  ) 

Sets the front area.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setFrontCentroid ( const double  centroid,
const int  i 
)

Sets the front centroid location for direction i.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setSplit (  ) 

Set split cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setNewBase ( const double  base,
const int  i,
const int  j 
)

Explicitly set the new base vector with components (i,j).

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setNewBase ( const double *  base  ) 

Set new base vector using supplied "base" vector.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setNewBase (  ) 

Set new base vector using cell's normal vector.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setFluxFront ( const int  m,
const double  front 
)

TO BE REMOVED (eventually)

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setBoundaryNode ( const BoundaryNode< DIM > &  node  ) 

Add the supplied boundary node to the array of boundary nodes maintained by this cut cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setBoundaryNode ( const BoundaryNode< DIM > &  node,
const int  i 
)

Overwrite index i of the boundary node array maintained by the cut cell with the supplied boundary node.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::setBoundaryNode ( const pdat::NodeIndex< DIM > &  node  ) 

Add the supplied index as an uninitialized boundary node.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::printVolumeAndAreas ( std::ostream &  os  )  const

Print volume and area data for the cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::printNormal ( std::ostream &  os  )  const

Print normal data for the cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::printBoundaryNodes ( std::ostream &  os  )  const

Print boundary nodes for the cell.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::printAll ( std::ostream &  os  )  const

Print all data in the struct.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::copySourceItem ( hier::Index< DIM > &  index,
const hier::IntVector< DIM > &  src_offset,
appu::CutCell< DIM > &  src_item 
)

The copySourceItem() method allows CutCell to be a templated data type for IndexData - i.e. IndexData<DIM,CutCell<DIM>>. In addition to this method, the other methods that must be defined are getDataStreamSize(), packStream(), unpackStream() for communication, putToDatabase(), getFromDatabase for restart. These are described below.

template<int DIM>
size_t SAMRAI::appu::CutCell< DIM >::getDataStreamSize (  ) 

The following functions enable parallel communication with CutCells. They are used in SAMRAI communication infrastructure to specify the number of bytes of data stored in each CutCell object, and to pack and unpack the data to the specified stream.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::packStream ( tbox::AbstractStream stream  ) 

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::unpackStream ( tbox::AbstractStream stream,
const hier::IntVector< DIM > &  offset 
)

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::getFromDatabase ( tbox::Pointer< tbox::Database > &  database  ) 

These functions are used to read/write CutCell data to/from restart.

template<int DIM>
void SAMRAI::appu::CutCell< DIM >::putToDatabase ( tbox::Pointer< tbox::Database > &  database  ) 


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:21 2009 for SAMRAI by  doxygen 1.5.1