12#include "libmesh/elem.h"
13#include "libmesh/threads.h"
16 : _mesh(
mesh), _cache_node_blocks(cache_node_blocks)
21 : _mesh(x._mesh), _cache_node_blocks(x._cache_node_blocks)
31 if (it->second == block_id)
41 it->second.insert(block_id);
51 for (
const auto & elem : range)
53 const Elem * ip_elem = elem->interior_parent();
57 unsigned int ip_side = ip_elem->which_side_am_i(elem);
62 auto pair = std::make_pair(ip_elem,
static_cast<unsigned short int>(ip_side));
66 auto id = elem->subdomain_id();
67 if (ip_elem->neighbor_ptr(ip_side))
69 if (
mesh.subdomain_name(
id).find(
"INTERNAL_SIDE_LOWERD_SUBDOMAIN_") != std::string::npos)
74 if (
mesh.subdomain_name(
id).find(
"BOUNDARY_SIDE_LOWERD_SUBDOMAIN_") != std::string::npos)
82 const auto block_id = elem->subdomain_id();
83 for (
const auto nd : make_range(elem->n_nodes()))
85 const Node & node = *elem->node_ptr(nd);
98 for (
const auto & [node_id, block_id] : y.
_node_block)
101 for (
const auto block_id : block_ids)
subdomain_id_type SubdomainID
Fills lower-d side maps and node-to-block ownership for MooseMesh::cacheInfo().
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
const bool _cache_node_blocks
Whether node-to-block ownership has to be recorded at all.
std::unordered_map< dof_id_type, SubdomainID > _node_block
The subdomain of the elements incident on a node, for the nodes whose incident elements all agree,...
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
CacheInfoThread(MooseMesh &mesh, bool cache_node_blocks)
std::unordered_map< dof_id_type, std::set< SubdomainID > > _interface_node_blocks
The full subdomain set of the nodes whose incident elements disagree, that is the nodes on a subdomai...
void cacheNodeBlock(dof_id_type node_id, SubdomainID block_id)
Record that an element of subdomain block_id is incident on the node node_id.
std::set< SubdomainID > _lower_d_interior_blocks
std::set< SubdomainID > _lower_d_boundary_blocks
void operator()(const ConstElemRange &range)
void join(const CacheInfoThread &y)
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
const unsigned int invalid_uint