- execute_onTIMESTEP_ENDThe 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.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
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.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
- variableVector of variable names to sample at measurement points.
C++ Type:std::vector<VariableName>
Controllable:No
Description:Vector of variable names to sample at measurement points.
- variable_weight_namesVector of weight reporter names that will create a reporter to transfer weights into. The ordering of these weight reporter names corresponds to the ordering used in variable.
C++ Type:std::vector<std::string>
Controllable:No
Description:Vector of weight reporter names that will create a reporter to transfer weights into. The ordering of these weight reporter names corresponds to the ordering used in variable.
OptimizationData
Reporter to hold measurement and simulation data for optimization problems
Overview
OptimizationData
is a reporter typically used for storing measurement data in a inverse optimization simulation. This reporter creates the following vectors:
measurement_xcoord
measurement_ycoord
measurement_zcoord
measurement_time
measurement_values
simulation_values
misfit_values
The measurement_
vectors can be filled in using "measurement_values", "measurement_points", and "measurement_times" or with a CSV file using "measurement_file", "file_xcoord", "file_ycoord", "file_zcoord", "file_value", and "file_time". The simulation_values
and misfit_values
are calculated in this object if "variable" is specified and the measurement location and values are filled. See OptimizationReporter for more information on these input parameters and what the vectors mean.
For cases where more than one variable is being sampled, the contribution of each sampled variable to the measurement value are specified by weights in csv file input using "file_variable_weights". These weights are then multiplied by each variable in the forward problem by specifying "variable_weight_names". There must be one "variable_weight_names" per "variable" being sampled and their ordering must be the same. A typical use case for this would be to specify "file_variable_weights" in the main optimization application input file to be read in along with the other parameters normally read from file. Next, these reporter weights would be transferred to the forward and adjoint problem subapps. In the forward subapp, "file_variable_weights" and "variable" would both be specified in the OptimizationData
block and would weight the different variable contributions to the simulation_values
and misfit_values
. In the adjoint subapp, the weights are transferred into a reporter that is used to scale the misfit applied by the ReporterPointSource using "weight_name".
Example Input File Syntax
OptimizationData
is typically used in the forward and homogeneous optimization sub-applications to sample the solution for simulation_values
and calculating misfit_values
. The measurement data can either be specified directly or (more commonly) transferred from the optimization main application, while the simulation and misfit values are transferred to the main application. It is also typically used in the adjoint/gradient sub-application to hold the misfit values to apply the ReporterPointSource Dirac kernel.
The following code blocks demonstrate this utilization of OptimizationData
. The OptimizationReporter in the main application reads the measurement locations and values. A MultiAppReporterTransfer transfers the measurement data to the forward, adjoint/gradient, and homogeneous application within the OptimizationData
reporter declared in those inputs. The forward and homogeneous applications then sample the specified vector specified in "variable". The main application then receives the simulation data using a MultiAppReporterTransfer, which OptimizationReporter uses to calculate the misfit and transfer to the adjoint/gradient sub-application, which uses that data to apply the ReporterPointSource kernel.
[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'
[]
[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'
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/main.i)[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)[Reporters]
[misfit]
type = OptimizationData
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
extra_vector_tags = 'ref'
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)Input Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- 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.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
- file_timetimetime column name from csv file being read in.
Default:time
C++ Type:std::string
Controllable:No
Description:time column name from csv file being read in.
- file_valuevaluemeasurement value column name from csv file being read in.
Default:value
C++ Type:std::string
Controllable:No
Description:measurement value column name from csv file being read in.
- file_variable_weightsvariable weight column names from csv file being read in.
C++ Type:std::vector<std::string>
Controllable:No
Description:variable weight column names from csv file being read in.
- file_xcoordxx coordinate column name from measurement_file csv being read in.
Default:x
C++ Type:std::string
Controllable:No
Description:x coordinate column name from measurement_file csv being read in.
- file_ycoordyy coordinate column name from csv file being read in.
Default:y
C++ Type:std::string
Controllable:No
Description:y coordinate column name from csv file being read in.
- file_zcoordzz coordinate column name from csv file being read in.
Default:z
C++ Type:std::string
Controllable:No
Description:z coordinate column name from csv file being read in.
- measurement_fileCSV file with measurement value and coordinates (value, x, y, z).
C++ Type:FileName
Controllable:No
Description:CSV file with measurement value and coordinates (value, x, y, z).
File Measurement Data Parameters
- measurement_pointsPoint locations corresponding to each measurement value
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:Point locations corresponding to each measurement value
- measurement_timesTimes corresponding to each measurement value
C++ Type:std::vector<double>
Controllable:No
Description:Times corresponding to each measurement value
- measurement_valuesMeasurement values collected from locations given by measurement_points
C++ Type:std::vector<double>
Controllable:No
Description:Measurement values collected from locations given by measurement_points
Input Measurement Data Parameters
Input Files
- (modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/material/forward.i)
- (modules/optimization/examples/materialTransient/gradient.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)
- (modules/optimization/examples/simpleTransient/forward_and_adjoint.i)
- (modules/optimization/examples/materialTransient/forward.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward_nonLinear.i)
- (modules/optimization/examples/simpleTransient/adjoint_mesh.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward_and_adjoint_iteration_output.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/adjoint_iteration_output.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model.i)
- (modules/optimization/examples/materialTransient/forward_and_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/forward_and_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint_nonLinear.i)
- (modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/forward.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/homogeneous_forward.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
- (modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/grad.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_and_adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_mechanics/forward.i)
- (modules/optimization/test/tests/optimizationreporter/optimizationdata/two_vars_file.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward.i)
- (modules/optimization/examples/simpleTransient/forward.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model_and_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward_and_adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/nonlinear_material/forward_and_adjoint.i)
- (modules/optimization/examples/simpleTransient/adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_mechanics/adjoint.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward.i)
- (modules/optimization/examples/simpleTransient/forward_mesh.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/forward.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/homogeneous_forward.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)