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");
93 for (
const auto i : make_range(
getToMultiApp()->numGlobalApps()))
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");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObject("MooseApp", MultiAppCopyTransfer)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Copy variables directly from one application to another, based on degree-of-freedom indexing TODO: Re...
virtual void checkSiblingsTransferSupported() const override
Whether the transfer supports siblings transfer.
static InputParameters validParams()
const std::vector< VariableName > _from_var_names
Name of variables transferring from.
const std::vector< AuxVariableName > _to_var_names
Name of variables transferring to.
virtual void execute() override
Performs the transfer of a variable (Nonlinear or Auxiliary) to/from the Multiapp.
MultiAppCopyTransfer(const InputParameters ¶meters)
VariableName _from_var_name
Name of variables transferring from.
AuxVariableName _to_var_name
Name of variables transferring to.
Copy the fields directly from one application to another, based on degree-of-freedom indexing.
void transfer(FEProblemBase &to_problem, FEProblemBase &from_problem)
Performs the transfer of a variable between two problems if they have the same mesh.
static InputParameters validParams()
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
MooseEnum _current_direction