10#ifdef MOOSE_MFEM_ENABLED
84 bool use_displaced)
const;
95 template <Moose::FEBackend TO_BACKEND, Moose::FEBackend FROM_BACKEND>
115template <Moose::FEBackend TO_BACKEND, Moose::FEBackend FROM_BACKEND>
125 paramError(
"from_multi_app",
type() +
" is incompatible with the source app's backend.");
127 else if (
getToMultiApp()->problemBase().feBackend() != FROM_BACKEND)
128 mooseError(
type() +
" is incompatible with this (the source) app's backend.");
133 for (
const auto i : make_range(
getToMultiApp()->numGlobalApps()))
135 getToMultiApp()->appProblemBase(i).feBackend() != TO_BACKEND)
136 paramError(
"to_multi_app",
type() +
" is incompatible with the destination app's backend.");
139 mooseError(
type() +
" is incompatible with this (the destination) app's backend.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Virtual base class for MultiApp transfers to and/or from MFEMProblems.
void setActiveFromProblem(FEProblemBase &from_problem, const unsigned int global_app_index)
Set current problem to fetch source variables from.
const std::vector< VariableName > & _from_var_names
Vector of source variable names to be transferred.
FEProblemBase * _active_to_problem
Pointer to active destination problem variable is being transferred to.
void setActiveToProblem(FEProblemBase &to_problem, const unsigned int global_app_index)
Set current problem to fetch destination variables from.
const VariableName & getToVarName(int i) const
Getter for destination variable name.
unsigned int numToVar() const
Return for the number of destination variables.
static InputParameters validParams()
const MultiAppCoordTransform & getActiveToTransform() const
Getter for the active destination transform.
const VariableName & getFromVarName(int i) const
Getter for source variable name.
virtual void transferVariables(bool is_target_local)=0
Transfer all variables from active source problem to active destination problem.
virtual unsigned int & getActiveToProblemGlobalAppIndex()
Getter for current destination problem global app index.
const std::vector< VariableName > & _to_var_names
Vector of destination variable names to transfer to.
void checkSiblingsTransferSupported() const override
Allow sibling transfers.
mfem::real_t _mfem_out_of_mesh_value
Default value to return for transfers from points outside the source mesh.
libMesh::EquationSystems & getlibMeshEquationSystem(FEProblemBase &problem, bool use_displaced) const
Get libMesh EquationSystem, which may or may not be displaced.
virtual unsigned int & getActiveFromProblemGlobalAppIndex()
Getter for current destination problem global app index.
void checkValidTransferProblemTypes()
Templated method to check source and destination problems are of the expected types.
void execute() override
Set active source and destination problems, and execute variable transfer.
virtual FEProblemBase & getActiveToProblem()
Getter for current problem containing destination variables.
mfem::real_t getMFEMOutOfMeshValue() const
Getter for default value for transfers evaluated at points outside source mesh.
libMesh::Point mapPointToActiveSourceFrame(const Point &point_in_target_frame) const
Map a point in the active destination app frame to the active source app frame.
unsigned int _active_from_global_app_index
Global app index for the active source problem.
virtual FEProblemBase & getActiveFromProblem()
Getter for current problem containing source variables.
unsigned int numFromVar() const
Return the number of source variables.
FEProblemBase * _active_from_problem
Pointer to active source problem variable is being transferred from.
unsigned int _active_to_global_app_index
Global app index for the active destination problem.
void setMFEMOutOfMeshValue(mfem::real_t mfem_out_of_mesh_value)
Set default value for transfers evaluated at points outside source mesh.
const MultiAppCoordTransform & getActiveFromTransform() const
Getter for the active source transform.
const std::string & type() const
Get the type of this class.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Base class for all MultiAppTransfer objects.
bool hasToMultiApp() const
Whether the transfer owns a non-null to_multi_app.
std::vector< std::unique_ptr< MultiAppCoordTransform > > _from_transforms
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.
std::vector< std::unique_ptr< MultiAppCoordTransform > > _to_transforms
bool hasFromMultiApp() const
Whether the transfer owns a non-null from_multi_app.