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

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

List of all members.

Public Member Functions

 CubesPatchInterface (const std::string &object_name, tbox::Pointer< tbox::Database > input_db, tbox::Pointer< geom::CartesianGridGeometry< DIM > > grid_geom, hier::IntVector< DIM > nghosts)
virtual ~CubesPatchInterface ()
void calculateCutCellInfo (tbox::Pointer< hier::Patch< DIM > > &patch, const int cell_flag_data_id, const int cell_vol_data_id, const int cutcell_data_id)
void setRecordAreasAndNormal (const bool record_an)
virtual void printClassData (std::ostream &os) const
void getFromInput (tbox::Pointer< tbox::Database > db)

Public Attributes

std::string d_object_name
tbox::Pointer< tbox::Timert_cubes
tbox::Pointer< tbox::Timert_set_cutcells
tbox::Pointer< tbox::Timert_set_cutareas
bool d_record_areas_and_normal
std::string d_surf_tri_file
float d_domain_xlo [DIM]
float d_domain_xhi [DIM]
int d_domain_nx [DIM]
int d_max_levels
bool d_cubes_verbose


Detailed Description

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

This class provides an interface to the Cubes geometry library, the embedded boundary grid generator in the Cart3D package from NASA Ames (http://people.nas.nasa.gov/~aftosmis/cart3d/).

Use of this class first requires that you link with the Cubes library. The package may be obtained by filling out a license agreement at the website listed above. Next, you must specify a 'CubesPatchInterface {...}" input entry in the input for the EmbeddedBoundaryGeometry class. In this input you specify the name of the triangulated surface grid file that defines the surface geometry.

Once an instance of the class is created, SAMRAI will pass patch information to the "calculateCutCellInfo()" class whenever an embedded boundary is constructed on a new level. Cubes computes the list of cut cells on the patch and stores them as IndexData, templated on the CutCell class.

Required input keys and data types:

Optional input keys:

A sample input file entry might look like:

 * 
 *   CubesPatchInterface {
 *      surface_tri_file = "slc-rev.tri"
 *      max_levels       = 5
 *      verbose          = TRUE
 *   }
 *
 * 

See also:
appu::EmbeddedBoundaryGeometry

appu::CutCell


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::appu::CubesPatchInterface< DIM >::CubesPatchInterface ( const std::string &  object_name,
tbox::Pointer< tbox::Database input_db,
tbox::Pointer< geom::CartesianGridGeometry< DIM > >  grid_geom,
hier::IntVector< DIM >  nghosts 
)

The constructor initializes the Cubes library and optionally starts an interactive interface

Parameters:
object_name name of object of this class
input_db the input database which contains the name of the surface geometry.
grid_geom grid geometry
nghosts number of ghost cells

template<int DIM>
SAMRAI::appu::CubesPatchInterface< DIM >::~CubesPatchInterface< DIM > (  )  [virtual]

The destructor does nothing.


Member Function Documentation

template<int DIM>
void SAMRAI::appu::CubesPatchInterface< DIM >::calculateCutCellInfo ( tbox::Pointer< hier::Patch< DIM > > &  patch,
const int  cell_flag_data_id,
const int  cell_vol_data_id,
const int  cutcell_data_id 
)

Compute set of cut cells on a patch. This method makes calls to the cubes library, passing in the patch extents, and returning the set of cut cells on the patch.

Parameters:
patch pointer to a patch on a hierarchy level
cell_flag_data_id descriptor id for integer array holding cell flag. Stored on every cell of the patch, designates cell as flow, solid, or cut.
cell_vol_data_id descriptor id for double array holding volume fraction. Stored on every cell of the patch.
cutcell_data_id descriptor id for IndexData<CutCell> data.

template<int DIM>
void SAMRAI::appu::CubesPatchInterface< DIM >::setRecordAreasAndNormal ( const bool  record_an  ) 

Set whether to record areas and normal. Some calculations do not require this information. By default, it is set TRUE.

template<int DIM>
void SAMRAI::appu::CubesPatchInterface< DIM >::printClassData ( std::ostream &  os  )  const [virtual]

Dump data to supplied stream.

template<int DIM>
void SAMRAI::appu::CubesPatchInterface< DIM >::getFromInput ( tbox::Pointer< tbox::Database db  ) 


Member Data Documentation

template<int DIM>
std::string SAMRAI::appu::CubesPatchInterface< DIM >::d_object_name

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_cubes

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_set_cutcells

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_set_cutareas

template<int DIM>
bool SAMRAI::appu::CubesPatchInterface< DIM >::d_record_areas_and_normal

template<int DIM>
std::string SAMRAI::appu::CubesPatchInterface< DIM >::d_surf_tri_file

template<int DIM>
float SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_xlo[DIM]

template<int DIM>
float SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_xhi[DIM]

template<int DIM>
int SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_nx[DIM]

template<int DIM>
int SAMRAI::appu::CubesPatchInterface< DIM >::d_max_levels

template<int DIM>
bool SAMRAI::appu::CubesPatchInterface< DIM >::d_cubes_verbose


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