https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SecondaryNeighborhoodThread.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// MOOSE includes
13#include "MooseTypes.h"
14#include "NearestNodeLocator.h"
15#include "KDTree.h"
16
17// Forward declarations
18class MooseMesh;
20class KDTree;
21
23{
24public:
26
28 const MooseMesh & mesh,
29 const std::vector<dof_id_type> & trial_primary_nodes,
30 const std::unordered_map<dof_id_type, std::vector<dof_id_type>> & node_to_elem_map,
31 const unsigned int patch_size,
33
36
37 void operator()(const NodeIdRange & range);
38
39 void join(const SecondaryNeighborhoodThread & other);
40
42 std::vector<dof_id_type> _secondary_nodes;
43
45 std::map<dof_id_type, std::vector<dof_id_type>> _neighbor_nodes;
46
48 std::set<dof_id_type> _ghosted_elems;
49
50protected:
53
55 const std::vector<dof_id_type> & _trial_primary_nodes;
56
58 const std::unordered_map<dof_id_type, std::vector<dof_id_type>> & _node_to_elem_map;
59
61 unsigned int _patch_size;
62};
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around.
std::set< dof_id_type > _ghosted_elems
Elements that we need to ghost.
const std::vector< dof_id_type > & _trial_primary_nodes
Nodes to search against.
void operator()(const NodeIdRange &range)
Save a patch of nodes that are close to each of the secondary nodes to speed the search algorithm TOD...
const std::unordered_map< dof_id_type, std::vector< dof_id_type > > & _node_to_elem_map
Node to elem map.
std::map< dof_id_type, std::vector< dof_id_type > > _neighbor_nodes
The neighborhood nodes associated with each node.
unsigned int _patch_size
The number of nodes to keep.
void join(const SecondaryNeighborhoodThread &other)
std::vector< dof_id_type > _secondary_nodes
List of the secondary nodes we're actually going to keep track of.