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

Provides an analytic description of a sphere. It inherets from the EmbeddedBoundaryShape base class and provides a concrete implementation of the "isInside()" method, which specifies whether a cell is INSIDE the sphere. More...

#include <EmbeddedBoundaryShapeSphere.h>

Inheritance diagram for SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >:
Inheritance graph
[legend]

Public Member Functions

 EmbeddedBoundaryShapeSphere (const std::string &object_name, tbox::Pointer< tbox::Database > input_db)
 
 ~EmbeddedBoundaryShapeSphere ()
 
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
 
double d_center [DIM]
 
double d_radius
 

Detailed Description

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

The user must specify in the input a "center" and a "radius". An example input entry would look like:

*        Shape1 {
*           type = "SPHERE"
*           center = 40.0 , 15.0, 15.0
*           radius = 5.0
*        }

* 

Constructor & Destructor Documentation

◆ EmbeddedBoundaryShapeSphere()

template<int DIM>
SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::EmbeddedBoundaryShapeSphere ( const std::string &  object_name,
tbox::Pointer< tbox::Database input_db 
)

The constructor initializes center and radius to NaN.

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

◆ ~EmbeddedBoundaryShapeSphere()

The destructor does nothing.

Member Function Documentation

◆ isInside() [1/2]

template<int DIM>
bool SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::isInside ( const double xyz) const
virtual

Concrete implementation of the isInside() method defined by the EmbeddedBoundaryShape base class. This method indicates whether the supplied xyz coordinates are inside or outside of the sphere.

Parameters
xyzdouble array[DIM] specifying coordinates.

Reimplemented from SAMRAI::appu::EmbeddedBoundaryShape< DIM >.

◆ isInside() [2/2]

template<int DIM>
void SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::isInside ( const int nx,
const double dx,
const double origin,
int inout 
) const
virtual

Concrete implementation of the isInside() method defined by the EmbeddedBoundaryShape base class. This method indicates whether the array of xyz coordinates are inside or outside of the sphere.

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.

Reimplemented from SAMRAI::appu::EmbeddedBoundaryShape< DIM >.

◆ printClassData()

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

Dump data to supplied stream.

Implements SAMRAI::appu::EmbeddedBoundaryShape< DIM >.

◆ getFromInput()

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

Member Data Documentation

◆ d_object_name

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

◆ d_center

template<int DIM>
double SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::d_center[DIM]
private

◆ d_radius

template<int DIM>
double SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::d_radius
private

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