10 #ifdef MOOSE_MFEM_ENABLED 27 checkValidTransferProblemTypes<Moose::FEBackend::MFEM, Moose::FEBackend::MFEM>();
45 auto getGF = [&](
MFEMProblem & problem,
const std::string &
name) -> mfem::Vector &
51 mooseError(
"No real or complex variable named '",
name,
"' found.");
59 if (from_var.Size() != to_var.Size())
75 mooseError(
"Child application allocation on parallel processes must be the same to support " 76 "siblings variable field copy transfer");
79 mooseError(
"Number of source and target child apps must match for siblings transfer");
std::shared_ptr< mfem::ParGridFunction > getGridFunction(const std::string &name)
Virtual base class for MultiApp transfers to and/or from MFEMProblems.
virtual void transferVariables(bool is_target_local) override
Transfer all variables from active source problem to active destination problem.
Moose::MFEM::ComplexGridFunctions cmplx_gridfunctions
MFEMProblemData & getProblemData()
Method to get the current MFEMProblemData object storing the current data specifying the FE problem...
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
bool Has(const std::string &field_name) const
Predicate to check if a field is registered with name field_name.
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
virtual FEProblemBase & getActiveFromProblem()
Getter for current problem containing source variables.
virtual MFEMProblem & getActiveToProblem() override
Set current MFEM problem to fetch destination variables from.
virtual FEProblemBase & getActiveToProblem()
Getter for current problem containing destination variables.
const std::string & name() const
Get the name of the class.
unsigned int numToVar() const
Return for the number of destination variables.
Transfer to copy MFEMVariables between multiapps.
virtual MFEMProblem & getActiveFromProblem() override
Set current MFEM problem to fetch source variables from.
MultiAppMFEMCopyTransfer(InputParameters const ¶ms)
void checkSiblingsTransferSupported() const override
Check number of source and target child apps match for sibling transfer.
std::shared_ptr< mfem::ParComplexGridFunction > getComplexGridFunction(const std::string &name)
const VariableName & getFromVarName(int i) const
Getter for source variable name.
static InputParameters validParams()
const VariableName & getToVarName(int i) const
Getter for destination variable name.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
registerMooseObject("MooseApp", MultiAppMFEMCopyTransfer)
Moose::MFEM::GridFunctions gridfunctions
static InputParameters validParams()