SerializedSolutionTransfer

Serializes and transfers solution vectors for given variables from sub-applications.

Overview

This object is responsible to transfer solution fields stored in a SolutionContainer in a sub-application to a ParallelSolutionStorage. The user can specify these objects using "parallel_storage" and "solution_container" parameters. The solutions in SolutionContainer are distributed vectors using the communicator of the sub-application. Based on the value of the "serialize_on_root" parameter, this object transfers these solution fields in the following ways:

  • If "serialize_on_root" is disabled: It distributes the samples between every rank of the sub-application and serializes the solution vector on the rank which is supposed to own the sample. This approach results in more balanced workloads but requires additional effort due to misalignment with the design of Sampler-based reporters. This might result in significantly increased communication costs.

  • If "serialize_on_root" is enabled: The solution vectors are serialized and stored on the rank which corresponds to root processor of the subapp. This aligns more with the design of the Sampler-based reporters, but can cause significant imbalances in the workload if multiple processors are used for the sub-applications.

Example Syntax

The following input file snippet shows how to use the serialized solution transfer to extract variables u and v from the data stored on the apps within MultiApp worker into a parallel storage reporter with a name of parallel_storage.

[Transfers<<<{"href": "../../syntax/Transfers/index.html"}>>>]
  [param_transfer]
    type = SamplerParameterTransfer<<<{"description": "Copies Sampler data to a SamplerReceiver object.", "href": "SamplerParameterTransfer.html"}>>>
    to_multi_app<<<{"description": "The name of the MultiApp to transfer the data to"}>>> = worker
    sampler<<<{"description": "A the Sampler object that Transfer is associated.."}>>> = sample
    parameters<<<{"description": "A list of parameters (on the sub application) to control with the Sampler data. The order of the parameters listed here should match the order of the items in the Sampler."}>>> = 'Kernels/source_u/value BCs/right_v/value'
  []
  [solution_transfer]
    type = SerializedSolutionTransfer<<<{"description": "Serializes and transfers solution vectors for given variables from sub-applications.", "href": "SerializedSolutionTransfer.html"}>>>
    parallel_storage<<<{"description": "The name of the parallel storage reporter."}>>> = parallel_storage
    from_multi_app<<<{"description": "The name of the MultiApp to receive data from"}>>> = worker
    sampler<<<{"description": "A the Sampler object that Transfer is associated.."}>>> = sample
    solution_container<<<{"description": "The name of the solution container on the subapp."}>>> = solution_storage
    variables<<<{"description": "The names of the variables which should be serialized and transferred to this application."}>>> = 'u v'
    serialize_on_root<<<{"description": "If we want to gather the solution fields only on the root processors of the subapps before transfering to the main app."}>>> = true
  []
[]
(moose/modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sst_main.i)

Syntax

Input Parameters

  • parallel_storageThe name of the parallel storage reporter.

    C++ Type:std::string

    Controllable:No

    Description:The name of the parallel storage reporter.

  • solution_containerThe name of the solution container on the subapp.

    C++ Type:std::string

    Controllable:No

    Description:The name of the solution container on the subapp.

  • variablesThe names of the variables which should be serialized and transferred to this application.

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

    Unit:(no unit assumed)

    Controllable:No

    Description:The names of the variables which should be serialized and transferred to this application.

Required Parameters

  • check_multiapp_execute_onFalseWhen false the check between the multiapp and transfer execute on flags is not performed.

    Default:False

    C++ Type:bool

    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

    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. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:SAME_AS_MULTIAPP

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM, SAME_AS_MULTIAPP, POST_ADAPTIVITY

    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

    Controllable:No

    Description:The name of the MultiApp to receive data from

  • samplerA the Sampler object that Transfer is associated..

    C++ Type:SamplerName

    Controllable:No

    Description:A the Sampler object that Transfer is associated..

  • serialize_on_rootFalseIf we want to gather the solution fields only on the root processors of the subapps before transfering to the main app.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:If we want to gather the solution fields only on the root processors of the subapps before transfering to the main app.

  • 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.

  • 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

    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

    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.

Advanced Parameters