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

This class provides an interface to the Eleven geometry library by Kyle Chand in CASC. The shapes over which the embedded boundary is cut is defined through an XML database, the name of which is specified in the input file.
More...

#include <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
 

Private Member Functions

void getFromInput (tbox::Pointer< tbox::Database > db)
 

Private Attributes

std::string d_object_name
 

Detailed Description

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

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
*   }
* 
See also
appu::EmbeddedBoundaryGeometry
appu::CutCell

Constructor & Destructor Documentation

◆ ElevenPatchInterface()

template<int DIM>
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

Parameters
object_namename of object of this class
input_dbthe input database which contains radius and center specification.

◆ ~ElevenPatchInterface()

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

The destructor does nothing.

Member Function Documentation

◆ calculateCutCellInfo()

template<int DIM>
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.

◆ isInside() [1/2]

template<int DIM>
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.

Parameters
xyzdouble array[DIM] specifying coordinates.

◆ isInside() [2/2]

template<int DIM>
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

Parameters
nxinteger array [DIM] specifying number of points in each dir
dxdouble array [DIM] specifying spacing of points in each dir
origindouble array [DIM] specifying origin of lower corner
inoutint array dimensioned the total number of points (i.e. nx[0]*nx[1]*nx[2]). This is an OUTPUT quantity.

◆ printClassData()

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

Dump data to supplied stream.

◆ getFromInput()

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

Member Data Documentation

◆ d_object_name

template<int DIM>
std::string SAMRAI::appu::ElevenPatchInterface< DIM >::d_object_name
private

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