MultiAppReporterTransfer

Transfers reporter data between the main application and sub-application(s).

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.

Example Input File Syntax

schooltip

You can initialize arbitrary data containers for "to_reporters" with the following objects:

Transferring VectorPostprocessors

Here, we are transferring data between vectorpostprocessors:

Main application VPPs

[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
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Sub-application VPPs

[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'
  []
[]
(test/tests/transfers/reporter_transfer/sub0.i)

Main application VPP 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'
    direction = to_multiapp
    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'
    direction = from_multiapp
    multi_app = sub
    subapp_index = 0
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Transferring Reporter Vectors

Here, we are transferring data between a reporter vector and vectorpostprocessors:

Main application 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'
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Sub-application VPPs

[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'
  []
[]
(test/tests/transfers/reporter_transfer/sub0.i)

Main application vector transfers

[Transfers]
  [vector_to_vpp]
    type = MultiAppReporterTransfer
    to_reporters = 'to_sub_vpp/a'
    from_reporters = 'from_main_rep/vec'
    direction = to_multiapp
    multi_app = sub
    subapp_index = 0
  []
  
  [vector_from_vpp]
    type = MultiAppReporterTransfer
    to_reporters = 'to_main_rep/vec'
    from_reporters = 'from_sub_vpp/a'
    direction = from_multiapp
    multi_app = sub
    subapp_index = 0
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Transferring Reporter Real Numbers

Here, we are transferring data between a reporter real number and postprocessors:

Main application 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'
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Sub-application Postprocessors

[Postprocessors]
  [to_sub_pp]
    type = Receiver
  []
  [from_sub_pp]
    type = Receiver
    default = 3.1415926
  []
[]
(test/tests/transfers/reporter_transfer/sub0.i)

Main application real transfers

[Transfers]
  [real_from_pp]
    type = MultiAppReporterTransfer
    to_reporters = 'to_main_rep/num'
    from_reporters = 'from_sub_pp/value'
    direction = from_multiapp
    multi_app = sub
    subapp_index = 0
  []
  
  [real_to_pp]
    type = MultiAppReporterTransfer
    to_reporters = 'to_sub_pp/value'
    from_reporters = 'from_main_rep/num'
    direction = to_multiapp
    multi_app = sub
    subapp_index = 0
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Transferring Reporter Integers and Strings

Here, we are transferring integer and string data between reporters:

Main application 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'
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Sub-application reporters

[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'
  []
[]
(test/tests/transfers/reporter_transfer/sub0.i)

Main application reporter transfers

[Transfers]
  [int_to_int]
    type = MultiAppReporterTransfer
    to_reporters = 'to_sub_rep/int'
    from_reporters = 'from_main_rep/int'
    direction = to_multiapp
    multi_app = sub
    subapp_index = 0
  []
  
  [int_from_int]
    type = MultiAppReporterTransfer
    to_reporters = 'to_main_rep/int'
    from_reporters = 'from_sub_rep/int'
    direction = from_multiapp
    multi_app = sub
    subapp_index = 0
  []
  
  [string_from_string]
    type = MultiAppReporterTransfer
    to_reporters = 'to_main_rep/str'
    from_reporters = 'from_sub_rep/str'
    direction = from_multiapp
    multi_app = sub
    subapp_index = 0
  []
  
  [string_to_string]
    type = MultiAppReporterTransfer
    to_reporters = 'to_sub_rep/str'
    from_reporters = 'from_main_rep/str'
    direction = to_multiapp
    multi_app = sub
    subapp_index = 0
  []
[]
(test/tests/transfers/reporter_transfer/main.i)

Input Parameters

  • directionWhether this Transfer will be 'to' or 'from' a MultiApp, or bidirectional, by providing both FROM_MULTIAPP and TO_MULTIAPP.

    C++ Type:MultiMooseEnum

    Options:to_multiapp, from_multiapp

    Description:Whether this Transfer will be 'to' or 'from' a MultiApp, or bidirectional, by providing both FROM_MULTIAPP and TO_MULTIAPP.

  • from_reportersList of the reporter names (object_name/value_name) to transfer the value from.

    C++ Type:std::vector<ReporterName>

    Options:

    Description:List of the reporter names (object_name/value_name) to transfer the value from.

  • multi_appThe name of the MultiApp to use.

    C++ Type:MultiAppName

    Options:

    Description:The name of the MultiApp to use.

  • to_reportersList of the reporter names (object_name/value_name) to transfer the value to.

    C++ Type:std::vector<ReporterName>

    Options:

    Description:List of the reporter names (object_name/value_name) to transfer the value to.

Required Parameters

  • check_multiapp_execute_onTrueWhen false the check between the multiapp and transfer execute on flags is not preformed.

    Default:True

    C++ Type:bool

    Options:

    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

    Options:

    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

    Options:

    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.

    Default:SAME_AS_MULTIAPP

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, SAME_AS_MULTIAPP

    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.

  • 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

    Options:

    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.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    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

    Options:

    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.

Advanced Parameters

Input Files