18#include "libmesh/bounding_box.h"
51 mooseError(
"Unclear which app you want to retrieve from Transfer ",
name());
59 mooseError(
"Should not get here, there should be a multiapp");
69 "A from_multiapp was requested but is unavailable. Check the from_multi_app parameter");
81 "A to_multiapp was requested but is unavailable. Check the to_multi_app parameter");
155 std::vector<libMesh::EquationSystems *>
_to_es;
234 mooseError(
"Siblings transfer not supported. You cannot transfer both from a multiapp to "
263 unsigned int local_i_to,
264 const std::string & phase)
const;
275 unsigned int local_i_from,
276 const std::string & phase)
const;
295 const VariableName & var_name,
296 const std::string & param_name =
"")
const;
301 void extendBoundingBoxes(
const Real factor, std::vector<libMesh::BoundingBox> & bboxes)
const;
317 const std::string & phase)
const;
boundary_id_type BoundaryID
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
const std::string & name() const
Get the name of the class.
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...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Base class for all MultiAppTransfer objects.
static void addSkipCoordCollapsingParam(InputParameters ¶ms)
Add the option to skip coordinate collapsing in coordinate transformation operations Note: this is us...
std::unique_ptr< MooseAppCoordTransform > _to_moose_app_transform
The moose coordinate transformation object describing rotations, scaling, and coordinate system of th...
libMesh::NumericVector< Real > & getTransferVector(unsigned int i_local, std::string var_name)
If we are transferring to a multiapp, return the appropriate solution vector.
std::vector< unsigned int > _to_local2global_map
Given local app index, returns global app index.
void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup.
unsigned int getGlobalSourceAppIndex(unsigned int i_from) const
Return the global app index from the local index in the "from-multiapp" transfer direction.
std::string getFromName() const
Get the name of thing being transferred from.
std::vector< Point > _from_positions
bool hasToMultiApp() const
Whether the transfer owns a non-null to_multi_app.
std::string getToName() const
Get the name of thing being transferred to.
virtual bool usesMooseAppCoordTransform() const
Whether this transfer handles non-translation-based transformations, e.g.
void errorIfObjectExecutesOnTransferInSourceApp(const std::string &object_name) const
Error if executing this MooseObject on EXEC_TRANSFER in a source multiapp (from_multiapp,...
unsigned int getLocalSourceAppIndex(unsigned int i_from) const
Return the local app index from the global index in the "from-multiapp" transfer direction.
bool _displaced_source_mesh
True if displaced mesh is used for the source mesh, otherwise false.
std::vector< libMesh::EquationSystems * > _from_es
std::vector< unsigned int > _from_local2global_map
Given local app index, returns global app index.
std::vector< Point > _to_positions
virtual void checkSiblingsTransferSupported() const
Whether the transfer supports siblings transfer.
std::vector< MooseMesh * > _from_meshes
static void transformBoundingBox(libMesh::BoundingBox &box, const MultiAppCoordTransform &transform)
Transform a bounding box according to the transformations in the provided coordinate transformation o...
Point mapBackWithoutCollapsing(MultiAppCoordTransform &transform, const Point &p, const std::string &phase) const
Shared implementation for getPointInSourceAppFrame / getPointInTargetAppFrame.
static void addBBoxFactorParam(InputParameters ¶ms)
Add the bounding box factor parameter to the supplied input parameters.
std::vector< FEProblemBase * > _from_problems
static void addUserObjectExecutionCheckParam(InputParameters ¶ms)
Add the execution order check parameter (to skip the warning if needed)
std::vector< unsigned int > getFromsPerProc()
Return the number of "from" domains that each processor owns.
virtual void getAppInfo()
This method will fill information into the convenience member variables (_to_problems,...
Point getPointInTargetAppFrame(const Point &p, unsigned int local_i_to, const std::string &phase) const
Get the target app point from a point in the reference frame.
std::unique_ptr< MooseAppCoordTransform > _from_moose_app_transform
The moose coordinate transformation object describing rotations, scaling, and coordinate system of th...
void checkVariable(const FEProblemBase &fe_problem, const VariableName &var_name, const std::string ¶m_name="") const
Helper for checking a problem for a variable.
std::vector< libMesh::BoundingBox > getFromBoundingBoxes()
Return the bounding boxes of all the "from" domains, including all the domains not local to this proc...
void getFromMultiAppInfo()
std::vector< std::unique_ptr< MultiAppCoordTransform > > _from_transforms
unsigned int getGlobalTargetAppIndex(unsigned int i_to) const
Return the global app index from the local index in the "to-multiapp" transfer direction.
bool _displaced_target_mesh
True if displaced mesh is used for the target mesh, otherwise false.
std::vector< FEProblemBase * > _to_problems
void checkParentAppUserObjectExecuteOn(const std::string &object_name) const
Checks the execute_on flags for user object transfers with user objects on the source app which is al...
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
std::shared_ptr< MultiApp > _from_multi_app
The MultiApps this Transfer is transferring data to or from.
void extendBoundingBoxes(const Real factor, std::vector< libMesh::BoundingBox > &bboxes) const
Extends bounding boxes to avoid missing points.
void checkMultiAppExecuteOn()
Helper method for checking the 'check_multiapp_execute_on' flag.
std::shared_ptr< MultiApp > _to_multi_app
std::vector< MooseMesh * > _to_meshes
const std::shared_ptr< MultiApp > getMultiApp() const
Use this getter to obtain the MultiApp for transfers with a single direction.
static InputParameters validParams()
Real _bbox_factor
Extend (or contract) bounding box by a factor in all directions Greater than one values of this membe...
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
Point getPointInSourceAppFrame(const Point &p, unsigned int local_i_from, const std::string &phase) const
Get the source app point from a point in the reference frame.
std::vector< libMesh::EquationSystems * > _to_es
std::vector< std::unique_ptr< MultiAppCoordTransform > > _to_transforms
void variableIntegrityCheck(const AuxVariableName &var_name, bool is_from_multiapp) const
Utility to verify that the variable in the destination system exists.
std::shared_ptr< MultiApp > _multi_app
Deprecated class attribute for compatibility with the apps.
const bool _skip_coordinate_collapsing
Whether to skip coordinate collapsing (transformations of coordinates between applications using diff...
bool hasFromMultiApp() const
Whether the transfer owns a non-null from_multi_app.
Base class for all Transfer objects.