- 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_reportersList of the reporter names (object_name/value_name) to transfer the value to.
C++ Type:std::vector<ReporterName>
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.
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:
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/multiapp_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/multiapp_reporter_transfer/sub0.i)Main application VPP transfers
[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
[]
[]
[]
(test/tests/transfers/multiapp_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/multiapp_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/multiapp_reporter_transfer/sub0.i)Main application vector transfers
[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
[]
[]
[]
(test/tests/transfers/multiapp_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/multiapp_reporter_transfer/main.i)Sub-application Postprocessors
[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
(test/tests/transfers/multiapp_reporter_transfer/sub0.i)Main application real transfers
[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
[]
[]
[]
(test/tests/transfers/multiapp_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/multiapp_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/multiapp_reporter_transfer/sub0.i)Main application reporter transfers
[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
[]
[]
[]
(test/tests/transfers/multiapp_reporter_transfer/main.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
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, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, SAME_AS_MULTIAPP.
Default:SAME_AS_MULTIAPP
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, 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, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, SAME_AS_MULTIAPP.
- 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
- 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
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
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
Input Files
- (modules/optimization/examples/materialTransient/optimize_auto_adjoint.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/main.i)
- (modules/optimization/examples/simpleTransient/main_auto_adjoint.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/single_fracture_heat_transfer/matrix_app.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/main.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/main.i)
- (test/tests/transfers/multiapp_reporter_transfer/between_multiapp/main.i)
- (modules/optimization/examples/materialTransient/optimize_grad.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/main_nonLinear.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_dirac.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_trainer.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/main_auto_adjoint.i)
- (modules/optimization/examples/simpleTransient/main_mesh.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/main_auto_adjoint.i)
- (modules/optimization/examples/materialTransient/optimize_nograd.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/main.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/main_auto_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/nonlinear_material/main.i)
- (modules/optimization/test/tests/executioners/constrained/inequality/main_auto_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/main.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_trainer.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/main.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/main.i)
- (modules/stochastic_tools/examples/parameter_study/main_time.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_nonconforming.i)
- (test/tests/transfers/multiapp_reporter_transfer/main.i)
- (modules/stochastic_tools/test/tests/multiapps/nested_multiapp/main.i)
- (modules/optimization/test/tests/optimizationreporter/material/main.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/main.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/main.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/main_auto_adjoint.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
- (modules/combined/test/tests/optimization/invOpt_multiExperiment/main.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/main_linearRestart.i)
- (modules/optimization/examples/simpleTransient/main.i)
- (modules/combined/test/tests/optimization/invOpt_mechanics/main.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/main_auto_adjoint.i)
- (modules/stochastic_tools/test/tests/multiapps/nested_multiapp/sub.i)
- (modules/combined/test/tests/optimization/invOpt_multiExperiment/sampler_subapp.i)
- (modules/optimization/examples/simpleTransient/main_gradient.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/main.i)
from_reporters
C++ Type:std::vector<ReporterName>
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value from.
to_reporters
C++ Type:std::vector<ReporterName>
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value to.
subapp_index
Default:4294967295
C++ Type:unsigned int
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.
subapp_index
Default:4294967295
C++ Type:unsigned int
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_reporters
C++ Type:std::vector<ReporterName>
Controllable:No
Description:List of the reporter names (object_name/value_name) to transfer the value to.
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/sub0.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
[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'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
postprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/sub0.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
[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'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
postprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/sub0.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
[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'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
postprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/sub0.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Postprocessors]
[to_sub_pp]
type = Receiver
[]
[from_sub_pp]
type = Receiver
default = 3.1415926
[]
[]
[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'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
postprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(modules/optimization/examples/materialTransient/optimize_auto_adjoint.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'D'
num_values = '4'
initial_condition = '0.01 0.01 0.01 0.01'
upper_bounds = '1e2'
lower_bounds = '1e-3'
measurement_file = forward_out_data_0011.csv
file_xcoord = measurement_xcoord
file_ycoord = measurement_ycoord
file_zcoord = measurement_zcoord
file_time = measurement_time
file_value = simulation_values
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = FORWARD
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/D'
to_reporters = 'data/measurement_xcoord
data/measurement_ycoord
data/measurement_zcoord
data/measurement_time
data/measurement_values
diffc_rep/D_vals'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'data/simulation_values
adjoint/inner_product'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_D'
[]
[]
[Executioner]
type = Optimize
tao_solver = taobqnls
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-4'
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/main.i)
[Optimization]
[]
[OptimizationReporter]
type = GeneralOptimization
parameter_names = 'radii'
num_values_name = num_radii
equality_names = 'volume_constraint'
initial_condition = '0 0'
lower_bounds = '-10'
upper_bounds = '10'
objective_name = max_temp
[]
[Executioner]
type = Optimize
tao_solver = taoalmm
petsc_options_iname = '-tao_almm_subsolver_tao_type -tao_gatol -tao_catol -tao_almm_type -tao_almm_mu_init -tao_fd_gradient -tao_fd_delta'
petsc_options_value = 'bqnktr 1e-3 1e-3 phr 1e9 true 1e-8 '
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
# Run on initial so the forward problem can determine number of parameters
execute_on = 'INITIAL FORWARD'
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/radii'
to_reporters = 'params/radii'
execute_on = FORWARD
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'params/num_params
objective/value
vol_constraint/vol_constraint
eq_grad/eq_grad'
to_reporters = 'OptimizationReporter/num_radii
OptimizationReporter/max_temp
OptimizationReporter/volume_constraint
OptimizationReporter/grad_volume_constraint'
[]
[]
[Outputs]
csv = true
print_linear_residuals = false
print_nonlinear_residuals = false
[]
(modules/optimization/examples/simpleTransient/main_auto_adjoint.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'source'
num_values = '44'
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = FORWARD
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/source'
to_reporters = 'src_values/values'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measured_data/misfit_values measured_data/simulation_values adjoint/inner_product'
to_reporters = 'OptimizationReporter/misfit_values OptimizationReporter/simulation_values OptimizationReporter/grad_source'
[]
[]
[Executioner]
type = Optimize
solve_on = none
tao_solver = taolmvm
petsc_options_iname = '-tao_gatol -tao_ls_type'
petsc_options_value = '1e-2 unit'
verbose = true
[]
(modules/porous_flow/examples/multiapp_fracture_flow/single_fracture_heat_transfer/matrix_app.i)
# Matrix physics, which is just heat conduction. Heat energy comes from the fracture App
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 100.0
ny = 9
ymin = -9
ymax = 9
[]
[]
[Variables]
[matrix_T]
initial_condition = 40 # degC
[]
[]
[Kernels]
[dot]
type = CoefTimeDerivative
variable = matrix_T
Coefficient = 1E5
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1 0 0 0 1 0 0 0 1'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 100
nl_abs_tol = 1E-3
[]
[Outputs]
print_linear_residuals = false
exodus = true
csv=true
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app.i
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/main.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'parameter_results'
num_values = '1'
initial_condition = '500'
lower_bounds = '0.1'
upper_bounds = '10000'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '226 254 214 146'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-6'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/q'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/parameter_results'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/q'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/grad_parameter_results'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/main.i)
# This main.i file runs the subapps model.i and grad.i, using an FullSolveMultiApp
# The purpose of main.i is to find the two diffusivity_values
# (one in the bottom material of model.i, and one in the top material of model.i)
# such that the misfit between experimental observations (defined in model.i) and MOOSE predictions is minimised.
# The adjoint computed in grad.i is used to compute the gradient for the gradient based LMVM solver in TAO
# PETSc-TAO optimisation is used to perform this inversion
#
[Optimization]
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = diffusivity_values
num_values = 2 # diffusivity in the bottom material and in the top material of model.i
initial_condition = '15 15' # the expected result is about '1 10' so this initial condition is not too bad
lower_bounds = '1'
upper_bounds = '50'
measurement_file = 'synthetic_data.csv'
file_value = 'temperature'
[]
[Executioner]
# type = Optimize
# tao_solver = taoblmvm
# petsc_options_iname = '-tao_fd_gradient -tao_gatol'
# petsc_options_value = ' true 0.001'
type = Optimize
tao_solver = taobqnktr
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-3'
## THESE OPTIONS ARE FOR TESTING THE ADJOINT GRADIENT
# petsc_options_iname='-tao_max_it -tao_fd_test -tao_test_gradient -tao_fd_gradient -tao_fd_delta -tao_gatol'
# petsc_options_value='1 true true false 1e-8 0.1'
# petsc_options = '-tao_test_gradient_view'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = model.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = grad.i #write this input file to compute the adjoint solution and the gradient
execute_on = ADJOINT
[]
[]
[Transfers]
[toForward] #pass the coordinates where we knew the measurements to the forward model to do the extraction of the simulation data at the location of the measurements to compute the misfit
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/diffusivity_values'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
data/diffusivity'
[]
[from_forward] #get the simulation values
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
#############
#copy the temperature variable - we will need this for the computation of the gradient
[fromforwardMesh]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'temperature'
variable = 'temperature_forward'
[]
#############
[toAdjoint] #pass the misfit to the adjoint
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/diffusivity_values'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
data/diffusivity'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradvec/inner_product'
to_reporters = 'OptimizationReporter/grad_diffusivity_values'
[]
[]
[Outputs]
console = false
csv = true
[]
(test/tests/transfers/multiapp_reporter_transfer/between_multiapp/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[MultiApps]
[pp_sub_0]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub0.i
[]
[pp_sub_1]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub1.i
[]
[]
[Transfers]
[pp_transfer_1]
type = MultiAppReporterTransfer
from_multi_app = pp_sub_0
to_multi_app = pp_sub_1
from_reporters = 'base_sub0_vpp/a base_sub0_vpp/b'
to_reporters = 'from_sub0_vpp/a from_sub0_vpp/b'
[]
[pp_transfer_2]
type = MultiAppReporterTransfer
from_multi_app = pp_sub_1
to_multi_app = pp_sub_0
from_reporters = 'base_sub1_vpp/a base_sub1_vpp/b'
to_reporters = 'from_sub1_vpp/a from_sub1_vpp/b'
[]
[]
(modules/optimization/examples/materialTransient/optimize_grad.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'D'
num_values = '4'
initial_condition = '0.01 0.01 0.01 0.01'
upper_bounds = '1e2'
lower_bounds = '1e-3'
measurement_file = forward_out_data_0011.csv
file_xcoord = measurement_xcoord
file_ycoord = measurement_ycoord
file_zcoord = measurement_zcoord
file_time = measurement_time
file_value = simulation_values
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
cli_args = 'Outputs/csv=false;Outputs/console=false'
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = gradient.i
cli_args = 'Outputs/console=false;UserObjects/load_u/mesh=optimize_grad_out_forward0.e'
execute_on = ADJOINT
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/D'
to_reporters = 'data/measurement_xcoord
data/measurement_ycoord
data/measurement_zcoord
data/measurement_time
data/measurement_values
diffc_rep/D_vals'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[to_adjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/D'
to_reporters = 'data/measurement_xcoord
data/measurement_ycoord
data/measurement_zcoord
data/measurement_time
data/misfit_values
diffc_rep/D_vals'
[]
[from_adjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint/inner_product'
to_reporters = 'OptimizationReporter/grad_D'
[]
[]
[Executioner]
type = Optimize
tao_solver = taobqnls
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-4'
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/main_nonLinear.i)
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'parameter_results'
num_values = '1'
initial_condition = '500'
lower_bounds = '0.1'
upper_bounds = '10000'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '270 339 321 221'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '.01'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_nonLinear.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint_nonLinear.i
execute_on = ADJOINT
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/q'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/parameter_results'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/q'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/grad_parameter_results'
[]
#for temperature dependent material
[fromforwardMesh]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'T'
variable = 'T'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_dirac.i)
# A fracture, which is a 1D line of elements, is embedded in a matrix, which is a 2D surface of elements.
# The meshes conform: all fracture nodes are also matrix nodes (the fracture elements are sides of matrix elements).
#
# The heat equation governs temperature in the fracture and matrix system, and heat energy is transferred between the two using a MultiApp approach
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 10.0
ny = 20 # anything less than this produces over/under-shoots
ymin = -2
ymax = 2
[]
[]
[Variables]
[matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1E-3 0 0 0 1E-3 0 0 0 1E-3'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
[]
[Outputs]
print_linear_residuals = false
exodus = false
csv=true
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app_dirac.i
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_trainer.i)
[StochasticTools]
[]
[Samplers]
[dummy]
type = CartesianProduct
linear_space_items = '0 0.01 1'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = dummy
input_files = 'libtorch_drl_control_sub.i'
[]
[]
[Transfers]
[nn_transfer]
type = LibtorchNeuralNetControlTransfer
to_multi_app = runner
trainer_name = nn_trainer
control_name = src_control
[]
[r_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
to_reporters = 'results/center_temp results/env_temp results/reward results/left_flux results/log_prob_left_flux'
from_reporters = 'T_reporter/center_temp_tend:value T_reporter/env_temp:value T_reporter/reward:value T_reporter/left_flux:value T_reporter/log_prob_left_flux:value'
[]
[]
[Trainers]
[nn_trainer]
type = LibtorchDRLControlTrainer
response = 'results/center_temp results/env_temp'
control = 'results/left_flux'
log_probability = 'results/log_prob_left_flux'
reward = 'results/reward'
num_epochs = 10
update_frequency = 2
decay_factor = 0.0
loss_print_frequency = 3
critic_learning_rate = 0.0005
num_critic_neurons_per_layer = '4 2'
control_learning_rate = 0.0005
num_control_neurons_per_layer = '4 2'
# keep consistent with LibtorchNeuralNetControl
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
read_from_file = false
[]
[]
[Reporters]
[results]
type = ConstantReporter
real_vector_names = 'center_temp env_temp reward left_flux log_prob_left_flux'
real_vector_values = '0; 0; 0; 0; 0;'
outputs = 'csv_out'
execute_on = timestep_begin
[]
[nn_parameters]
type = DRLControlNeuralNetParameters
trainer_name = nn_trainer
outputs = json_out
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = train_out
[json_out]
type = JSON
execute_on = TIMESTEP_BEGIN
execute_system_information_on = NONE
[]
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/main_auto_adjoint.i)
# This main.i file runs the subapps model.i and grad.i, using an FullSolveMultiApp
# The purpose of main.i is to find the two diffusivity_values
# (one in the bottom material of model.i, and one in the top material of model.i)
# such that the misfit between experimental observations (defined in model.i) and MOOSE predictions is minimised.
# The adjoint computed in grad.i is used to compute the gradient for the gradient based LMVM solver in TAO
# PETSc-TAO optimisation is used to perform this inversion
#
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = diffusivity_values
num_values = 2 # diffusivity in the bottom material and in the top material of model.i
initial_condition = '3 4' # the expected result is about '1 10' so this initial condition is not too bad
lower_bounds = '1'
upper_bounds = '20'
measurement_file = 'synthetic_data.csv'
file_value = 'temperature'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-3'
## THESE OPTIONS ARE FOR TESTING THE ADJOINT GRADIENT
# petsc_options_iname='-tao_max_it -tao_fd_test -tao_test_gradient -tao_fd_gradient -tao_fd_delta -tao_gatol'
# petsc_options_value='1 true true false 1e-8 0.1'
# petsc_options = '-tao_test_gradient_view'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = model_and_adjoint.i
execute_on = FORWARD
[]
[]
[Transfers]
[toForward] #pass the coordinates where we knew the measurements to the forward model to do the extraction of the simulation data at the location of the measurements to compute the misfit
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/diffusivity_values'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
data/diffusivity'
[]
[from_forward] #get the simulation values
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values
gradvec/inner_product'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_diffusivity_values'
[]
[]
[Outputs]
console = true
csv = true
[]
(modules/optimization/examples/simpleTransient/main_mesh.i)
[Optimization]
[]
[OptimizationReporter]
type = ParameterMeshOptimization
parameter_names = 'source'
parameter_meshes = source_mesh_in.e
num_parameter_times = 11
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_mesh.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint_mesh.i
execute_on = ADJOINT
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/source'
to_reporters = 'src_values/values'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measured_data/misfit_values measured_data/simulation_values'
to_reporters = 'OptimizationReporter/misfit_values OptimizationReporter/simulation_values'
[]
[to_adjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/source OptimizationReporter/misfit_values'
to_reporters = 'src_values/values measured_data/misfit_values'
[]
[from_adjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint/inner_product'
to_reporters = 'OptimizationReporter/grad_source'
[]
[]
[Executioner]
type = Optimize
solve_on = none
tao_solver = taolmvm
petsc_options_iname = '-tao_gatol -tao_ls_type'
petsc_options_value = '1e-2 unit'
verbose = true
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/main_auto_adjoint.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'parameter_results'
num_values = '3'
measurement_points = '0.5 0.28 0
0.5 0.6 0
0.5 0.8 0
0.5 1.1 0'
measurement_values = '293 304 315 320'
[]
[Executioner]
type = Optimize
tao_solver = taolmvm
petsc_options_iname='-tao_gttol -tao_ls_type'
petsc_options_value='1e-5 unit'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = "FORWARD"
[]
[]
[Transfers]
# FORWARD transfers
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
point_source/value'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values
gradient/temperature_adjoint'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_parameter_results'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/examples/materialTransient/optimize_nograd.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'D'
num_values = '4'
initial_condition = '0.01 0.01 0.01 0.01'
measurement_file = forward_out_data_0011.csv
file_xcoord = measurement_xcoord
file_ycoord = measurement_ycoord
file_zcoord = measurement_zcoord
file_time = measurement_time
file_value = simulation_values
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
cli_args = 'Outputs/csv=false;Outputs/console=false'
execute_on = FORWARD
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_values
OptimizationReporter/D'
to_reporters = 'data/measurement_values
diffc_rep/D_vals'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[]
[Executioner]
type = Optimize
tao_solver = taonm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-6'
verbose = true
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/main.i)
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'p1'
num_values = '1'
initial_condition = '7'
lower_bounds = '0'
upper_bounds = '10'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '226 254 214 146'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '0.0001'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
clone_parent_mesh = true
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/p1'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/p1'
[]
[fromForward_mesh]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'temperature'
variable = 'temperature_forward'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/p1'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/p1'
[]
[fromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint_grad/inner_product'
to_reporters = 'OptimizationReporter/grad_p1'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/mesh_source/main_auto_adjoint.i)
[Optimization]
[]
[OptimizationReporter]
type = ParameterMeshOptimization
parameter_names = 'source'
parameter_meshes = 'parameter_mesh_in.e'
# Random points
measurement_points = '0.78193073 0.39115321 0
0.72531893 0.14319403 0
0.14052488 0.86976625 0
0.401893 0.54241797 0
0.02645427 0.43320192 0
0.28856889 0.0035165 0
0.51433644 0.94485949 0
0.29252255 0.7962032 0
0.04925654 0.58018889 0
0.04717357 0.9556314 0'
# sin(x*pi/2)*sin(y*pi/2)
measurement_values = '0.54299466 0.20259611 0.21438235 0.44418597 0.02613676
0.00241892 0.72014019 0.42096307 0.06108895 0.07385256'
[]
[Executioner]
type = Optimize
tao_solver = taobqnls
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-4'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = FORWARD
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/source'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
src_rep/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values
gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_source'
[]
[]
(modules/optimization/test/tests/optimizationreporter/nonlinear_material/main.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'heat_source'
num_values = '1'
initial_condition = '0'
lower_bounds = '0.1'
upper_bounds = '10000'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '1.98404 1.91076 1.56488 1.23863'
[]
[Executioner]
type = Optimize
tao_solver = taolmvm
petsc_options_iname = '-tao_gttol'
petsc_options_value = ' 1e-5'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = FORWARD
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/heat_source'
to_reporters = 'measurement_locations/measurement_xcoord
measurement_locations/measurement_ycoord
measurement_locations/measurement_zcoord
measurement_locations/measurement_time
measurement_locations/measurement_values
params/heat_source'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measurement_locations/simulation_values
gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_heat_source'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/executioners/constrained/inequality/main_auto_adjoint.i)
# This tests constrained optimization of a linear and constant function
# that are used to apply NuemannBCs on a side.
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'left'
num_values = '2'
initial_condition = '10 10'
lower_bounds = '0'
upper_bounds = '1000'
inequality_names = 'ineq'
measurement_points = '0.2 0.2 0'
measurement_values = '207'
file_value = 'measured_value'
[]
[Executioner]
type = Optimize
tao_solver = taoalmm
petsc_options_iname = '-tao_gatol -tao_catol -tao_almm_type -tao_almm_mu_factor -tao_almm_mu_init -tao_almm_subsolver_tao_type'
petsc_options_value = ' 1e-3 1e-3 phr 1.1 1.0 bqnktr'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = "FORWARD"
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/left'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/left'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values
grad_bc_left/inner_product
ineq/ineq
gradient_c/gradient_c'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_left
OptimizationReporter/ineq
OptimizationReporter/grad_ineq'
[]
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/main.i)
# This tests that a linear and constant function can be scaled in
# two separate functionNeumannBCs both applied to the same sideset using
# two parsed functions. The scale of the linear and constant functions
# are being parameterized.
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
bias_x = 1.1
bias_y = 1.1
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'left right'
num_values = '2 1'
measurement_file = 'measurementData.csv'
file_xcoord = 'coordx'
file_ycoord ='y'
file_zcoord = 'z'
file_value = 'weightedMeasurement'
file_variable_weights = 'weight'
[]
[Executioner]
type = Optimize
tao_solver = taonls
petsc_options_iname = '-tao_gttol -tao_nls_pc_type -tao_nls_ksp_type'
petsc_options_value = '1e-3 none cg'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
clone_parent_mesh = true
[]
[homogeneousForward]
type = FullSolveMultiApp
input_files = homogeneous_forward.i
execute_on = "HOMOGENEOUS_FORWARD"
clone_parent_mesh = true
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/weight
OptimizationReporter/left
OptimizationReporter/right'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
measure_data/weightForTemperature
params_left/vals
params_right/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/weight
OptimizationReporter/left
OptimizationReporter/right'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
misfit/weight
params_left/vals
params_right/vals'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'grad_bc_left/inner_product
grad_bc_right/inner_product'
to_reporters = 'OptimizationReporter/grad_left
OptimizationReporter/grad_right'
[]
# HESSIAN transfers. Same as forward.
[toHomogeneousForward]
type = MultiAppReporterTransfer
to_multi_app = homogeneousForward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/weight
OptimizationReporter/left
OptimizationReporter/right'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
measure_data/weightForTemperature
params_left/vals
params_right/vals'
[]
[fromHomogeneousForward]
type = MultiAppReporterTransfer
from_multi_app = homogeneousForward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
items = 'current_iterate function_value gnorm'
[]
[]
[Outputs]
csv = true
console = false
[]
(modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_trainer.i)
[StochasticTools]
[]
[Samplers]
[dummy]
type = CartesianProduct
linear_space_items = '0 0.01 1'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = dummy
input_files = 'libtorch_drl_control_sub.i'
[]
[]
[Transfers]
[nn_transfer]
type = LibtorchNeuralNetControlTransfer
to_multi_app = runner
trainer_name = nn_trainer
control_name = src_control
[]
[r_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
to_reporters = 'results/center_temp results/env_temp results/reward results/top_flux results/log_prob_top_flux'
from_reporters = 'T_reporter/center_temp_tend:value T_reporter/env_temp:value T_reporter/reward:value T_reporter/top_flux:value T_reporter/log_prob_top_flux:value'
[]
[]
[Trainers]
[nn_trainer]
type = LibtorchDRLControlTrainer
response = 'results/center_temp results/env_temp'
control = 'results/top_flux'
log_probability = 'results/log_prob_top_flux'
reward = 'results/reward'
num_epochs = 1000
update_frequency = 10
decay_factor = 0.0
loss_print_frequency = 10
critic_learning_rate = 0.0001
num_critic_neurons_per_layer = '64 27'
control_learning_rate = 0.0005
num_control_neurons_per_layer = '16 6'
# keep consistent with LibtorchNeuralNetControl
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
standardize_advantage = true
read_from_file = false
[]
[]
[Reporters]
[results]
type = ConstantReporter
real_vector_names = 'center_temp env_temp reward top_flux log_prob_top_flux'
real_vector_values = '0; 0; 0; 0; 0;'
outputs = csv
execute_on = timestep_begin
[]
[reward]
type = DRLRewardReporter
drl_trainer_name = nn_trainer
[]
[]
[Executioner]
type = Transient
num_steps = 440
[]
[Outputs]
file_base = output/train_out
csv = true
interval = 10
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/main.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'parameter_results'
num_values = '3'
measurement_points = '0.5 0.28 0
0.5 0.6 0
0.5 0.8 0
0.5 1.1 0'
measurement_values = '293 304 315 320'
[]
[Executioner]
type = Optimize
tao_solver=taonls
petsc_options_iname='-tao_gttol -tao_max_it -tao_nls_pc_type -tao_nls_ksp_type'
petsc_options_value='1e-5 10 none cg'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
[]
[homogeneousForward]
type = FullSolveMultiApp
input_files = forward_homogeneous.i
execute_on = "HOMOGENEOUS_FORWARD"
[]
[]
[Transfers]
# FORWARD transfers
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
point_source/value'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
# ADJOINT transfers
#NOTE: the adjoint variable we are transferring is actually the gradient
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values'
[]
[fromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient/adjoint'
to_reporters = 'OptimizationReporter/grad_parameter_results'
[]
# HESSIAN transfers. Same as forward.
[toHomoForward]
type = MultiAppReporterTransfer
multi_app = homogeneousForward
direction = to_multiapp
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
point_source/value'
[]
[fromHomoForward]
type = MultiAppReporterTransfer
multi_app = homogeneousForward
direction = from_multiapp
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/mesh_source/main.i)
[Optimization]
[]
[OptimizationReporter]
type = ParameterMeshOptimization
parameter_names = 'source'
parameter_meshes ='parameter_mesh_in.e'
# Random points
measurement_points = '0.78193073 0.39115321 0
0.72531893 0.14319403 0
0.14052488 0.86976625 0
0.401893 0.54241797 0
0.02645427 0.43320192 0
0.28856889 0.0035165 0
0.51433644 0.94485949 0
0.29252255 0.7962032 0
0.04925654 0.58018889 0
0.04717357 0.9556314 0'
# sin(x*pi/2)*sin(y*pi/2)
measurement_values = '0.54299466 0.20259611 0.21438235 0.44418597 0.02613676
0.00241892 0.72014019 0.42096307 0.06108895 0.07385256'
[]
[Executioner]
type = Optimize
tao_solver = taolmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-4'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/source'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
src_rep/vals'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/source'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
src_rep/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/grad_source'
[]
[]
(modules/stochastic_tools/examples/parameter_study/main_time.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = hypercube
input_files = 'diffusion_time.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value T_vec/T'
[]
[x_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
subapp_index = 0
from_reporters = T_vec/x
to_reporters = const/x
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value results/results:T_vec:T'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[const]
type = ConstantReporter
real_vector_names = 'x'
real_vector_values = '0'
[]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Outputs]
execute_on = timestep_end
[out]
type = JSON
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_nonconforming.i)
# A fracture, which is a 1D line of elements, is embedded in a matrix, which is a 2D surface of elements.
# The meshes conform: all fracture nodes are also matrix nodes (the fracture elements are sides of matrix elements).
#
# The heat equation governs temperature in the fracture and matrix system, and heat energy is transferred between the two using a MultiApp approach
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 10.0
ny = 20
ymin = -1.9
ymax = 2.1
[]
[]
[Variables]
[matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1E-3 0 0 0 1E-3 0 0 0 1E-3'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[Outputs]
print_linear_residuals = false
exodus = false
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app_dirac.i
cli_args = 'Kernels/toMatrix/transfer_coefficient=0.01'
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[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
[]
[]
[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'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP 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
[]
# Vector-VPP 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
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int 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-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_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
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/multiapps/nested_multiapp/main.i)
[Mesh/gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 1
[]
[Variables/u]
[]
[Kernels/diff]
type = Diffusion
variable = u
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 10
[]
[]
[Postprocessors/val]
type = PointValue
variable = u
point = '0 0 0'
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Reporters/receive]
type = ConstantReporter
real_names = 'sub_val subsub0_left_val subsub1_left_val subsub0_right_val subsub1_right_val'
real_values = '0 0 0 0 0'
[]
[MultiApps/sub]
type = FullSolveMultiApp
input_files = 'sub.i'
execute_on = timestep_begin
[]
[Transfers/sub]
type = MultiAppReporterTransfer
from_multi_app = sub
from_reporters = 'val/value receive/subsub0_left_val receive/subsub0_right_val receive/subsub1_left_val receive/subsub1_right_val'
to_reporters = 'receive/sub_val receive/subsub0_left_val receive/subsub0_right_val receive/subsub1_left_val receive/subsub1_right_val'
[]
[Controls/stm]
type = SamplerReceiver
[]
(modules/optimization/test/tests/optimizationreporter/material/main.i)
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'p1'
num_values = '1'
initial_condition = '7'
lower_bounds = '0'
upper_bounds = '10'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '226 254 214 146'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '0.0001'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
clone_parent_mesh = true
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/p1'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/p1'
[]
[fromForward_mesh]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'temperature'
variable = 'temperature_forward'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/p1'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/p1'
[]
[fromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint_grad/inner_product'
to_reporters = 'OptimizationReporter/grad_p1'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/main.i)
[Optimization]
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
[]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'p1'
num_values = '1'
initial_condition = '9'
upper_bounds = '10'
lower_bounds = '1'
measurement_points = '0.1 0 0
0.1 0.1 0
0.1 0.2 0
0.1 0.3 0
0.1 0.4 0
0.1 0.5 0
0.1 0.6 0
0.1 0.7 0
0.1 0.8 0
0.1 0.9 0
0.1 1 0
0.1 1.1 0
0.1 1.2 0
0.1 1.3 0
0.1 1.4 0
0.1 1.5 0
0.1 1.6 0
0.1 1.7 0
0.1 1.8 0
0.1 1.9 0
0.1 2 0'
measurement_values = '500
472.9398111
450.8117197
434.9560747
423.3061045
414.9454912
409.3219399
406.1027006
405.0865428
406.1604905
409.2772668
414.4449772
421.7253934
431.2401042
443.1862012
457.8664824
475.7450186
497.5582912
524.4966003
559.1876637
600'
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm #taolmvm#taonm #taolmvm
petsc_options_iname = '-tao_gatol' # -tao_fd_gradient -tao_fd_delta'
petsc_options_value = '1e-4' #1e-1 '#true 1e-4'
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
clone_parent_mesh = true
[]
[]
[Transfers]
#these are usually the same for all input files.
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/p1'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/p1'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/vals'
[]
[fromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint_pt/inner_product'
to_reporters = 'OptimizationReporter/grad_p1'
[]
# these are transferring data from subapp to subapp because the adjoint problem
# needs the forward solution to compute the gradient. Maybe this step could be
# done on the main app. The adjoint only passes the adjoint variable (whole mesh)
# to the main app and the main app computes the gradient from this.
[fromForwardtoAdjoint_temp]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'temperature'
variable = 'temperature_forward'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/main.i)
[Optimization]
[]
[OptimizationReporter]
type = GeneralOptimization
parameter_names = 'vals'
num_values = '2'
objective_name = obj_value
[]
[Problem]
solve = false
[]
[Executioner]
type = Optimize
tao_solver = taobqnktr
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-8 '
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/vals'
to_reporters = 'vals/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'obj_pp/value
grad_f/grad_f'
to_reporters = 'OptimizationReporter/obj_value
OptimizationReporter/grad_vals'
[]
[]
[Outputs]
[json]
type = JSON
execute_system_information_on = none
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/main_auto_adjoint.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'parameter_results'
num_values = '3'
measurement_points = '0.5 0.28 0
0.5 0.6 0
0.5 0.8 0
0.5 1.1 0'
measurement_values = '293 304 315 320'
[]
[Executioner]
type = Optimize
tao_solver = taolmvm
petsc_options_iname='-tao_gttol -tao_ls_type'
petsc_options_value='1e-5 unit'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = "FORWARD"
[]
[]
[Transfers]
# FORWARD transfers
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/parameter_results'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
point_source/value'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values
gradient/temperature_adjoint'
to_reporters = 'OptimizationReporter/simulation_values
OptimizationReporter/grad_parameter_results'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
# 3D matrix app doing thermo-hydro PorousFlow and receiving heat energy via a VectorPostprocessor from the 2D fracture App
[Mesh]
uniform_refine = 0
[generate]
type = GeneratedMeshGenerator
dim = 3
nx = 11
xmin = -10
xmax = 210
ny = 9
ymin = -10
ymax = 160
nz = 11
zmin = -10
zmax = 210
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[matrix_P]
scaling = 1E6
[]
[matrix_T]
initial_condition = 473
[]
[]
[ICs]
[frac_P]
type = FunctionIC
variable = matrix_P
function = insitu_pp
[]
[]
[Functions]
[insitu_pp]
type = ParsedFunction
expression = '10 - 0.847E-2 * z' # Approximate hydrostatic in MPa
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = matrix_P
temperature = matrix_T
fp = water
gravity = '0 0 -9.81E-6' # Note the value, because of pressure_unit
pressure_unit = MPa
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties # this is largely irrelevant here since we care about heat conduction only
thermal_expansion = 0 # to prevent depressurization as the reservoir is cooled
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1E-3 # small porosity of rock
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2700 # kg/m^3
specific_heat_capacity = 800 # rough guess at specific heat capacity
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '5 0 0 0 5 0 0 0 5'
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[AuxVariables]
[normal_thermal_conductivity]
family = MONOMIAL
order = CONSTANT
[]
[fracture_normal_x]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[fracture_normal_y]
family = MONOMIAL
order = CONSTANT
initial_condition = 1
[]
[fracture_normal_z]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[element_normal_length]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[normal_thermal_conductivity_auxk]
type = ConstantAux
variable = normal_thermal_conductivity
value = 5 # very simple in this case
[]
[element_normal_length_auxk]
type = PorousFlowElementLength
variable = element_normal_length
direction = 'fracture_normal_x fracture_normal_y fracture_normal_z'
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
growth_factor = 1.1
optimal_iterations = 4
[]
dtmax = 1E8
end_time = 1E8
nl_abs_tol = 1E-2
[]
[Outputs]
print_linear_residuals = false
exodus = false
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_only_aperture_changing.i
cli_args = 'Outputs/ex/sync_only=false'
execute_on = TIMESTEP_BEGIN
sub_cycling = true
### catch_up = true
### max_catch_up_steps = 100
[]
[]
[Transfers]
[element_normal_length_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = element_normal_length
variable = enclosing_element_normal_length
[]
[element_normal_thermal_cond_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = normal_thermal_conductivity
variable = enclosing_element_normal_thermal_cond
[]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[normal_x_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_x
variable = fracture_normal_x
[]
[normal_y_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_y
variable = fracture_normal_y
[]
[normal_z_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_z
variable = fracture_normal_z
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(modules/combined/test/tests/optimization/invOpt_multiExperiment/main.i)
[Optimization]
[]
[OptimizationReporter]
type = GeneralOptimization
parameter_names = 'vals'
num_values = '2'
objective_name = obj_value
[]
[Executioner]
type = Optimize
tao_solver = taobqnktr
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-8 '
verbose = true
[]
[MultiApps]
[forward_sampler]
type = FullSolveMultiApp
input_files = sampler_subapp.i
execute_on = FORWARD
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward_sampler
from_reporters = 'OptimizationReporter/vals'
to_reporters = 'controllable_params/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward_sampler
from_reporters = 'obj_sum/value
grad_sum/row_sum'
to_reporters = 'OptimizationReporter/obj_value
OptimizationReporter/grad_vals'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/mesh_source/main_linearRestart.i)
[Optimization]
[]
[OptimizationReporter]
type = ParameterMeshOptimization
parameter_names = 'source'
parameter_meshes = 'parameter_mesh_restart_out.e'
exodus_timesteps_for_parameter_mesh_variable = 2
initial_condition_mesh_variable = restart_source
constant_group_lower_bounds = -1
constant_group_upper_bounds = 5
# Random points
measurement_points = '0.78193073 0.39115321 0
0.72531893 0.14319403 0
0.14052488 0.86976625 0
0.401893 0.54241797 0
0.02645427 0.43320192 0
0.28856889 0.0035165 0
0.51433644 0.94485949 0
0.29252255 0.7962032 0
0.04925654 0.58018889 0
0.04717357 0.9556314 0'
# sin(x*pi/2)*sin(y*pi/2)
measurement_values = '0.54299466 0.20259611 0.21438235 0.44418597 0.02613676
0.00241892 0.72014019 0.42096307 0.06108895 0.07385256'
outputs = none
[]
[Executioner]
type = Optimize
tao_solver = taoblmvm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e-4'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/source'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
src_rep/vals'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/source'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
src_rep/vals'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[fromadjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/grad_source'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
items = 'current_iterate function_value gnorm'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/examples/simpleTransient/main.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'source'
num_values = '44'
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[]
[Transfers]
[params]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/source'
to_reporters = 'src_values/values'
[]
[data]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measured_data/misfit_values measured_data/simulation_values'
to_reporters = 'OptimizationReporter/misfit_values OptimizationReporter/simulation_values'
[]
[]
[Executioner]
type = Optimize
solve_on = none
tao_solver = taonm
petsc_options_iname = '-tao_gatol'
petsc_options_value = '1e1'
verbose = true
[]
[Outputs]
[]
(modules/combined/test/tests/optimization/invOpt_mechanics/main.i)
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 2
xmin = 0.0
xmax = 5.0
ymin = 0.0
ymax = 1.0
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'fy_right'
num_values = '1'
measurement_points = '5.0 1.0 0.0'
measurement_values = '80.9'
initial_condition = '100'
[]
[Executioner]
type = Optimize
tao_solver = taonls
petsc_options_iname = '-tao_gttol -tao_max_it -tao_nls_pc_type -tao_nls_ksp_type'
petsc_options_value = '1e-5 50 none cg'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "FORWARD"
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = "ADJOINT"
clone_parent_mesh = true
[]
# the forward problem has homogeneous boundary conditions so it can be reused here.
[homogeneousForward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = "HOMOGENEOUS_FORWARD"
clone_parent_mesh = true
[]
[]
[Transfers]
[toForward_measument]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/fy_right'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/right_fy_value'
[]
[fromforward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[toAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/fy_right'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/right_fy_value'
[]
[fromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint_pt/inner_product'
to_reporters = 'OptimizationReporter/grad_fy_right'
[]
[toHomogeneousForward_measument]
type = MultiAppReporterTransfer
to_multi_app = homogeneousForward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/fy_right'
to_reporters = 'measure_data/measurement_xcoord
measure_data/measurement_ycoord
measure_data/measurement_zcoord
measure_data/measurement_time
measure_data/measurement_values
params/right_fy_value'
[]
[fromHomogeneousForward]
type = MultiAppReporterTransfer
from_multi_app = homogeneousForward
from_reporters = 'measure_data/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/main_auto_adjoint.i)
# This tests that a linear and constant function can be scaled in
# two separate functionNeumannBCs both applied to the same sideset using
# two parsed functions. The scale of the linear and constant functions
# are being parameterized.
[Optimization]
[]
[OptimizationReporter]
type = GeneralOptimization
parameter_names = 'left right'
num_values = '2 1'
objective_name = obj_value
[]
[Executioner]
type = Optimize
tao_solver = taobqnls
petsc_options_iname = '-tao_gatol -tao_ls_type'
petsc_options_value = '1e-5 unit'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward_and_adjoint.i
execute_on = "FORWARD"
[]
[]
[Transfers]
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/left
OptimizationReporter/right'
to_reporters = 'params/left
params/right'
[]
[fromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'obj_sum/value
grad_bc_left/inner_product
grad_bc_right/inner_product'
to_reporters = 'OptimizationReporter/obj_value
OptimizationReporter/grad_left
OptimizationReporter/grad_right'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/nested_multiapp/sub.i)
[Mesh/gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 1
[]
[Variables/u]
[]
[Kernels/diff]
type = Diffusion
variable = u
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 10
[]
[]
[Postprocessors/val]
type = PointValue
variable = u
point = '0 0 0'
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Reporters/receive]
type = ConstantReporter
real_names = 'subsub0_left_val subsub1_left_val subsub0_right_val subsub1_right_val'
real_values = '0 0 0 0'
[]
[MultiApps/subsub]
type = FullSolveMultiApp
input_files = 'subsub.i'
positions = '0 0 0 1 0 0'
execute_on = timestep_begin
[]
[Transfers]
[subsub0]
type = MultiAppReporterTransfer
from_multi_app = subsub
from_reporters = 'lval/value rval/value'
to_reporters = 'receive/subsub0_left_val receive/subsub0_right_val'
subapp_index = 0
[]
[subsub1]
type = MultiAppReporterTransfer
from_multi_app = subsub
from_reporters = 'lval/value rval/value'
to_reporters = 'receive/subsub1_left_val receive/subsub1_right_val'
subapp_index = 1
[]
[]
[Controls/stm]
type = SamplerReceiver
[]
(modules/combined/test/tests/optimization/invOpt_multiExperiment/sampler_subapp.i)
# sampler for parameterizing multiple experiments
[StochasticTools]
[]
[Samplers]
[omega_sampler]
type = InputMatrix
#omega;
matrix = '2; 3; 5'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[forward]
type = SamplerFullSolveMultiApp
input_files = forward.i
sampler = omega_sampler
ignore_solve_not_converge = true
mode = normal #This is the only mode that works. batch-reset will only transfer data to first sample
[]
[]
[Controls]
[cmdLine]
type = MultiAppSamplerControl
multi_app = forward
sampler = omega_sampler
param_names = 'omega'
[]
[]
##---------------------------------------
# Getting objectives and gradients from each sample and combining
[Transfers]
[fromForward]
type = SamplerReporterTransfer
from_multi_app = forward
sampler = omega_sampler
stochastic_reporter = storage
from_reporter = 'obj_pp/value grad_f/grad_f'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
execute_on = 'initial timestep_end'
parallel_type = ROOT
[]
[grad_sum]
type = ParsedVectorVectorRealReductionReporter
name = row_sum
reporter_name = "storage/fromForward:grad_f:grad_f"
initial_value = 0
expression = 'reduction_value+indexed_value'
[]
[obj_sum]
type = ParsedVectorRealReductionReporter
name = value
reporter_name = "storage/fromForward:obj_pp:value"
initial_value = 0
expression = 'reduction_value+indexed_value'
[]
[]
##---------------------------------------
#this is for getting controllable parameters down to the forward problem
[Reporters]
[controllable_params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 4'
[]
[]
[Transfers]
# regular transfer of the same controllable parameters to all subapps
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'controllable_params/vals'
to_reporters = 'vals/vals'
execute_on = 'TIMESTEP_BEGIN'
[]
[]
##---------------------------------------
[Outputs]
console = false
[]
(modules/optimization/examples/simpleTransient/main_gradient.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'source'
num_values = '44'
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/source'
to_reporters = 'src_values/values'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measured_data/misfit_values measured_data/simulation_values'
to_reporters = 'OptimizationReporter/misfit_values OptimizationReporter/simulation_values'
[]
[to_adjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/source OptimizationReporter/misfit_values'
to_reporters = 'src_values/values measured_data/misfit_values'
[]
[from_adjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint/inner_product'
to_reporters = 'OptimizationReporter/grad_source'
[]
[]
[Executioner]
type = Optimize
solve_on = none
tao_solver = taolmvm
petsc_options_iname = '-tao_gatol -tao_ls_type'
petsc_options_value = '1e-2 unit'
verbose = true
[]
[Postprocessors]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Outputs]
[pgraph]
type = PerfGraphOutput
level = 1
[]
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/main.i)
[Optimization]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'heat_source'
num_values = '1'
initial_condition = '0'
lower_bounds = '0.1'
upper_bounds = '10000'
measurement_points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
measurement_values = '1.98404 1.91076 1.56488 1.23863'
[]
[Executioner]
type = Optimize
tao_solver = taonls
petsc_options_iname = '-tao_gttol -tao_max_it -tao_nls_pc_type -tao_nls_ksp_type'
petsc_options_value = ' 1e-5 5 none cg'
verbose = true
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
clone_parent_mesh = true
[]
[homogeneous_forward]
type = FullSolveMultiApp
input_files = homogeneous_forward.i
execute_on = HOMOGENEOUS_FORWARD
clone_parent_mesh = true
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
clone_parent_mesh = true
[]
[]
[Transfers]
## RUN FORWARD SIMULATION WITH CURRENT PARAMETERS AS FORCE,
## AND EXTRACT SIMULATED VALUES AT MEASUREMENT POINTS
## AS WELL AS TOTAL FIELD VARIABLE FOR NONLINEAR PURPOSES
[MeasurementLocationsToForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/heat_source'
to_reporters = 'measurement_locations/measurement_xcoord
measurement_locations/measurement_ycoord
measurement_locations/measurement_zcoord
measurement_locations/measurement_time
measurement_locations/measurement_values
params/heat_source'
[]
[SimulatedDataFromForward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measurement_locations/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
### RUN THE HOMOGENEOUS_FORWARD WITH CURRENT NONLINEAR STATE, PARAMETER_STEP,
### AND EXTRACT SIMULATED DATA AT MEASURMENT POINTS
[CurrentStateFromForwardNonlinearToHomogeneousForwardNonlinear]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = homogeneous_forward
source_variable = 'forwardT'
variable = 'forwardT'
[]
[MeasurementLocationsToHomogeneousForward]
type = MultiAppReporterTransfer
to_multi_app = homogeneous_forward
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/measurement_values
OptimizationReporter/heat_source'
to_reporters = 'measurement_locations/measurement_xcoord
measurement_locations/measurement_ycoord
measurement_locations/measurement_zcoord
measurement_locations/measurement_time
measurement_locations/measurement_values
params/heat_source'
[]
[SimulatedDataFromHomogeneousForward]
type = MultiAppReporterTransfer
from_multi_app = homogeneous_forward
from_reporters = 'measurement_locations/simulation_values'
to_reporters = 'OptimizationReporter/simulation_values'
[]
### RUN THE ADJOINT WITH CURRENT NONLINEAR STATE, WITH MISFIT AS EXCITATION,
### AND EXTRACT GRADIENT
[CurrentStateToAdjointNonlinear]
type = MultiAppCopyTransfer
from_multi_app = forward
to_multi_app = adjoint
source_variable = 'forwardT'
variable = 'forwardT'
[]
[MisfitToAdjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/measurement_xcoord
OptimizationReporter/measurement_ycoord
OptimizationReporter/measurement_zcoord
OptimizationReporter/measurement_time
OptimizationReporter/misfit_values
OptimizationReporter/heat_source'
to_reporters = 'misfit/measurement_xcoord
misfit/measurement_ycoord
misfit/measurement_zcoord
misfit/measurement_time
misfit/misfit_values
params/heat_source'
[]
[GradientFromAdjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'gradient_vpp/inner_product'
to_reporters = 'OptimizationReporter/grad_heat_source'
[]
[]
[Reporters]
[optInfo]
type = OptimizationInfo
[]
[]
[Outputs]
csv = true
[]