libMesh
|
Represents a plane constraint defined by a point and normal vector. More...
#include <variational_smoother_constraint.h>
Public Member Functions | |
PlaneConstraint ()=default | |
PlaneConstraint (const Point &point, const Point &normal, const Real &tol=TOLERANCE *TOLERANCE) | |
Constructor. More... | |
bool | operator< (const PlaneConstraint &other) const |
Comparison operator for ordering PlaneConstraint objects. More... | |
bool | operator== (const PlaneConstraint &other) const |
Equality operator. More... | |
bool | contains_point (const PointConstraint &p) const |
Query whether a point lies on the plane. More... | |
bool | contains_line (const LineConstraint &l) const |
Query whether a line lies on the plane. More... | |
bool | is_parallel (const PlaneConstraint &p) const |
Query whether a plane is parallel to this plane. More... | |
bool | is_parallel (const LineConstraint &l) const |
Query whether a line is parallel to this plane. More... | |
ConstraintVariant | intersect (const ConstraintVariant &other) const |
Computes the intersection of this plane with another constraint. More... | |
const Point & | point () const |
Const getter for the _point attribute. More... | |
const Point & | normal () const |
Const getter for the _normal attribute. More... | |
const Real & | tol () const |
Const getter for the _tol attribute. More... | |
Private Attributes | |
Point | _point |
A point on the constraining plane. More... | |
Point | _normal |
The direction normal to the constraining plane. More... | |
Real | _tol |
Tolerance to use for numerical comparisons. More... | |
Represents a plane constraint defined by a point and normal vector.
Definition at line 222 of file variational_smoother_constraint.h.
|
default |
libMesh::PlaneConstraint::PlaneConstraint | ( | const Point & | point, |
const Point & | normal, | ||
const Real & | tol = TOLERANCE * TOLERANCE |
||
) |
Constructor.
point | A point on the constraining plane. |
normal | the direction normal to the constraining plane. |
tol | The tolerance to use for numerical comparisons. |
Definition at line 179 of file variational_smoother_constraint.C.
References _normal, _tol, and libMesh::TypeVector< T >::norm().
bool libMesh::PlaneConstraint::contains_line | ( | const LineConstraint & | l | ) | const |
Query whether a line lies on the plane.
l | The line in question |
Definition at line 217 of file variational_smoother_constraint.C.
References _normal, _tol, contains_point(), libMesh::LineConstraint::direction(), and libMesh::LineConstraint::point().
Referenced by intersect().
bool libMesh::PlaneConstraint::contains_point | ( | const PointConstraint & | p | ) | const |
Query whether a point lies on the plane.
p | The point in question |
Definition at line 210 of file variational_smoother_constraint.C.
References _normal, _point, _tol, libMesh::PointConstraint::point(), and libMesh::Real.
Referenced by contains_line(), intersect(), and operator==().
ConstraintVariant libMesh::PlaneConstraint::intersect | ( | const ConstraintVariant & | other | ) | const |
Computes the intersection of this plane with another constraint.
Handles intersection with PlaneConstraint, LineConstraint, or PointConstraint.
other | The constraint to intersect with. |
Definition at line 224 of file variational_smoother_constraint.C.
References _normal, _point, _tol, contains_line(), contains_point(), libMesh::TypeVector< T >::cross(), is_parallel(), libMesh::libmesh_assert(), libMesh::TypeVector< T >::norm(), libMesh::PointConstraint::point(), and libMesh::Real.
bool libMesh::PlaneConstraint::is_parallel | ( | const PlaneConstraint & | p | ) | const |
Query whether a plane is parallel to this plane.
p | The plane in question |
Definition at line 203 of file variational_smoother_constraint.C.
References _normal, _tol, libMesh::TypeVector< T >::absolute_fuzzy_equals(), and normal().
Referenced by intersect().
bool libMesh::PlaneConstraint::is_parallel | ( | const LineConstraint & | l | ) | const |
Query whether a line is parallel to this plane.
l | The line in question |
Definition at line 208 of file variational_smoother_constraint.C.
References libMesh::LineConstraint::is_parallel().
|
inline |
Const getter for the _normal attribute.
Definition at line 301 of file variational_smoother_constraint.h.
References _normal.
Referenced by libMesh::LineConstraint::is_parallel(), is_parallel(), operator<(), and operator==().
bool libMesh::PlaneConstraint::operator< | ( | const PlaneConstraint & | other | ) | const |
Comparison operator for ordering PlaneConstraint objects.
The comparison is primarily based on the normal vector. If the normal vectors are equal (within tolerance), the tie is broken using the dot product of the normal with the point on the plane.
other | The PlaneConstraint to compare with. |
Definition at line 186 of file variational_smoother_constraint.C.
References _normal, _point, _tol, libMesh::TypeVector< T >::absolute_fuzzy_equals(), normal(), and point().
bool libMesh::PlaneConstraint::operator== | ( | const PlaneConstraint & | other | ) | const |
Equality operator.
other | The PlaneConstraint to compare with. |
Definition at line 196 of file variational_smoother_constraint.C.
References _normal, _tol, libMesh::TypeVector< T >::absolute_fuzzy_equals(), contains_point(), normal(), and point().
|
inline |
Const getter for the _point attribute.
Definition at line 296 of file variational_smoother_constraint.h.
References _point.
Referenced by operator<(), and operator==().
|
inline |
Const getter for the _tol attribute.
Definition at line 306 of file variational_smoother_constraint.h.
References _tol.
|
private |
The direction normal to the constraining plane.
Definition at line 318 of file variational_smoother_constraint.h.
Referenced by contains_line(), contains_point(), intersect(), is_parallel(), normal(), operator<(), operator==(), and PlaneConstraint().
|
private |
A point on the constraining plane.
Definition at line 313 of file variational_smoother_constraint.h.
Referenced by contains_point(), intersect(), operator<(), and point().
|
private |
Tolerance to use for numerical comparisons.
Definition at line 323 of file variational_smoother_constraint.h.
Referenced by contains_line(), contains_point(), intersect(), is_parallel(), operator<(), operator==(), PlaneConstraint(), and tol().