- from_reportersList of the reporter names (object_name/value_name) to transfer the value from.
C++ Type:std::vector<ReporterName>
Unit:(no unit assumed)
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value from.
- to_reportersList of the reporter names (object_name/value_name) to transfer the value to.
C++ Type:std::vector<ReporterName>
Unit:(no unit assumed)
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value to.
MultiAppReporterTransfer
Transfers reporter data between two applications.
Overview
This MultiAppReporterTransfer provides a method to transfer a reporter value (see reporters) of any type between the main application and the sub-application(s). This includes vectors of real numbers from vectorpostprocessors as well as real numbers from postprocessors.
"from_reporters" specifies where the data is coming from, and "to_reporters" specifies where the data going to. These are a list of reporter names that must be the same length, as they directly correspond to each other. For vectorpostprocessors the syntax is "vpp_name"/"vector_name" and for reporters the syntax is "reporter_name"/"value_name".
When transferring data from the main application the data from the main is copied to each sub-application. If the "subapp_index" is used then data is only transferred to the specified sub-application. When transferring data to the main application the "subapp_index" must be supplied if there is more than one sub-application.
Siblings transfer behavior
This transfer supports sending data from a MultiApp to a MultiApp if and only if the number of subapps in the source MultiApp matches the number of subapps in the target MultiApp, and they are distributed the same way on the parallel processes. Each source app is then matched to the target app with the same subapp index.
Distributed Vector Transfer
The MultiAppReporterTransfer also supports transferring reporter vectors in a distributed fashion using the "distribute_reporter_vector" parameter. In this mode, the transfer assumes a one-to-many or many-to-one relationship between the reporter values in the main application and the sub-applications. The reporter value in the main application is expected to be a vector with a size matching the number of sub-applications. Each sub-application will send/receive its respective component of the vector based on its index. The main app reporter is assumed to be replicated while the subapp reporters are assumed to be root or replicated.
Main App | Sub App 1 | Sub App 2 | Sub App 3 | Sub App 4 |
---|---|---|---|---|
1 | 2 | 3 | 4 | |
The main app reporter is assumed to be REPORTER_MODE_REPLICATED
while the subapp reporters are assumed to be REPORTER_MODE_ROOT
or REPORTER_MODE_REPLICATED
. This operation will error out with any reporter that are REPORTER_MODE_DISTRIBUTED
.
Example Input File Syntax
You can initialize arbitrary data containers for "to_reporters" with the following objects:
Postprocessor: Receiver
VectorPostprocessor: ConstantVectorPostprocessor
Reporter: ConstantReporter
Transferring VectorPostprocessors
Here, we are transferring data between vectorpostprocessors:
[VectorPostprocessors]
[from_main_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b c'
value = '1 1 1; 2 2 2; 3 3 3'
execute_on = initial
#outputs = none
[]
[to_main_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b c'
value = '4 4 4; 5 5 5; 6 6 6'
#outputs = none
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)[VectorPostprocessors]
[to_sub_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b'
value = '10 10 10 ; 20 20 20'
[]
[from_sub_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b'
value = '30 30 30; 40 40 40'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/sub0.i)[Transfers]
[Transfers]
[vpp_to_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_vpp/a to_sub_vpp/b'
from_reporters = 'from_main_vpp/a from_main_vpp/b'
to_multi_app = sub
[]
[vpp_from_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_vpp/a to_main_vpp/b'
from_reporters = 'from_sub_vpp/a from_sub_vpp/b'
from_multi_app = sub
subapp_index = 0
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)Transferring Reporter Vectors
Here, we are transferring data between a reporter vector and vectorpostprocessors:
[Reporters]
[from_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 1
real_names = num
real_values = 2.0
real_vector_names = vec
real_vector_values = '3 4'
string_names = str
string_values = 'five'
[]
[to_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 0
real_names = num
real_values = 0.0
real_vector_names = vec
real_vector_values = '0'
string_names = str
string_values = 'foo'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)[VectorPostprocessors]
[to_sub_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b'
value = '10 10 10 ; 20 20 20'
[]
[from_sub_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b'
value = '30 30 30; 40 40 40'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/sub0.i)[Transfers]
[Transfers]
[vector_to_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_vpp/a'
from_reporters = 'from_main_rep/vec'
to_multi_app = sub
subapp_index = 0
[]
[vector_from_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/vec'
from_reporters = 'from_sub_vpp/a'
from_multi_app = sub
subapp_index = 0
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)Transferring Reporter Real Numbers
Here, we are transferring data between a reporter real number and postprocessors:
[Reporters]
[from_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 1
real_names = num
real_values = 2.0
real_vector_names = vec
real_vector_values = '3 4'
string_names = str
string_values = 'five'
[]
[to_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 0
real_names = num
real_values = 0.0
real_vector_names = vec
real_vector_values = '0'
string_names = str
string_values = 'foo'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/sub0.i)[Transfers]
[Transfers]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)Transferring Reporter Integers and Strings
Here, we are transferring integer and string data between reporters:
[Reporters]
[from_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 1
real_names = num
real_values = 2.0
real_vector_names = vec
real_vector_values = '3 4'
string_names = str
string_values = 'five'
[]
[to_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 0
real_names = num
real_values = 0.0
real_vector_names = vec
real_vector_values = '0'
string_names = str
string_values = 'foo'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)[Reporters]
[to_sub_rep]
type = ConstantReporter
integer_names = int
integer_values = 0
string_names = str
string_values = 'foo'
[]
[from_sub_rep]
type = ConstantReporter
integer_names = int
integer_values = 10
string_names = str
string_values = 'twenty'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/sub0.i)[Transfers]
[Transfers]
[int_to_int]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/int'
from_reporters = 'from_main_rep/int'
to_multi_app = sub
subapp_index = 0
[]
[int_from_int]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/int'
from_reporters = 'from_sub_rep/int'
from_multi_app = sub
subapp_index = 0
[]
[string_from_string]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/str'
from_reporters = 'from_sub_rep/str'
from_multi_app = sub
subapp_index = 0
[]
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_multi_app = sub
subapp_index = 0
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/main.i)Distribution of a vector Reporter
Scatter vector Reporter
Here we are transferring a vector reporter and a vector of vectors reporter in a scatter fashion. The main application holds a vector of vectors and a single vector, while each subapp has a vector and a Real (scalar) reporter. During the transfer the subapp's reporters are populated from the scattering of the main app's vector reporter. The main app can also use a vector of vectors reporter, in which case those vectors are distributed to the subapps.
[Reporters]
[to_sub_rep]
type = ConstantReporter
real_vector_vector_names = 'sent_vec'
real_vector_vector_values = '1.; 2. 1003.;-5.0 -10 1000;3.3'
real_vector_names = 'sent_real'
real_vector_values = "1. 2. 3. 4."
execute_on = INITIAL
outputs = out
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/main_send.i)[Reporters]
[from_main_rep]
type = ConstantReporter
real_vector_names = 'rec_vec'
real_vector_values = '0.'
real_names = 'rec_real'
real_values = '-1.'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/sub.i)[Transfers]
[Transfers]
[to_sub]
type = MultiAppReporterTransfer
to_multi_app = sub
from_reporters = 'to_sub_rep/sent_vec to_sub_rep/sent_real'
to_reporters = 'from_main_rep/rec_vec from_main_rep/rec_real'
distribute_reporter_vector = true
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/main_send.i)Gather vector Reporter
Here we are transferring a vector reporter and a vector of vectors reporter in a gather fashion. The main application holds a vector of vectors and a single vector, while each subapp has a vector and a Real (scalar) reporter. This test shows the gather operation by aggregating the same values from each subapp into a vector of reporters in the main application.
[Reporters]
[from_sub_rep]
type = ConstantReporter
real_vector_vector_names = 'rec_vec_vec'
real_vector_vector_values = '10000000.'
real_vector_names = 'rec_vec'
real_vector_values = "0."
execute_on = INITIAL
outputs = out
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/main_rec.i)[Reporters]
[from_main_rep]
type = ConstantReporter
real_vector_names = 'rec_vec'
real_vector_values = '0.'
real_names = 'rec_real'
real_values = '-1.'
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/sub.i)[Transfers]
[Transfers]
[from_sub]
type = MultiAppReporterTransfer
from_multi_app = sub
from_reporters = 'from_main_rep/rec_vec from_main_rep/rec_real'
to_reporters = 'from_sub_rep/rec_vec_vec from_sub_rep/rec_vec'
distribute_reporter_vector = true
[]
[]
[]
(moose/test/tests/transfers/multiapp_reporter_transfer/dist_vector/main_rec.i)Input Parameters
- check_multiapp_execute_onTrueWhen false the check between the multiapp and transfer execute on flags is not performed.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:When false the check between the multiapp and transfer execute on flags is not performed.
- displaced_source_meshFalseWhether or not to use the displaced mesh for the source mesh.
Default:False
C++ Type:bool
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to use the displaced mesh for the target mesh.
- distribute_reporter_vectorFalseTransfer to/from a vector reporter from/to reporters on child applications. N to 1 or 1 to N type of transfer. The number of child applications must match the size of the vector reporter
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Transfer to/from a vector reporter from/to reporters on child applications. N to 1 or 1 to N type of transfer. The number of child applications must match the size of the vector reporter
- execute_onSAME_AS_MULTIAPPThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:SAME_AS_MULTIAPP
C++ Type:ExecFlagEnum
Unit:(no unit assumed)
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- from_multi_appThe name of the MultiApp to receive data from
C++ Type:MultiAppName
Unit:(no unit assumed)
Controllable:No
Description:The name of the MultiApp to receive data from
- subapp_index4294967295The MultiApp object sub-application index to use when transferring to/from the sub-application. If unset and transferring to the sub-applications then all sub-applications will receive data. The value must be set when transferring from a sub-application.
Default:4294967295
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:The MultiApp object sub-application index to use when transferring to/from the sub-application. If unset and transferring to the sub-applications then all sub-applications will receive data. The value must be set when transferring from a sub-application.
- to_multi_appThe name of the MultiApp to transfer the data to
C++ Type:MultiAppName
Unit:(no unit assumed)
Controllable:No
Description:The name of the MultiApp to transfer the data to
Optional Parameters
- _called_legacy_paramsTrue
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- skip_coordinate_collapsingTrueWhether to skip coordinate collapsing (translation and rotation are still performed, only XYZ, RZ etc collapsing is skipped) when performing mapping and inverse mapping coordinate transformation operations. This parameter should only be set by users who really know what they're doing.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to skip coordinate collapsing (translation and rotation are still performed, only XYZ, RZ etc collapsing is skipped) when performing mapping and inverse mapping coordinate transformation operations. This parameter should only be set by users who really know what they're doing.
- 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
Unit:(no unit assumed)
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.