10 #ifdef MOOSE_MFEM_ENABLED 84 bool use_displaced)
const;
95 template <Moose::FEBackend TO_BACKEND, Moose::FEBackend FROM_BACKEND>
115 template <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.");
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.");
unsigned int _active_to_global_app_index
Global app index for the active destination problem.
std::vector< std::unique_ptr< MultiAppCoordTransform > > _to_transforms
Virtual base class for MultiApp transfers to and/or from MFEMProblems.
unsigned int numFromVar() const
Return the number of source variables.
libMesh::EquationSystems & getlibMeshEquationSystem(FEProblemBase &problem, bool use_displaced) const
Get libMesh EquationSystem, which may or may not be displaced.
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
const std::vector< VariableName > & _from_var_names
Vector of source variable names to be transferred.
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 ...
FEProblemBase * _active_to_problem
Pointer to active destination problem variable is being transferred to.
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
virtual FEProblemBase & getActiveFromProblem()
Getter for current problem containing source variables.
unsigned int _active_from_global_app_index
Global app index for the active source problem.
bool hasFromMultiApp() const
Whether the transfer owns a non-null from_multi_app.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void setMFEMOutOfMeshValue(mfem::real_t mfem_out_of_mesh_value)
Set default value for transfers evaluated at points outside source mesh.
virtual FEProblemBase & getActiveToProblem()
Getter for current problem containing destination variables.
unsigned int numToVar() const
Return for the number of destination variables.
mfem::real_t _mfem_out_of_mesh_value
Default value to return for transfers from points outside the source mesh.
void setActiveToProblem(FEProblemBase &to_problem, const unsigned int global_app_index)
Set current problem to fetch destination variables from.
FEProblemBase * _active_from_problem
Pointer to active source problem variable is being transferred from.
const std::string & type() const
Get the type of this class.
MFEMMultiAppTransfer(InputParameters const ¶ms)
virtual unsigned int & getActiveFromProblemGlobalAppIndex()
Getter for current destination problem global app index.
const std::vector< VariableName > & _to_var_names
Vector of destination variable names to transfer to.
mfem::real_t getMFEMOutOfMeshValue() const
Getter for default value for transfers evaluated at points outside source mesh.
void setActiveFromProblem(FEProblemBase &from_problem, const unsigned int global_app_index)
Set current problem to fetch source variables from.
const VariableName & getFromVarName(int i) const
Getter for source variable name.
const MultiAppCoordTransform & getActiveFromTransform() const
Getter for the active source transform.
static InputParameters validParams()
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.
Base class for all MultiAppTransfer objects.
const VariableName & getToVarName(int i) const
Getter for destination variable name.
void checkSiblingsTransferSupported() const override
Allow sibling transfers.
std::vector< std::unique_ptr< MultiAppCoordTransform > > _from_transforms
IntRange< T > make_range(T beg, T end)
bool hasToMultiApp() const
Whether the transfer owns a non-null to_multi_app.
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...
const MultiAppCoordTransform & getActiveToTransform() const
Getter for the active destination transform.
void checkValidTransferProblemTypes()
Templated method to check source and destination problems are of the expected types.
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.
void execute() override
Set active source and destination problems, and execute variable transfer.