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 : * Evaluates origin shape functions to compute the target variables 18 : */ 19 : class MultiAppGeneralFieldShapeEvaluationTransfer : public MultiAppGeneralFieldTransfer 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : 24 : MultiAppGeneralFieldShapeEvaluationTransfer(const InputParameters & parameters); 25 : 26 : protected: 27 : virtual void prepareEvaluationOfInterpValues(const unsigned int var_index) override; 28 : 29 : virtual void 30 : evaluateInterpValues(const std::vector<std::pair<Point, unsigned int>> & incoming_points, 31 : std::vector<std::pair<Real, Real>> & outgoing_vals) override; 32 : 33 : private: 34 184 : bool usesMooseAppCoordTransform() const override { return true; } 35 : /* 36 : * Build mesh functions local to the domain 37 : * @param[in] var_name the variable to build the mesh functions for 38 : * @param[out] the mesh functions 39 : */ 40 : void buildMeshFunctions(const unsigned int var_index, 41 : std::vector<libMesh::MeshFunction> & local_meshfuns); 42 : 43 : /* 44 : * Evaluate interpolation values for incoming points 45 : * @param[in] bounding boxes to restrict the evaluation domain 46 : * @param[in] the mesh functions to use for evaluation 47 : * @param[in] the points to evaluate the variable shape functions at 48 : * @param[out] the values of the variables 49 : */ 50 : void evaluateInterpValuesWithMeshFunctions( 51 : const std::vector<BoundingBox> & local_bboxes, 52 : std::vector<libMesh::MeshFunction> & local_meshfuns, 53 : const std::vector<std::pair<Point, unsigned int>> & incoming_points, 54 : std::vector<std::pair<Real, Real>> & outgoing_vals); 55 : 56 : /* 57 : * Bounding boxes 58 : */ 59 : std::vector<libMesh::BoundingBox> _local_bboxes; 60 : /* 61 : * Local mesh functions 62 : */ 63 : std::vector<libMesh::MeshFunction> _local_meshfuns; 64 : };