73 const int block_id,
const double x_min,
74 const double y_min,
const double z_min,
75 const double x_max,
const double y_max,
78 this->b_entity_impl = Teuchos::rcp(
80 z_min, x_max, y_max, z_max ) );
91 const Teuchos::Tuple<double, 6> &bounds )
93 this->b_entity_impl = Teuchos::rcp(
116 Teuchos::Tuple<double, 6> bounds_A;
118 Teuchos::Tuple<double, 6> bounds_B;
121 return !( ( bounds_A[0] > bounds_B[3] || bounds_A[3] < bounds_B[0] ) ||
122 ( bounds_A[1] > bounds_B[4] || bounds_A[4] < bounds_B[1] ) ||
123 ( bounds_A[2] > bounds_B[5] || bounds_A[5] < bounds_B[2] ) );
152 Teuchos::Tuple<double, 6> bounds_A;
154 Teuchos::Tuple<double, 6> bounds_B;
157 double x_min, y_min, z_min, x_max, y_max, z_max;
160 if ( bounds_A[0] > bounds_B[0] )
168 if ( bounds_A[3] > bounds_B[3] )
178 if ( bounds_A[1] > bounds_B[1] )
186 if ( bounds_A[4] > bounds_B[4] )
196 if ( bounds_A[2] > bounds_B[2] )
204 if ( bounds_A[5] > bounds_B[5] )
214 x_min, y_min, z_min, x_max, y_max, z_max );
233 Teuchos::Tuple<double, 6> bounds_A;
235 Teuchos::Tuple<double, 6> bounds_B;
238 double x_min, y_min, z_min, x_max, y_max, z_max;
241 if ( bounds_A[0] < bounds_B[0] )
249 if ( bounds_A[3] < bounds_B[3] )
259 if ( bounds_A[1] < bounds_B[1] )
267 if ( bounds_A[4] < bounds_B[4] )
277 if ( bounds_A[2] < bounds_B[2] )
285 if ( bounds_A[5] < bounds_B[5] )
295 y_min, z_min, x_max, y_max, z_max );
329 Teuchos::Tuple<double, 6> bounds;
332 os <<
"BoxGeometry: d_global_id=" << b.
id()
333 <<
",d_owner_rank=" << b.
ownerRank() <<
",d_x_min=" << bounds[0]
334 <<
",d_y_min=" << bounds[1] <<
",d_z_min=" << bounds[2]
335 <<
",d_x_max=" << bounds[3] <<
",d_y_max=" << bounds[4]
336 <<
",d_z_max=" << bounds[5];
349 return Teuchos::rcp_dynamic_cast<
BoxGeometryImpl>( this->b_entity_impl )
370 const Teuchos::ArrayView<const double> &point,
371 const Teuchos::ArrayView<double> &reference_point )
const 373 return Teuchos::rcp_dynamic_cast<
BoxGeometryImpl>( this->b_entity_impl )
383 const double tolerance,
384 const Teuchos::ArrayView<const double> &reference_point )
const 386 return Teuchos::rcp_dynamic_cast<
BoxGeometryImpl>( this->b_entity_impl )
395 const Teuchos::ArrayView<const double> &reference_point,
396 const Teuchos::ArrayView<double> &point )
const ~BoxGeometry()
Destructor.
static const EntityId dtk_invalid_entity_id
Invalid entity id.
static void uniteBoxes(const BoxGeometry &box_A, const BoxGeometry &box_B, BoxGeometry &box_union)
Static function for box union.
void boundingBox(Teuchos::Tuple< double, 6 > &bounds) const
Return the Cartesian bounding box around an entity.
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.
BoxGeometry operator+(const BoxGeometry &box_1, const BoxGeometry &box_2)
Addition operator. Adding two boxes together is the same as computing their union.
int ownerRank() const
Get the parallel rank that owns the entity.
void centroid(const Teuchos::ArrayView< double > ¢roid) const override
Get the centroid of the box.
Axis-aligned Cartesian box container.
std::ostream & operator<<(std::ostream &os, const DataTransferKit::BoxGeometry &b)
Print the box description to an ostream.
Assertions and Design-by-Contract for error handling.
static bool checkForIntersection(const BoxGeometry &box_A, const BoxGeometry &box_B)
Static function for box intersection test.
BoxGeometry()
Default constructor.
BoxGeometry implementation.
unsigned long int EntityId
Entity id type.
Axis-aligned Cartesian box container implementation.
BoxGeometry & operator+=(const BoxGeometry &rhs)
Compound assignment overload.
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.
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.
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.
double measure() const override
Compute the measure of the box.
EntityId id() const
Client interface.