36 std::vector<std::pair<Real, Real>> & outgoing_vals)
override;
41 const Elem * elem)
const override;
60 const std::vector<std::pair<Point, unsigned int>> & incoming_points,
61 std::vector<std::pair<Real, Real>> & outgoing_vals);
68 unsigned int getAppIndex(
unsigned int kdtree_index,
unsigned int app_index)
const;
88 const unsigned int valid_mesh_div,
89 const unsigned int i_from)
const;
bool inBlocks(const std::set< SubdomainID > &blocks, const MooseMesh &mesh, const Elem *elem) const override
void buildKDTrees(const unsigned int var_index)
const bool _group_subapps
Whether to group data when creating the nearest-point regions.
unsigned int getAppIndex(unsigned int kdtree_index, unsigned int app_index) const
Get the index of the app in the loop over the trees and the apps contributing data to each tree...
std::vector< bool > _use_zero_dof_for_value
Whether we can just use the local zero-indexed dof to get the value from the solution.
Point getPointInLocalSourceFrame(unsigned int i_from, const Point &pt) const
Transform a point towards the local frame.
std::vector< bool > _source_is_nodes
Whether the source of the values is at nodes (true) or centroids (false) for each variable...
unsigned int getNumAppsPerTree() const
Number of applications which contributed nearest-locations to each KD-tree.
unsigned int _num_sources
Number of KD-Trees to create.
An interface that allows the marking of invalid solutions during a solve.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
bool usesMooseAppCoordTransform() const override
Whether this transfer handles non-translation-based transformations, e.g.
MultiAppGeneralFieldNearestLocationTransfer(const InputParameters ¶meters)
std::vector< std::vector< Point > > _local_points
All the nodes that meet the spatial restrictions in all the local source apps.
std::vector< std::vector< Real > > _local_values
Values of the variable being transferred at all the points in _local_points.
std::vector< std::shared_ptr< KDTree > > _local_kdtrees
KD-Trees for all the local source apps.
unsigned int _num_nearest_points
Number of points to consider.
static InputParameters validParams()
void evaluateInterpValuesNearestNode(const std::vector< std::pair< Point, unsigned int >> &incoming_points, std::vector< std::pair< Real, Real >> &outgoing_vals)
bool checkRestrictionsForSource(const Point &pt, const unsigned int valid_mesh_div, const unsigned int i_from) const
Examine all spatial restrictions that could preclude this source from being a valid source for this p...
virtual void evaluateInterpValues(const std::vector< std::pair< Point, unsigned int >> &incoming_points, std::vector< std::pair< Real, Real >> &outgoing_vals) override
std::vector< std::vector< std::shared_ptr< KDTree > > > _local_positions_kdtrees
KD-Trees for nodes nearest to a given position on each local source app.
virtual void prepareEvaluationOfInterpValues(const unsigned int var_index) override
Performs a geometric interpolation based on the values at the nearest nodes to a target location in t...
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int getNumDivisions() const
Number of divisions (nearest-positions or source mesh divisions) used when building KD-Trees...
void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
void computeNumSources()
Pre-compute the number of sources Number of KDTrees used to hold the locations and variable value dat...
It is a general field transfer.
bool inBlocks(const std::set< SubdomainID > &blocks, const Elem *elem) const