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 "MultiAppDofCopyTransfer.h" 13 : 14 : namespace libMesh 15 : { 16 : class DofObject; 17 : } 18 : 19 : /** 20 : * Copy variables directly from one application to another, based on degree-of-freedom indexing 21 : * TODO: Rename to MultiAppVariableCopy or MultiAppFieldCopy 22 : */ 23 : class MultiAppCopyTransfer : public MultiAppDofCopyTransfer 24 : { 25 : public: 26 : static InputParameters validParams(); 27 : 28 : MultiAppCopyTransfer(const InputParameters & parameters); 29 : 30 : /** 31 : * Performs the transfer of a variable (Nonlinear or Auxiliary) to/from the Multiapp. 32 : */ 33 : virtual void execute() override; 34 : 35 : protected: 36 5968 : virtual std::vector<VariableName> getFromVarNames() const override { return _from_var_names; } 37 11544 : virtual std::vector<AuxVariableName> getToVarNames() const override { return _to_var_names; } 38 : 39 : // These attributes are used if a derived class supports transferring multiple variables 40 : /// Name of variables transferring from 41 : const std::vector<VariableName> _from_var_names; 42 : /// Name of variables transferring to 43 : const std::vector<AuxVariableName> _to_var_names; 44 : 45 : // These attributes are used if a derived class only supports one variable 46 : /// Name of variables transferring from 47 : VariableName _from_var_name; 48 : /// Name of variables transferring to 49 : AuxVariableName _to_var_name; 50 : 51 : private: 52 : virtual void checkSiblingsTransferSupported() const override; 53 : };