- from_reportersList of the reporter names (object_name/value_name) to transfer the value from.
C++ Type:std::vector<ReporterName>
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value from.
- to_reporterReporter object to reference when declaring reporter values.
C++ Type:std::string
Controllable:No
Description:Reporter object to reference when declaring reporter values.
MultiAppCloneReporterTransfer
Declare and transfer reporter data from sub-application(s) to main application.
Overview
This transfer is very similar to MultiAppReporterTransfer with a few key differences. The first is that this object can only transfer from sub-application(s) to the main app. The second is that reporter values are declared on-the-fly, i.e. the reporter values from the sub-app are "cloned" onto the main app, with out an already existing value on the main app. The third is that when there are multiple sub-applications, the values are collected into a vector of that reporter type on the main app.
It is not possible to transfer a reporter value that has already been cloned with this object. For instance, let's say there is a hierarchical structure of multiapps with a primary (main), secondary, and tertiary app. If this object is used to clone values from the tertiary to secondary, it cannot again be used to clone the same values from the secondary to the primary.
Example Input Syntax
Multiple Sub Applications
This example shows a multi-app with multiple sub applications. It uses the same input file, but with different reporter values controlled by "cli_args":
[MultiApps]
[multi_reporter]
type = TransientMultiApp
input_files = 'sub0.i sub0.i sub0.i sub0.i'
positions = '0 0 0
0 0 0
0 0 0
0 0 0'
cli_args = 'Postprocessors/from_sub_pp/default=3.1415926;Reporters/from_sub_rep/integer_values=10;Reporters/from_sub_rep/string_values=ten;Outputs/active=""
Postprocessors/from_sub_pp/default=1.5707963;Reporters/from_sub_rep/integer_values=11;Reporters/from_sub_rep/string_values=twenty;Outputs/active=""
Postprocessors/from_sub_pp/default=1.0471975;Reporters/from_sub_rep/integer_values=12;Reporters/from_sub_rep/string_values=thirty;Outputs/active=""
Postprocessors/from_sub_pp/default=0.7853981;Reporters/from_sub_rep/integer_values=13;Reporters/from_sub_rep/string_values=forty;Outputs/active=""'
[]
[]
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/clone.i)The transfer syntax is pretty minimal giving reporter value names (can be found in sub0.i) on the sub-app and reporter object name on main app, the object name is used to associate the cloned value to an object.
[Transfers]
[multi_rep]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_pp/value from_sub_rep/int from_sub_rep/str'
to_reporter = receiver
from_multi_app = multi_reporter
[]
[]
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/clone.i)When run in serial, a single output file is produced which shows the vectors of the reporter values created:
"multi_rep:from_sub_pp:value": {
"type": "std::vector<double>"
},
"multi_rep:from_sub_rep:int": {
"type": "std::vector<int>"
},
"multi_rep:from_sub_rep:str": {
"type": "std::vector<std::string>"
},
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/gold/clone_serial.json)In parallel, the sub app reporter values are split into different files, one for each processor. This example was run with 6 processors which split the 4 sub apps. So the root processor for each sub app (clone_out.json, clone_out.json.1, clone_out.json.2, and clone_out.json.4) will show the value, while the other processors (clone_out.json.3 and clone_out.json.5) will be empty:
"multi_rep:from_sub_pp:value": {
"type": "std::vector<double>"
},
"multi_rep:from_sub_rep:int": {
"type": "std::vector<int>"
},
"multi_rep:from_sub_rep:str": {
"type": "std::vector<std::string>"
},
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/gold/clone_out.json) "multi_rep:from_sub_pp:value": {
"type": "std::vector<double>"
},
"multi_rep:from_sub_rep:int": {
"type": "std::vector<int>"
},
"multi_rep:from_sub_rep:str": {
"type": "std::vector<std::string>"
},
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/gold/clone_out.json.3)Single Sub Application
When there is a only a single sub-application in the multi-app, the reporter value is directly cloned (versus creating a vector):
[MultiApps]
[single_app]
type = TransientMultiApp
input_files = 'sub0.i'
cli_args = 'Outputs/active=""'
[]
[]
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/clone.i)[Transfers]
[single]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_pp/value from_sub_rep/int from_sub_rep/str'
to_reporter = receiver
from_multi_app = single_app
[]
[]
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/clone.i)The resulting output in serial and the root processor in parallel will contain the transferred values, while the non-root processors will have the default constructor of the value type:
"single:from_sub_pp:value": {
"type": "double"
},
"single:from_sub_rep:int": {
"type": "int"
},
"single:from_sub_rep:str": {
"type": "std::string"
}
}
}
},
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/gold/clone_out.json){
"number_of_parts": 6,
"part": 1,
"reporters": {
"receiver": {
"type": "ConstantReporter",
"values": {
"multi_rep:from_sub_pp:value": {
"type": "std::vector<double>"
},
"multi_rep:from_sub_rep:int": {
"type": "std::vector<int>"
},
"multi_rep:from_sub_rep:str": {
"type": "std::vector<std::string>"
},
"multi_vpp:from_sub_vpp:a": {
"type": "std::vector<std::vector<double>>"
},
"multi_vpp:from_sub_vpp:b": {
"type": "std::vector<std::vector<double>>"
}
}
}
},
(../../../SoftwareDownloads/moose/test/tests/transfers/multiapp_reporter_transfer/gold/clone_out.json.1)Input Parameters
- check_multiapp_execute_onTrueWhen false the check between the multiapp and transfer execute on flags is not preformed.
Default:True
C++ Type:bool
Controllable:No
Description:When false the check between the multiapp and transfer execute on flags is not preformed.
- displaced_source_meshFalseWhether or not to use the displaced mesh for the source mesh.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to use the displaced mesh for the source mesh.
- displaced_target_meshFalseWhether or not to use the displaced mesh for the target mesh.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to use the displaced mesh for the target mesh.
- execute_onSAME_AS_MULTIAPPThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, SAME_AS_MULTIAPP, ALWAYS.
Default:SAME_AS_MULTIAPP
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, SAME_AS_MULTIAPP, ALWAYS.
- from_multi_appThe name of the MultiApp to receive data from
C++ Type:MultiAppName
Controllable:No
Description:The name of the MultiApp to receive data from
- prefixUse the supplied string as the prefix for reporter name rather than the transfer name.
C++ Type:std::string
Controllable:No
Description:Use the supplied string as the prefix for reporter name rather than the transfer name.
- reporter_typeThe type of the reporter on the sub-application. This parameter is not typically required, but if some processors do not have a sub-app, for instance if the max_procs_per_app parameter is used in the MultiApp, then this is required.
C++ Type:MultiMooseEnum
Controllable:No
Description:The type of the reporter on the sub-application. This parameter is not typically required, but if some processors do not have a sub-app, for instance if the max_procs_per_app parameter is used in the MultiApp, then this is required.
- to_multi_appThe name of the MultiApp to transfer the data to
C++ Type:MultiAppName
Controllable:No
Description:The name of the MultiApp to transfer the data to
Optional Parameters
- _called_legacy_paramsTrue
Default:True
C++ Type:bool
Controllable:No
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.