Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 <source/apputils/embedded_boundary/EmbeddedBoundaryShapeSphere.h>

Inheritance diagram for SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 EmbeddedBoundaryShapeSphere (const 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
void printClassData (ostream &os) const

Detailed Description

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

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.

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

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

The constructor initializes center and radius to NaN.

Parameters:
object_name name of object of this class
input_db the input database which contains radius and center specification.

template<int DIM>
SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::~EmbeddedBoundaryShapeSphere  ) 
 

The destructor does nothing.


Member Function Documentation

template<int DIM>
bool SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::isInside const double *  xyz  )  const [inline, 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:
xyz double array[DIM] specifying coordinates.

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

template<int DIM>
void SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >::isInside const int *  nx,
const double *  dx,
const double *  origin,
int *  inout
const [inline, 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:
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.

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

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

Dump data to supplied stream.

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


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:23:31 2005 for SAMRAI by  doxygen 1.4.2