Line data Source code
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 : #include "MultiAppGeneralFieldTransfer.h" 13 : #include "libmesh/mesh_function.h" 14 : #include "MooseHashing.h" 15 : 16 : /** 17 : * Transfers values computed in the origin mesh by the source user object spatialValue() routine 18 : * at locations in the target mesh. 19 : */ 20 : class MultiAppGeneralFieldUserObjectTransfer : public MultiAppGeneralFieldTransfer 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : MultiAppGeneralFieldUserObjectTransfer(const InputParameters & parameters); 26 : 27 : protected: 28 : virtual void execute() override; 29 : 30 : virtual void prepareEvaluationOfInterpValues(const unsigned int /* var_index */) override; 31 : 32 : virtual void 33 : evaluateInterpValues(const std::vector<std::pair<Point, unsigned int>> & incoming_points, 34 : std::vector<std::pair<Real, Real>> & outgoing_vals) override; 35 : 36 : private: 37 184 : bool usesMooseAppCoordTransform() const override { return true; } 38 : /* 39 : * Evaluate interpolation values for incoming points 40 : * @param[in] bounding boxes to restrict the evaluation domain 41 : * @param[in] the mesh functions to use for evaluation 42 : * @param[in] the points to evaluate the variable shape functions at 43 : * @param[out] the values of the variables 44 : */ 45 : void evaluateInterpValuesWithUserObjects( 46 : const std::vector<BoundingBox> & local_bboxes, 47 : const std::vector<std::pair<Point, unsigned int>> & incoming_points, 48 : std::vector<std::pair<Real, Real>> & outgoing_vals); 49 : 50 : /// Name of the source user object in all the source problems 51 : const std::string _user_object_name; 52 : 53 : /* 54 : * Bounding boxes 55 : */ 56 : std::vector<BoundingBox> _local_bboxes; 57 : };