12 #include "libmesh/type_vector.h" 13 #include "libmesh/point.h" 14 #include "libmesh/elem.h" 24 "Removes elements lying 'above' the plane (in the direction of the normal).");
34 _point(getParam<Point>(
"point")),
38 paramError(
"normal",
"Normal vector must have a size!");
47 auto centroid = elem->vertex_average();
49 auto vec_from_plane_point = centroid -
_point;
51 auto norm = vec_from_plane_point.norm();
58 vec_from_plane_point /=
norm;
60 return vec_from_plane_point *
_normal > 0;
RealVectorValue _normal
Normal vector.
const Point & _point
Point defining the plane.
auto norm() const -> decltype(std::norm(Real()))
registerMooseObject("MooseApp", PlaneDeletionGenerator)
This class deletes elements from the mesh data structure after it has been generated or read but befo...
static InputParameters validParams()
PlaneDeletionGenerator(const InputParameters ¶meters)
static InputParameters validParams()
Deletes elements lying above a plane.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
virtual bool shouldDelete(const Elem *elem) override
Method that returns a Boolean indicating whether an element should be removed from the mesh...