https://mooseframework.inl.gov
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
18 class MooseMesh;
19 class NearestNodeLocator;
20 class KDTree;
21 
23 {
24 public:
26 
28  const MooseMesh & mesh,
29  const std::vector<dof_id_type> & trial_primary_nodes,
30  const std::map<dof_id_type, std::vector<dof_id_type>> & node_to_elem_map,
31  const unsigned int patch_size,
32  KDTree & _kd_tree);
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 
50 protected:
52  const MooseMesh & _mesh;
53 
55  const std::vector<dof_id_type> & _trial_primary_nodes;
56 
58  const std::map<dof_id_type, std::vector<dof_id_type>> & _node_to_elem_map;
59 
61  unsigned int _patch_size;
62 };
const std::vector< dof_id_type > & _trial_primary_nodes
Nodes to search against.
void join(const SecondaryNeighborhoodThread &other)
const std::map< dof_id_type, std::vector< dof_id_type > > & _node_to_elem_map
Node to elem map.
SecondaryNeighborhoodThread(const MooseMesh &mesh, const std::vector< dof_id_type > &trial_primary_nodes, const std::map< dof_id_type, std::vector< dof_id_type >> &node_to_elem_map, const unsigned int patch_size, KDTree &_kd_tree)
Definition: KDTree.h:28
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
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...
std::map< dof_id_type, std::vector< dof_id_type > > _neighbor_nodes
The neighborhood nodes associated with each node.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
std::set< dof_id_type > _ghosted_elems
Elements that we need to ghost.
unsigned int _patch_size
The number of nodes to keep.
tbb::split split
const MooseMesh & _mesh
The Mesh.
uint8_t dof_id_type
std::vector< dof_id_type > _secondary_nodes
List of the secondary nodes we&#39;re actually going to keep track of.