24 "The center (many people spell this 'center') of the box.");
29 "The direction along which the width is oriented.");
31 "The direction along which the length is oriented (must "
32 "be perpendicular to width_direction).");
37 : _center(parameters.get<Point>(
"center"))
42 Real xmax = 0.5 * parameters.
get<Real>(
"width");
43 Real ymax = 0.5 * parameters.
get<Real>(
"length");
44 Real zmax = 0.5 * parameters.
get<Real>(
"height");
46 Point bottom_left(-xmax, -ymax, -zmax);
47 Point top_right(xmax, ymax, zmax);
49 _bounding_box = std::make_unique<libMesh::BoundingBox>(bottom_left, top_right);
56 RealVectorValue w = parameters.
get<RealVectorValue>(
"width_direction");
57 RealVectorValue l = parameters.
get<RealVectorValue>(
"length_direction");
65 mooseError(
"Length of width_direction vector is zero in ", name);
70 mooseError(
"Length of length_direction vector is zero in ", name);
74 mooseError(
"width_direction and length_direction are not perpendicular in ", name);
77 _rot_matrix = std::make_unique<RealTensorValue>(w, l, w.cross(l));
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
OrientedBoxInterface(const InputParameters ¶meters)
std::unique_ptr< libMesh::BoundingBox > _bounding_box
The bounding box used to test if the point is contained within.
std::unique_ptr< RealTensorValue > _rot_matrix
Rotation matrix for transforming the bounding box.
Point _center
Center of the defined bounding box.
bool containsPoint(const Point &point)
Test if the supplied point is within the defined oriented bounding box.
static InputParameters validParams()
Class constructor.