DataTransferKit - Multiphysics Solution Transfer Services  2.0
Public Member Functions | Static Public Member Functions | List of all members
DataTransferKit::BoxGeometry Class Reference

Axis-aligned Cartesian box container. More...

#include <DTK_BoxGeometry.hpp>

Inheritance diagram for DataTransferKit::BoxGeometry:
DataTransferKit::BasicGeometryEntity DataTransferKit::Entity

Public Member Functions

 BoxGeometry ()
 Default constructor. More...
 
 BoxGeometry (const EntityId global_id, const int owner_rank, const int block_id, const double x_min, const double y_min, const double z_min, const double x_max, const double y_max, const double z_max)
 Constructor. More...
 
 BoxGeometry (const EntityId global_id, const int owner_rank, const int block_id, const Teuchos::Tuple< double, 6 > &bounds)
 Tuple constructor. More...
 
 ~BoxGeometry ()
 Destructor. More...
 
BoxGeometryoperator+= (const BoxGeometry &rhs)
 Compound assignment overload. More...
 
double measure () const override
 Compute the measure of the box. More...
 
void centroid (const Teuchos::ArrayView< double > &centroid) const override
 Get the centroid of the box. More...
 
bool mapToReferenceFrame (const Teuchos::ArrayView< const double > &point, const Teuchos::ArrayView< double > &reference_point) const override
 Map a point to the reference space of an entity. Return the. More...
 
bool checkPointInclusion (const double tolerance, const Teuchos::ArrayView< const double > &reference_point) const override
 Determine if a reference point is in the parameterized space of an entity. More...
 
void mapToPhysicalFrame (const Teuchos::ArrayView< const double > &reference_point, const Teuchos::ArrayView< double > &point) const override
 Map a reference point to the physical space of an entity. More...
 
- Public Member Functions inherited from DataTransferKit::Entity
 Entity ()
 Constructor. More...
 
 Entity (const Entity &rhs)
 Copy constructor. More...
 
Entityoperator= (const Entity &rhs)
 Copy assignment operator. More...
 
 Entity (Entity &&rhs)
 Move constructor. More...
 
Entityoperator= (Entity &&rhs)
 Move assignment operator. More...
 
virtual ~Entity ()
 Destructor. More...
 
EntityId id () const
 Client interface. More...
 
int ownerRank () const
 Get the parallel rank that owns the entity. More...
 
int topologicalDimension () const
 Return the topological dimension of the entity. More...
 
int physicalDimension () const
 Return the physical dimension of the entity. More...
 
void boundingBox (Teuchos::Tuple< double, 6 > &bounds) const
 Return the Cartesian bounding box around an entity. More...
 
bool inBlock (const int block_id) const
 Determine if an entity is in the block with the given id. More...
 
bool onBoundary (const int boundary_id) const
 Determine if an entity is on the boundary with the given id. More...
 
Teuchos::RCP< EntityExtraDataextraData () const
 Get the extra data on the entity. This is a convenient helper for implementing the other interfaces. More...
 
std::string description () const override
 Teuchos::Describable interface. More...
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verb_level=Teuchos::Describable::verbLevel_default) const override
 Provide a verbose description of the object. More...
 

Static Public Member Functions

static bool checkForIntersection (const BoxGeometry &box_A, const BoxGeometry &box_B)
 Static function for box intersection test. More...
 
static bool intersectBoxes (const BoxGeometry &box_A, const BoxGeometry &box_B, BoxGeometry &box_intersection)
 Static function for box intersection. Return false if they do not intersect. More...
 
static void uniteBoxes (const BoxGeometry &box_A, const BoxGeometry &box_B, BoxGeometry &box_union)
 Static function for box union. More...
 

Detailed Description

Axis-aligned Cartesian box container.

All three dimensions are explictly represented in this bounding box. This is different from a bounding box in that it must always be finite and of a fixed 3 dimensions.

Definition at line 63 of file DTK_BoxGeometry.hpp.

Constructor & Destructor Documentation

DataTransferKit::BoxGeometry::BoxGeometry ( )

Default constructor.

Definition at line 51 of file DTK_BoxGeometry.cpp.

DataTransferKit::BoxGeometry::BoxGeometry ( const EntityId  global_id,
const int  owner_rank,
const int  block_id,
const double  x_min,
const double  y_min,
const double  z_min,
const double  x_max,
const double  y_max,
const double  z_max 
)

