www.mooseframework.org
NearestNodeThread.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef NEARESTNODETHREAD_H
16 #define NEARESTNODETHREAD_H
17 
18 #include "NearestNodeLocator.h"
19 
21 {
22 public:
23  NearestNodeThread(const MooseMesh & mesh,
24  std::map<dof_id_type, std::vector<dof_id_type>> & neighbor_nodes);
25 
26  // Splitting Constructor
27  NearestNodeThread(NearestNodeThread & x, Threads::split split);
28 
29  void operator()(const NodeIdRange & range);
30 
31  void join(const NearestNodeThread & other);
32 
33  // This is the info map we're actually filling here
34  std::map<dof_id_type, NearestNodeLocator::NearestNodeInfo> _nearest_node_info;
35 
36  // The furthest percentage through the patch that had to be searched (indicative of needing to
37  // rebuild the patch)
39 
40 protected:
41  // The Mesh
42  const MooseMesh & _mesh;
43 
44  // The neighborhood nodes associated with each node
45  std::map<dof_id_type, std::vector<dof_id_type>> & _neighbor_nodes;
46 };
47 
48 #endif // NEARESTNODETHREAD_H
std::map< dof_id_type, std::vector< dof_id_type > > & _neighbor_nodes
StoredRange< std::vector< dof_id_type >::iterator, dof_id_type > NodeIdRange
Definition: MooseTypes.h:81
std::map< dof_id_type, NearestNodeLocator::NearestNodeInfo > _nearest_node_info
void join(const NearestNodeThread &other)
static PetscErrorCode Vec x
const MooseMesh & _mesh
NearestNodeThread(const MooseMesh &mesh, std::map< dof_id_type, std::vector< dof_id_type >> &neighbor_nodes)
void operator()(const NodeIdRange &range)
Save a patch of nodes that are close to each of the slave nodes to speed the search algorithm TODO: T...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74