IBAMR  IBAMR version 0.19.
Public Member Functions | Public Attributes | List of all members
SAMRAI::appu::CubesPatchInterface< DIM > Class Template Reference

#include <CubesPatchInterface.h>

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

◆ CubesPatchInterface()

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_namename of object of this class
input_dbthe input database which contains the name of the surface geometry.
grid_geomgrid geometry
nghostsnumber of ghost cells

◆ ~CubesPatchInterface()

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

The destructor does nothing.

Member Function Documentation

◆ calculateCutCellInfo()

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
patchpointer to a patch on a hierarchy level
cell_flag_data_iddescriptor id for integer array holding cell flag. Stored on every cell of the patch, designates cell as flow, solid, or cut.
cell_vol_data_iddescriptor id for double array holding volume fraction. Stored on every cell of the patch.
cutcell_data_iddescriptor id for IndexData<CutCell> data.

◆ setRecordAreasAndNormal()

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.

◆ printClassData()

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

Dump data to supplied stream.

◆ getFromInput()

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

Member Data Documentation

◆ d_object_name

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

◆ t_cubes

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

◆ t_set_cutcells

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

◆ t_set_cutareas

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

◆ d_record_areas_and_normal

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

◆ d_surf_tri_file

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

◆ d_domain_xlo

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

◆ d_domain_xhi

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

◆ d_domain_nx

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

◆ d_max_levels

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

◆ d_cubes_verbose

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

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