20 #include "libmesh/mesh_base.h" 29 : _obj_parameters(moose_object->parameters()),
30 _id_mesh(moose_object->getMooseApp().actionWarehouse().
mesh()),
31 _ei_name(moose_object->
name())
37 unsigned int comp)
const 41 mooseError(id_parameter_name,
" does not have enough integer names");
50 mooseError(
"Mesh is not available for getting element integers");
52 auto & mesh_base =
_id_mesh->getMesh();
54 if (id_name ==
"subdomain_id")
56 if (mesh_base.has_elem_integer(id_name))
57 mooseError(
"MOOSE does not allow 'subdomain_id' element integer in a mesh. 'subdomain_id' is " 58 "reserved for element subdomain ID");
59 return mesh_base.n_elem_integers();
62 if (!mesh_base.has_elem_integer(id_name))
64 "Mesh does not have an element integer names as ", id_name,
" but required by ",
_ei_name);
66 auto id = mesh_base.get_elem_integer_index(id_name);
80 auto & assembly = _subproblem.assembly(tid, 0);
82 return assembly.extraElemID(
id);
87 unsigned int comp)
const 95 auto & assembly = _subproblem.assembly(tid, 0);
97 return assembly.extraElemIDNeighbor(
id);
109 auto & assembly = _subproblem.assembly(tid, 0);
111 return assembly.extraElemID(
id);
123 auto & assembly = _subproblem.assembly(tid, 0);
125 return assembly.extraElemIDNeighbor(
id);
std::string name(const ElemQuality q)
virtual const dof_id_type & getElementIDNeighbor(const std::string &id_parameter_name, unsigned int comp=0) const
Gets a neighbor element integer with a parameter of the object derived from this interface.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::shared_ptr< MooseMesh > & _id_mesh
References to the mesh and displaced mesh (currently in the ActionWarehouse)
virtual const dof_id_type & getElementIDNeighborByName(const std::string &id_name) const
Gets a neighbor element integer with the element integer name.
Every object that can be built by the factory should be derived from this class.
const std::string & _ei_name
Name of the object using this interface.
virtual unsigned int getElementIDIndex(const std::string &id_parameter_name, unsigned int comp=0) const
Gets index of an element integer with a parameter of the object derived from this interface...
virtual const dof_id_type & getElementIDByName(const std::string &id_name) const
Gets an element integer with the element integer name.
static InputParameters validParams()
const InputParameters & _obj_parameters
Reference to the object's input parameters.
virtual unsigned int getElementIDIndexByName(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Generic class for solving transient nonlinear problems.
virtual const dof_id_type & getElementID(const std::string &id_parameter_name, unsigned int comp=0) const
Gets an element integer with a parameter of the object derived from this interface.
ElementIDInterface(const MooseObject *moose_object)