Constructor.

Parameters
x_minMinimum x coordinate value in the box.
y_minMinimum y coordinate value in the box.
z_minMinimum z coordinate value in the box.
x_maxMaximum x coordinate value in the box.
y_maxMaximum y coordinate value in the box.
z_maxMaximum z coordinate value in the box.

Definition at line 72 of file DTK_BoxGeometry.cpp.

DataTransferKit::BoxGeometry::BoxGeometry ( const EntityId  global_id,
const int  owner_rank,
const int  block_id,
const Teuchos::Tuple< double, 6 > &  bounds 
)

Tuple constructor.

Parameters
boundsTuple containing {x_min, y_min, z_min, x_max, y_max, z_max}.

Definition at line 89 of file DTK_BoxGeometry.cpp.

DataTransferKit::BoxGeometry::~BoxGeometry ( )

Destructor.

Definition at line 101 of file DTK_BoxGeometry.cpp.

Member Function Documentation

bool DataTransferKit::BoxGeometry::checkForIntersection ( const BoxGeometry box_A,
const BoxGeometry box_B 
)
static

Static function for box intersection test.

Parameters
box_Abox A.
box_Bbox B.
Returns
Return true if the boxes intersect. False if they do not.

Definition at line 113 of file DTK_BoxGeometry.cpp.

bool DataTransferKit::BoxGeometry::intersectBoxes ( const BoxGeometry box_A,
const BoxGeometry box_B,
BoxGeometry box_intersection 
)
static

Static function for box intersection. Return false if they do not intersect.

Parameters
box_Abox A.
box_Bbox B.
boxintersection A box that is equivalent to the intersection of box A and box B. BoxGeometry A and B can be provided in any order (the intersection of box A with box B is equal to the intersection of box B with box A).
Returns
Return true if the boxes intersect. False if they do not.

Definition at line 142 of file DTK_BoxGeometry.cpp.

void DataTransferKit::BoxGeometry::uniteBoxes ( const BoxGeometry box_A,
const BoxGeometry box_B,
BoxGeometry box_union 
)
static

Static function for box union.

Parameters
box_Abox A.
box_Bbox B.
box_unitionA box that is equivalent to the union of box A and box B. BoxGeometry A and B can be provided in any order (the union of box A with box B is equal to the union of box B with box A).

Definition at line 230 of file DTK_BoxGeometry.cpp.

BoxGeometry & DataTransferKit::BoxGeometry::operator+= ( const BoxGeometry rhs)

Compound assignment overload.

Definition at line 302 of file DTK_BoxGeometry.cpp.

double DataTransferKit::BoxGeometry::measure ( ) const
overridevirtual

Compute the measure of the box.

Returns
Return the measure of the box.

Reimplemented from DataTransferKit::BasicGeometryEntity.

Definition at line 347 of file DTK_BoxGeometry.cpp.

void DataTransferKit::BoxGeometry::centroid ( const Teuchos::ArrayView< double > &  centroid) const
overridevirtual

Get the centroid of the box.

Returns
The centroid coordinates.

Reimplemented from DataTransferKit::BasicGeometryEntity.

Definition at line 359 of file DTK_BoxGeometry.cpp.

bool DataTransferKit::BoxGeometry::mapToReferenceFrame ( const Teuchos::ArrayView< const double > &  point,
const Teuchos::ArrayView< double > &  reference_point 
) const
overridevirtual

Map a point to the reference space of an entity. Return the.

Reimplemented from DataTransferKit::BasicGeometryEntity.

Definition at line 369 of file DTK_BoxGeometry.cpp.

bool DataTransferKit::BoxGeometry::checkPointInclusion ( const double  tolerance,
const Teuchos::ArrayView< const double > &  reference_point 
) const
overridevirtual

Determine if a reference point is in the parameterized space of an entity.

Reimplemented from DataTransferKit::BasicGeometryEntity.

Definition at line 382 of file DTK_BoxGeometry.cpp.

void DataTransferKit::BoxGeometry::mapToPhysicalFrame ( const Teuchos::ArrayView< const double > &  reference_point,
const Teuchos::ArrayView< double > &  point 
) const
overridevirtual

Map a reference point to the physical space of an entity.

Reimplemented from DataTransferKit::BasicGeometryEntity.

Definition at line 394 of file DTK_BoxGeometry.cpp.


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