24 params.
addClassDescription(
"Transfers coefficient arrays between objects that are derived from " 25 "MutableCoefficientsInterface; currently includes the following " 26 "types: FunctionSeries, FXBoundaryUserObject, and FXVolumeUserObject");
29 "this_app_object_name",
30 "Name of the MutableCoefficientsInterface-derived object in this app (LocalApp).");
33 "multi_app_object_name",
34 "Name of the MutableCoefficientsInterface-derived object in the MultiApp.");
41 _this_app_object_name(getParam<
std::string>(
"this_app_object_name")),
42 _multi_app_object_name(getParam<
std::string>(
"multi_app_object_name")),
43 getMultiAppObject(NULL),
47 paramError(
"direction",
"This transfer is only unidirectional");
49 mooseError(
"This transfer does not currently support between_multiapp transfer");
65 for (std::size_t i = 0; i < multi_app->numGlobalApps(); ++i)
66 if (multi_app->hasLocalApp(i))
76 "' is assigned to two different object types. Please modify your input file and " 86 const std::string & object_name,
87 const std::string & app_name)
116 "' does not inherit from MutableCoefficientsInterface.",
117 " Please change the function type and try again.");
134 "' does not inherit from MutableCoefficientsInterface.",
135 " Please change the function type and try again.");
143 const std::string & object_name,
151 const std::string & object_name,
162 _console <<
"Beginning MultiAppFXTransfer: " <<
name() << std::endl;
173 for (
unsigned int i = 0; i <
getToMultiApp()->numGlobalApps(); ++i)
187 "' is not compatible with '",
220 "' is not compatible with '",
229 _console <<
"Finished MultiAppFXTransfer: " <<
name() << std::endl;
Transfers mutable coefficient arrays between supported object types.
MutableCoefficientsInterface &(MultiAppFXTransfer::* GetProblemObject)(FEProblemBase &base, const std::string &object_name, THREAD_ID thread)
Function pointer typedef for functions used to find, convert, and return the appropriate MutableCoeff...
static InputParameters validParams()
T & getUserObject(const std::string &name, unsigned int tid=0) const
const std::shared_ptr< MultiApp > getFromMultiApp() const
MooseEnum _current_direction
MutableCoefficientsInterface & getMutableCoefficientsUserOject(FEProblemBase &base, const std::string &object_name, THREAD_ID thread)
Gets a MutableCoefficientsInterface-based UserObject, intended for use via function pointer...
MultiAppFXTransfer(const InputParameters ¶meters)
const std::string _this_app_object_name
Name of the MutableCoefficientsInterface-derived object in the creating app.
unsigned int size() const
const std::shared_ptr< MultiApp > getToMultiApp() const
bool hasUserObject(const std::string &name) const
const std::string _multi_app_object_name
Name of the MutableCoefficientsInterface-derived object in the MultiApp.
MutableCoefficientsInterface & getMutableCoefficientsFunction(FEProblemBase &base, const std::string &object_name, THREAD_ID thread)
Gets a MutableCoefficientsInterface-based Function, intented for use via function pointer...
bool hasFromMultiApp() const
virtual const std::string & name() const
GetProblemObject getSubAppObject
Function pointer for grabbing the SubApp object.
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
registerMooseObject("FunctionalExpansionToolsApp", MultiAppFXTransfer)
bool isCompatibleWith(const MutableCoefficientsInterface &other) const
Checks to see if another instance is compatible.
virtual GetProblemObject scanProblemBaseForObject(FEProblemBase &base, const std::string &object_name, const std::string &app_name)
Searches an FEProblemBase for a MutableCoefficientsInterface-based object and returns a function poin...
void paramError(const std::string ¶m, Args... args) const
static InputParameters validParams()
MultiMooseEnum _directions
virtual void execute() override
bool hasToMultiApp() const
void mooseError(Args &&... args) const
This class is designed to provide a uniform interface for any class that uses an array of coefficient...
virtual void initialSetup() override
const ConsoleStream _console
void importCoefficients(const MutableCoefficientsInterface &other)
Import the coefficients from another instance.
GetProblemObject getMultiAppObject
Function pointer for grabbing the MultiApp object.
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)