18#include "libmesh/elem.h"
30#ifdef MOOSE_KOKKOS_ENABLED
46 unsigned int comp = 0)
const;
61 virtual const dof_id_type &
getElementID(
const std::string & id_parameter_name,
62 unsigned int comp = 0)
const;
71 unsigned int comp = 0)
const;
97 return _id_mesh->maxElementID(elem_id_index);
105 return _id_mesh->minElementID(elem_id_index);
113 return _id_mesh->areElemIDsIdentical(id_name1, id_name2);
119 std::unordered_map<dof_id_type, std::set<dof_id_type>>
122 return _id_mesh->getElemIDMapping(id_name1, id_name2);
130 return _id_mesh->getAllElemIDs(elem_id_index);
138 const std::set<SubdomainID> & blks)
const
140 return _id_mesh->getElemIDsOnBlocks(elem_id_index, blks);
146 dof_id_type
getElementID(
const Elem * elem,
unsigned int elem_id_index)
const
148 if (elem_id_index == elem->n_extra_integers())
149 return elem->subdomain_id();
151 return elem->get_extra_integer(elem_id_index);
const std::string & _ei_name
Name of the object using this interface.
const InputParameters & _obj_parameters
Reference to the object's input parameters.
std::set< dof_id_type > getAllElemIDs(unsigned int elem_id_index) const
Return all the unique element IDs for an element integer with its index on the entire domain.
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping(const std::string &id_name1, const std::string &id_name2) const
Get the mapping from IDs of one extra element integer to another given the two integer names.
dof_id_type minElementID(unsigned int elem_id_index) const
Return the minimum element ID for an element integer with its index.
dof_id_type maxElementID(unsigned int elem_id_index) const
Return the maximum element ID for an element integer with its index.
bool areElemIDsIdentical(const std::string &id_name1, const std::string &id_name2) const
Whether two element integers are identical for all elements.
virtual const dof_id_type & getElementIDByName(const std::string &id_name) const
Gets an element integer with the element integer name.
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.
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 ~ElementIDInterface()
std::set< dof_id_type > getElemIDsOnBlocks(unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
Return all the unique element IDs for an extra element integer with its index on a set of subdomains.
virtual unsigned int getElementIDIndexByName(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
std::shared_ptr< MooseMesh > & _id_mesh
References to the mesh and displaced mesh (currently in the ActionWarehouse)
static InputParameters validParams()
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.
dof_id_type getElementID(const Elem *elem, unsigned int elem_id_index) const
Get an element integer for an element.
virtual const dof_id_type & getElementIDNeighborByName(const std::string &id_name) const
Gets a neighbor element integer with the element integer name.
bool hasElementID(const std::string &id_name) const
Whether mesh has an element integer with a given name.
Every object that can be built by the factory should be derived from this class.