#include <source/apputils/embedded_boundary/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::Timer > | t_cubes |
tbox::Pointer< tbox::Timer > | t_set_cutcells |
tbox::Pointer< tbox::Timer > | t_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 |
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 * } * *
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
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 |
SAMRAI::appu::CubesPatchInterface< DIM >::~CubesPatchInterface< DIM > | ( | ) | [virtual] |
The destructor does nothing.
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.
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. |
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.
void SAMRAI::appu::CubesPatchInterface< DIM >::printClassData | ( | std::ostream & | os | ) | const [virtual] |
Dump data to supplied stream.
void SAMRAI::appu::CubesPatchInterface< DIM >::getFromInput | ( | tbox::Pointer< tbox::Database > | db | ) |
std::string SAMRAI::appu::CubesPatchInterface< DIM >::d_object_name |
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_cubes |
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_set_cutcells |
tbox::Pointer<tbox::Timer> SAMRAI::appu::CubesPatchInterface< DIM >::t_set_cutareas |
bool SAMRAI::appu::CubesPatchInterface< DIM >::d_record_areas_and_normal |
std::string SAMRAI::appu::CubesPatchInterface< DIM >::d_surf_tri_file |
float SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_xlo[DIM] |
float SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_xhi[DIM] |
int SAMRAI::appu::CubesPatchInterface< DIM >::d_domain_nx[DIM] |
int SAMRAI::appu::CubesPatchInterface< DIM >::d_max_levels |
bool SAMRAI::appu::CubesPatchInterface< DIM >::d_cubes_verbose |