SAMRAI::appu::EmbeddedBoundaryShapePolygon< DIM > Class Template Reference

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

#include <source/apputils/embedded_boundary/EmbeddedBoundaryShapePolygon.h>

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

 EmbeddedBoundaryShapePolygon (const std::string &object_name, tbox::Pointer< tbox::Database > input_db)
 ~EmbeddedBoundaryShapePolygon ()
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

Detailed Description

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

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

The user must specify at least three coordinates that define the vertices the poly. If the problem is 3D, a height must also be specified. An example input entry would look like:

 *        Polygon1{
 *           type = "POLYGON"
 *           coords_1 = 1.0 , 1.0
 *           coords_2 = 2.0 , 1.0
 *           coords_3 = 2.0 , 2.0
 *           coords_4 = 1.0 , 2.0
 *           height = 8.0
 *        }
 * 


Constructor & Destructor Documentation

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

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::EmbeddedBoundaryShapePolygon< DIM >::~EmbeddedBoundaryShapePolygon< DIM > (  ) 

The destructor does nothing.


Member Function Documentation

template<int DIM>
bool SAMRAI::appu::EmbeddedBoundaryShapePolygon< DIM >::isInside ( const double *  xyz  )  const [inline, virtual]

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

Parameters:
xyz double array[DIM] specifying coordinates.

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

template<int DIM>
void SAMRAI::appu::EmbeddedBoundaryShapePolygon< 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 EmbeddedBoundaryShapeX base class. This method indicates whether the array of xyz coordinates are inside or outside of the polygon.

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::EmbeddedBoundaryShapePolygon< DIM >::printClassData ( std::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 Thu Jun 18 11:28:21 2009 for SAMRAI by  doxygen 1.5.1