#include <source/apputils/embedded_boundary/EmbeddedBoundaryShape.h>
Inheritance diagram for SAMRAI::appu::EmbeddedBoundaryShape< DIM >:
Public Member Functions | |
EmbeddedBoundaryShape () | |
virtual | ~EmbeddedBoundaryShape () |
virtual bool | isInside (const double *xyz) const |
virtual void | isInside (const int *nx, const double *dx, const double *origin, int *inout) const |
virtual void | printClassData (std::ostream &os) const =0 |
SAMRAI::appu::EmbeddedBoundaryShape< DIM >::EmbeddedBoundaryShape | ( | ) |
The constructor and destructor essentially do nothing.
SAMRAI::appu::EmbeddedBoundaryShape< DIM >::~EmbeddedBoundaryShape< DIM > | ( | ) | [virtual] |
bool SAMRAI::appu::EmbeddedBoundaryShape< DIM >::isInside | ( | const double * | xyz | ) | const [virtual] |
Virtual implementation of the isInside() method. The class that inherets from this base class must provide an implementation of this function, specifying whether the supplied xyz coordinates are inside or outside of the particular shape being defined.
xyz | double array dimension [DIM], specifying the location of a single point. |
Reimplemented in SAMRAI::appu::EmbeddedBoundaryShapePolygon< DIM >, and SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >.
void SAMRAI::appu::EmbeddedBoundaryShape< DIM >::isInside | ( | const int * | nx, | |
const double * | dx, | |||
const double * | origin, | |||
int * | inout | |||
) | const [virtual] |
Same implementation as above, but instead takes an array of points. Unlike the method above, which returns a boolean for a single point, this method sets an integer for any array of points layed out in a patch. The "nx" argument specifies the dimension of the array of points in DIM directions - it should be an int dimensioned [DIM]. The "dx" argument specifies the grid spacing in each direction - it should be a double dimensioned DIM. The "origin" argument specifies the origin, or lower corner of the patch - it also should be a double dimensioned DIM. From these three pieces of information, the coordinates of all points on the patch can be computed.
The "inout" argument is the returned integer array which will contain a definition of whether each point on the patch is inside (1) or outside (0) the geometry.
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 in SAMRAI::appu::EmbeddedBoundaryShapePolygon< DIM >, and SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >.
virtual void SAMRAI::appu::EmbeddedBoundaryShape< DIM >::printClassData | ( | std::ostream & | os | ) | const [pure virtual] |
Dump data to supplied stream.
Implemented in SAMRAI::appu::EmbeddedBoundaryShapePolygon< DIM >, and SAMRAI::appu::EmbeddedBoundaryShapeSphere< DIM >.