#include <SecondaryNeighborhoodThread.h>
Public Member Functions | |
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) | |
SecondaryNeighborhoodThread (SecondaryNeighborhoodThread &x, Threads::split split) | |
Splitting Constructor. More... | |
void | operator() (const NodeIdRange &range) |
Save a patch of nodes that are close to each of the secondary nodes to speed the search algorithm TODO: This needs to be updated at some point in time. More... | |
void | join (const SecondaryNeighborhoodThread &other) |
Public Attributes | |
KDTree & | _kd_tree |
std::vector< dof_id_type > | _secondary_nodes |
List of the secondary nodes we're actually going to keep track of. More... | |
std::map< dof_id_type, std::vector< dof_id_type > > | _neighbor_nodes |
The neighborhood nodes associated with each node. More... | |
std::set< dof_id_type > | _ghosted_elems |
Elements that we need to ghost. More... | |
Protected Attributes | |
const MooseMesh & | _mesh |
The Mesh. More... | |
const std::vector< dof_id_type > & | _trial_primary_nodes |
Nodes to search against. More... | |
const std::map< dof_id_type, std::vector< dof_id_type > > & | _node_to_elem_map |
Node to elem map. More... | |
unsigned int | _patch_size |
The number of nodes to keep. More... | |
Definition at line 22 of file SecondaryNeighborhoodThread.h.
SecondaryNeighborhoodThread::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 at line 19 of file SecondaryNeighborhoodThread.C.
SecondaryNeighborhoodThread::SecondaryNeighborhoodThread | ( | SecondaryNeighborhoodThread & | x, |
Threads::split | split | ||
) |
Splitting Constructor.
Definition at line 34 of file SecondaryNeighborhoodThread.C.
void SecondaryNeighborhoodThread::join | ( | const SecondaryNeighborhoodThread & | other | ) |
Definition at line 175 of file SecondaryNeighborhoodThread.C.
void SecondaryNeighborhoodThread::operator() | ( | const NodeIdRange & | range | ) |
Save a patch of nodes that are close to each of the secondary nodes to speed the search algorithm TODO: This needs to be updated at some point in time.
If the hits into this data structure approach "the end" then it may be time to update
neighborSearch function takes the secondary coordinates and patch_size as input and finds the k (=patch_size) nearest neighbors to the secondary node from the trial primary node set. The indices of the nearest neighbors are stored in the array return_index.
Now see if this processor needs to keep track of this secondary and it's neighbors We're going to see if this processor owns the secondary, any of the neighborhood nodes or any of the elements connected to either set. If it does then we're going to ghost all of the elements connected to the secondary node and the neighborhood nodes to this processor. This is a very conservative approach that we might revisit later.
Definition at line 51 of file SecondaryNeighborhoodThread.C.
std::set<dof_id_type> SecondaryNeighborhoodThread::_ghosted_elems |
Elements that we need to ghost.
Definition at line 48 of file SecondaryNeighborhoodThread.h.
Referenced by join(), and operator()().
KDTree& SecondaryNeighborhoodThread::_kd_tree |
Definition at line 25 of file SecondaryNeighborhoodThread.h.
Referenced by operator()().
|
protected |
std::map<dof_id_type, std::vector<dof_id_type> > SecondaryNeighborhoodThread::_neighbor_nodes |
The neighborhood nodes associated with each node.
Definition at line 45 of file SecondaryNeighborhoodThread.h.
Referenced by join(), and operator()().
|
protected |
Node to elem map.
Definition at line 58 of file SecondaryNeighborhoodThread.h.
Referenced by operator()().
|
protected |
The number of nodes to keep.
Definition at line 61 of file SecondaryNeighborhoodThread.h.
Referenced by operator()().
std::vector<dof_id_type> SecondaryNeighborhoodThread::_secondary_nodes |
List of the secondary nodes we're actually going to keep track of.
Definition at line 42 of file SecondaryNeighborhoodThread.h.
Referenced by join(), and operator()().
|
protected |
Nodes to search against.
Definition at line 55 of file SecondaryNeighborhoodThread.h.
Referenced by operator()().