https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CacheInfoThread.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseMesh.h"
13#include "MooseTypes.h"
14
15#include "libmesh/elem_range.h"
16
22{
23public:
28 CacheInfoThread(MooseMesh & mesh, bool cache_node_blocks);
30
31 void operator()(const ConstElemRange & range);
32
33 void join(const CacheInfoThread & y);
34
35protected:
42 void cacheNodeBlock(dof_id_type node_id, SubdomainID block_id);
43
45
48
51 std::unordered_map<dof_id_type, SubdomainID> _node_block;
52
56 std::unordered_map<dof_id_type, std::set<SubdomainID>> _interface_node_blocks;
57
58 std::set<SubdomainID> _lower_d_interior_blocks;
59 std::set<SubdomainID> _lower_d_boundary_blocks;
60 std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *>
62 std::unordered_map<const Elem *, unsigned short int> _lower_d_elem_to_higher_d_elem_side;
63
64 friend class MooseMesh;
65};
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
MooseMesh & _mesh
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...
Definition MooseMesh.h:95
MeshBase & mesh