18#include "libmesh/meshfree_interpolation.h"
19#include "libmesh/system.h"
28 "postprocessor",
"The name of the Postprocessors on the sub-app to transfer from/to.");
30 "The name of the VectorPostprocessor in "
31 "the MultiApp to transfer values "
34 "vector_name",
"Named vector quantity to transfer from/to in VectorPostprocessor.");
36 "VectorPostprocessor to Postprocessors located in "
38 " collects Postprocessor values from N sub-apps "
39 "into a VectorPostprocessor");
48 _sub_pp_name(getParam<PostprocessorName>(
"postprocessor")),
49 _master_vpp_name(getParam<VectorPostprocessorName>(
"vector_postprocessor")),
50 _vector_name(getParam<
std::string>(
"vector_name"))
53 paramError(
"direction",
"This transfer is only unidirectional");
71 " and number of sub-apps do not match: ",
76 for (
unsigned int i = 0; i <
getToMultiApp()->numGlobalApps(); ++i)
92 " and number of sub-apps do not match: ",
108 for (
auto & v : value)
119 "MultiAppVectorPostprocessorTransfer::execute()", 5,
"Transferring a vector postprocessor");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
std::vector< Real > VectorPostprocessorValue
const ExecFlagType EXEC_TRANSFER
registerMooseObject("MooseApp", MultiAppVectorPostprocessorTransfer)
virtual void computeUserObjectByName(const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
Compute an user object with the given name.
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.
void errorIfObjectExecutesOnTransferInSourceApp(const std::string &object_name) const
Error if executing this MooseObject on EXEC_TRANSFER in a source multiapp (from_multiapp,...
static void addUserObjectExecutionCheckParam(InputParameters ¶ms)
Add the execution order check parameter (to skip the warning if needed)
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.
static InputParameters validParams()
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
Copies the values of a VectorPostprocessor from the parent application to postprocessors on each suba...
virtual void executeToMultiapp()
static InputParameters validParams()
const std::string & _vector_name
Specific vector to transfer among the vectors in the parent VPP.
const PostprocessorName & _sub_pp_name
Name of the postprocessor on the MultiApp.
virtual void execute() override
Execute the transfer.
virtual void executeFromMultiapp()
const VectorPostprocessorName & _master_vpp_name
Name of the VectorPostprocessor on the parent app.
MultiAppVectorPostprocessorTransfer(const InputParameters ¶meters)
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
MultiMooseEnum _directions
The directions this Transfer is to be executed on.
FEProblemBase & _fe_problem
MooseEnum _current_direction
const Parallel::Communicator & _communicator