#include <source/apputils/embedded_boundary/ElevenPatchInterface.h>
Public Member Functions | |
ElevenPatchInterface (const std::string &object_name, tbox::Pointer< tbox::Database > input_db) | |
virtual | ~ElevenPatchInterface () |
void | calculateCutCellInfo (tbox::Pointer< hier::Patch< DIM > > &patch, const int cell_flag_data_id, const int cell_vol_data_id, const int node_flag_data_id, const int cutcell_data_id) |
bool | isInside (const double *xyz) const |
void | isInside (const int *nx, const double *dx, const double *origin, int *inout) const |
virtual void | printClassData (std::ostream &os) const |
Use of this class first requires that you link with the Eleven library. Next, you must specify a 'ElevenPatchInterface {...}" input entry in the input for the EmbeddedBoundaryGeometry class. In this input you specify the name of the XML database 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. The eleven interfaces may be used to compute the volume fractions through an inside/outside determination of the nodes of the cell, and also may be used to compute the distance of a particular node from the surface boundary.
Required input keys and data types:
Optional input keys:
A sample input file entry might look like:
* * ElevenPatchInterface { * database_file = "circle_r.3.gzxml" * geom_tolerance = 0.01 // 1% of bounding box * } *
SAMRAI::appu::ElevenPatchInterface< DIM >::ElevenPatchInterface | ( | const std::string & | object_name, | |
tbox::Pointer< tbox::Database > | input_db | |||
) |
The constructor initializes the eleven library and optionally starts an interactive interface
object_name | name of object of this class | |
input_db | the input database which contains radius and center specification. |
SAMRAI::appu::ElevenPatchInterface< DIM >::~ElevenPatchInterface< DIM > | ( | ) | [virtual] |
The destructor does nothing.
void SAMRAI::appu::ElevenPatchInterface< DIM >::calculateCutCellInfo | ( | tbox::Pointer< hier::Patch< DIM > > & | patch, | |
const int | cell_flag_data_id, | |||
const int | cell_vol_data_id, | |||
const int | node_flag_data_id, | |||
const int | cutcell_data_id | |||
) |
This method computes information about the cut cells on a patch.
bool SAMRAI::appu::ElevenPatchInterface< DIM >::isInside | ( | const double * | xyz | ) | const |
For a given point, specify whether that point is inside (true) or outside (false) the set of shapes.
xyz | double array[DIM] specifying coordinates. |
void SAMRAI::appu::ElevenPatchInterface< DIM >::isInside | ( | const int * | nx, | |
const double * | dx, | |||
const double * | origin, | |||
int * | inout | |||
) | const |
For a SET of nodes on a patch, with patch dimensions (number of nodes in each direction) nx[DIM], origin[DIM], and grid spacing dx[DIM], set the integer inout[nx[0]*nx[1]*nx[2]] array to specify whether nodes are inside or outside.
Node is: INSIDE - set inout[ijk] = 1 OUTSIDE - set inout[ijk] = 0
nx | integer array [DIM] specifying number of points in each dir | |
dx | double array [DIM] specifying spacing of points in each dir | |
origin | double array [DIM] specifying origin of lower corner | |
inout | int array dimensioned the total number of points (i.e. nx[0]*nx[1]*nx[2]). This is an OUTPUT quantity. |
void SAMRAI::appu::ElevenPatchInterface< DIM >::printClassData | ( | std::ostream & | os | ) | const [virtual] |
Dump data to supplied stream.