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 unsigned int /*var_index*/, 34 : const std::vector<std::pair<Point, unsigned int>> & incoming_points, 35 : std::vector<std::pair<Real, Real>> & outgoing_vals) override; 36 : 37 : virtual std::string getDataSourceName(unsigned int var_index) const override; 38 : 39 : private: 40 184 : bool usesMooseAppCoordTransform() const override { return true; } 41 : /* 42 : * Evaluate interpolation values for incoming points 43 : * @param[in] bounding boxes to restrict the evaluation domain 44 : * @param[in] the mesh functions to use for evaluation 45 : * @param[in] the points to evaluate the variable shape functions at 46 : * @param[out] the values of the variables 47 : */ 48 : void evaluateInterpValuesWithUserObjects( 49 : const std::vector<BoundingBox> & local_bboxes, 50 : const std::vector<std::pair<Point, unsigned int>> & incoming_points, 51 : std::vector<std::pair<Real, Real>> & outgoing_vals); 52 : 53 : /// Name of the source user object in all the source problems 54 : const std::string _user_object_name; 55 : 56 : /* 57 : * Bounding boxes 58 : */ 59 : std::vector<BoundingBox> _local_bboxes; 60 : };