16 #include "libmesh/id_types.h" 17 #include "libmesh/string_to_enum.h" 26 "variable",
"The auxiliary variable to store the transferred values in.");
28 "The variable to transfer from.");
31 "Copies variables (nonlinear and auxiliary) between multiapps that have identical meshes.");
37 _from_var_names(getParam<
std::vector<VariableName>>(
"source_variable")),
38 _to_var_names(getParam<
std::vector<AuxVariableName>>(
"variable"))
48 TIME_SECTION(
"MultiAppCopyTransfer::execute()", 5,
"Copies variables");
53 for (
unsigned int i = 0; i <
getToMultiApp()->numGlobalApps(); i++)
68 int transfers_done = 0;
81 mooseError(
"BETWEEN_MULTIAPP transfer not supported if there is not at least one subapp " 82 "per multiapp involved on each rank");
95 mooseError(
"Child application allocation on parallel processes must be the same to support " 96 "siblings variable field copy transfer");
99 mooseError(
"Number of source and target child apps must match for siblings transfer");
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
MooseEnum _current_direction
const std::vector< VariableName > _from_var_names
Name of variables transferring from.
Copy the fields directly from one application to another, based on degree-of-freedom indexing...
static InputParameters validParams()
Copy variables directly from one application to another, based on degree-of-freedom indexing TODO: Re...
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
AuxVariableName _to_var_name
Name of variables transferring to.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VariableName _from_var_name
Name of variables transferring from.
static InputParameters validParams()
const std::vector< AuxVariableName > _to_var_names
Name of variables transferring to.
MultiAppCopyTransfer(const InputParameters ¶meters)
virtual void execute() override
Performs the transfer of a variable (Nonlinear or Auxiliary) to/from the Multiapp.
IntRange< T > make_range(T beg, T end)
void transfer(FEProblemBase &to_problem, FEProblemBase &from_problem)
Performs the transfer of a variable between two problems if they have the same mesh.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual void checkSiblingsTransferSupported() const override
Whether the transfer supports siblings transfer.
registerMooseObject("MooseApp", MultiAppCopyTransfer)