18 #include "libmesh/numeric_vector.h" 19 #include "libmesh/quadrature.h" 30 "An object that prepares MOOSE for computing nodal normal vectors. This object is " 31 "automatically created via the \\[NodalNormals\\] input block.");
33 "surface_boundary",
"The list of boundary IDs where nodal normals are computed");
34 params.
addParam<BoundaryName>(
"corner_boundary",
35 "Node set ID which contains the nodes that are in 'corners'.");
49 const std::vector<BoundaryID> & boundary_ids2)
51 for (
auto id1 : boundary_ids1)
56 for (
auto id2 : boundary_ids2)
65 _aux(_fe_problem.getAuxiliarySystem()),
66 _fe_type(getParam<
Order>(
"fe_order"), getParam<
FEFamily>(
"fe_family")),
67 _has_corners(isParamValid(
"corner_boundary")),
68 _boundaries(_mesh.
getBoundaryIDs(getParam<
std::vector<BoundaryName>>(
"surface_boundary"))),
69 _corner_boundary_id(_has_corners
70 ? _mesh.
getBoundaryID(getParam<BoundaryName>(
"corner_boundary"))
72 _grad_phi(_assembly.feGradPhi<
Real>(_fe_type))
93 BoundaryInfo & boundary_info =
_mesh.
getMesh().get_boundary_info();
96 std::vector<BoundaryID> node_boundary_ids;
108 boundary_info.boundary_ids(node, node_boundary_ids);
154 for (
unsigned int qp = 0; qp <
_qrule->n_points(); qp++)
std::vector< BoundaryID > _boundaries
static std::mutex _nodal_normals_mutex
NumericVector< Number > & solution()
bool isBoundaryNode(dof_id_type node_id) const
Returns true if the requested node is in the list of boundary nodes, false otherwise.
unsigned int number() const
Get variable number coming from libMesh.
static InputParameters validParams()
registerMooseObject("MooseApp", NodalNormalsPreprocessor)
An ElementUserObject that prepares MOOSE for computing nodal normals.
virtual void finalize() override
Finalize.
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const VariablePhiGradient & _grad_phi
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
Gets the boundary ID associated with the given BoundaryName.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
void zero_variable(NumericVector< Number > &v, unsigned int var_num) const
boundary_id_type BoundaryID
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
Gets the boundary IDs with their names.
unsigned int number() const
Gets the number of this system.
BoundaryID _corner_boundary_id
AuxiliarySystem & _aux
Forces object to be stored as a block object.
NodalNormalsPreprocessor(const InputParameters ¶meters)
virtual void execute() override
Execute method.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
The current element pointer (available during execute())
bool hasBoundary(const std::vector< BoundaryID > &boundary_ids1, const std::vector< BoundaryID > &boundary_ids2)
Local function to check to see if any intersection occurs between two vectors.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
const MooseArray< Real > & _JxW
const THREAD_ID _tid
Thread ID of this postprocessor.
virtual libMesh::System & system() override
Get the reference to the libMesh system.
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
virtual void add(const numeric_index_type i, const Number value)=0
static InputParameters validParams()
const BoundaryID ANY_BOUNDARY_ID