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]
  [param_transfer]
    type = SamplerParameterTransfer
    to_multi_app = worker
    sampler = sample
    parameters = 'Kernels/source_u/value BCs/right_v/value'
  []
  [solution_transfer]
    type = SerializedSolutionTransfer
    parallel_storage = parallel_storage
    from_multi_app = worker
    sampler = sample
    solution_container = solution_storage
    variables = 'u v'
    serialize_on_root = true
  []
[]
(contrib/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

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of the parallel storage reporter.

  • solution_containerThe name of the solution container on the subapp.

    C++ Type:std::string

    Unit:(no unit assumed)

    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

    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.

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

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

    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

  • samplerA the Sampler object that Transfer is associated..

    C++ Type:SamplerName

    Unit:(no unit assumed)

    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

    Unit:(no unit assumed)

    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

    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.

Advanced Parameters