https://mooseframework.inl.gov
MultiAppGeneralFieldNearestLocationTransfer.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 
13 #include "KDTree.h"
15 
21 
22 {
23 public:
25 
27 
28  void initialSetup() override;
29 
30 protected:
31  virtual void
32  evaluateInterpValues(const unsigned int /*var_index*/,
33  const std::vector<std::pair<Point, unsigned int>> & incoming_points,
34  std::vector<std::pair<Real, Real>> & outgoing_vals) override;
35 
36 private:
37  void buildKDTrees(const unsigned int var_index) override;
38 
39  /*
40  * Evaluate interpolation values for incoming points
41  * @param incoming_points all the points at which we need values
42  * @param outgoing_vals vector containing the values and distances from point to nearest node
43  */
45  const std::vector<std::pair<Point, unsigned int>> & incoming_points,
46  std::vector<std::pair<Real, Real>> & outgoing_vals);
47 
49  std::vector<bool> _source_is_nodes;
50 
52  std::vector<bool> _use_zero_dof_for_value;
53 };
Base class for working with KDTrees in transfers, whether for interpolation or extrapolation.
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::vector< bool > _source_is_nodes
Whether the source of the values is at nodes (true) or centroids (false) for each variable...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void evaluateInterpValues(const unsigned int, const std::vector< std::pair< Point, unsigned int >> &incoming_points, std::vector< std::pair< Real, Real >> &outgoing_vals) override
void evaluateInterpValuesNearestNode(const std::vector< std::pair< Point, unsigned int >> &incoming_points, std::vector< std::pair< Real, Real >> &outgoing_vals)
Performs a geometric interpolation based on the values at the nearest nodes to a target location in t...
void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...