- output_postprocessorPostprocessor holding the sub-app output to compare against the target.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Postprocessor holding the sub-app output to compare against the target.
- parameter_postprocessorPostprocessor (e.g. a Receiver) holding the parameter value; read and updated in place.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Postprocessor (e.g. a Receiver) holding the parameter value; read and updated in place.
- residual_postprocessorPostprocessor (e.g. a Receiver) the control writes with the normalized convergence residual; point the fixed-point Convergence object at it with a tolerance of 1.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Postprocessor (e.g. a Receiver) the control writes with the normalized convergence residual; point the fixed-point Convergence object at it with a tolerance of 1.
- target_functionFunction f(t) giving the target output value at each time step.
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Function f(t) giving the target output value at each time step.
NewtonInversionControl
Adjusts a parameter postprocessor to match a sub-app output to a target function using a finite-difference Newton update formed over two consecutive fixed-point iterations.
Overview
NewtonInversionControl helps solve a scalar inverse problem inside a fixed-point (Picard) iteration: at each time step it adjusts a parameter (held in a Receiver postprocessor and transferred to a sub-application) so that a sub-application output postprocessor matches a target Function of time. It is the finite-difference Newton companion to SecantInversionControl.
Fixed-point Iterations Handling
A Control cannot safely drive its own perturbed sub-application solve: the fixed-point executioner owns the sub-application's single backup slot and restores it between iterations, so an extra control-driven backup()/solveStep() would corrupt that state. Instead, the local finite- difference derivative is formed over two consecutive fixed-point iterations, both of which the framework starts from the same start-of-step state:
Base iteration (parameter ): record the output , publish as the solution of record, report the normalized residual, and set the parameter to for the next solve.
Perturbed iteration (parameter ): form and take one Newton step . On a perturbed iteration the control writes a deliberately huge residual (
nonconverged_residual, default 1e30) instead of the real one, so theConvergenceobject (tolerance 1) can never declare convergence on a perturbed parameter – guaranteeing the recorded solution is an un-perturbed parameter that actually produced the converged output.
The outer iteration count, convergence test, and time-step cutting are owned by the Executioner and the Convergence system (a PostprocessorConvergence on the control-written residual_postprocessor, compared against a tolerance of 1). Because each Newton step spans two fixed-point iterations, max_iterations on the Convergence object must allow roughly twice the number of Newton steps.
When accept-on-max is enabled and the iteration cap falls on a perturbed iteration (which happens whenever max_iterations is even), the accepted solution is the parameter from the last base iteration – the most recent value actually solved and residual-measured – rather than the un-evaluated Newton extrapolation computed on the perturbed iteration. Note, however, that the reported parameter and the committed sub-application state can disagree in this case: the executioner commits whatever sub-application state exists when the loop stops, which is the perturbed () solve, not the base solve whose parameter is reported. Prefer an odd max_iterations so the cap falls on a base iteration and the two agree.
Example Input Syntax
[Controls<<<{"href": "../../syntax/Controls/index.html"}>>>]
[newton]
type = NewtonInversionControl<<<{"description": "Adjusts a parameter postprocessor to match a sub-app output to a target function using a finite-difference Newton update formed over two consecutive fixed-point iterations.", "href": "NewtonInversionControl.html"}>>>
output_postprocessor<<<{"description": "Postprocessor holding the sub-app output to compare against the target."}>>> = output
parameter_postprocessor<<<{"description": "Postprocessor (e.g. a Receiver) holding the parameter value; read and updated in place."}>>> = p
residual_postprocessor<<<{"description": "Postprocessor (e.g. a Receiver) the control writes with the normalized convergence residual; point the fixed-point Convergence object at it with a tolerance of 1."}>>> = residual
converged_parameter_postprocessor<<<{"description": "Optional postprocessor to which the parameter value that produced the current output is written each iteration; at convergence this holds the inverse-problem solution."}>>> = param_value
target_function<<<{"description": "Function f(t) giving the target output value at each time step."}>>> = target_fn
parameter_delta<<<{"description": "Finite-difference perturbation applied on each base iteration to estimate df/dp."}>>> = 1e-3
[]
[]
[Convergence<<<{"href": "../../syntax/Convergence/index.html"}>>>]
[inv_conv]
type = PostprocessorConvergence<<<{"description": "Compares the absolute value of a post-processor to a tolerance.", "href": "../convergence/PostprocessorConvergence.html"}>>>
postprocessor<<<{"description": "Post-processor to use for convergence criteria"}>>> = residual
tolerance<<<{"description": "Tolerance to use for convergence criteria"}>>> = 1.0
max_iterations<<<{"description": "Maximum number of iterations"}>>> = 50
[]
[](modules/optimization/test/tests/controls/inverse_solve/newton.i)Input Parameters
- absolute_tolerance1e-08Absolute tolerance on |output - target|.
Default:1e-08
C++ Type:Real
Unit:(no unit assumed)
Range:absolute_tolerance>0
Controllable:No
Description:Absolute tolerance on |output - target|.
- converged_parameter_postprocessorOptional postprocessor to which the parameter value that produced the current output is written each iteration; at convergence this holds the inverse-problem solution.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Optional postprocessor to which the parameter value that produced the current output is written each iteration; at convergence this holds the inverse-problem solution.
- depends_onThe Controls that this control relies upon (i.e. must execute before this one)
C++ Type:std::vector<std::string>
Controllable:No
Description:The Controls that this control relies upon (i.e. must execute before this one)
- execute_onTIMESTEP_BEGINThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_BEGIN
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- nonconverged_residual1e+30Large residual written on perturbed iterations so that convergence is only ever declared on a base iteration (where the recorded parameter is un-perturbed). Must stay well above the convergence tolerance so a perturbed iteration is never accepted.
Default:1e+30
C++ Type:Real
Unit:(no unit assumed)
Range:nonconverged_residual>0
Controllable:No
Description:Large residual written on perturbed iterations so that convergence is only ever declared on a base iteration (where the recorded parameter is un-perturbed). Must stay well above the convergence tolerance so a perturbed iteration is never accepted.
- parameter_delta0.001Finite-difference perturbation applied on each base iteration to estimate df/dp.
Default:0.001
C++ Type:Real
Unit:(no unit assumed)
Range:parameter_delta>0
Controllable:No
Description:Finite-difference perturbation applied on each base iteration to estimate df/dp.
- relative_tolerance1e-06Relative tolerance on |output - target|, taken relative to |target|.
Default:1e-06
C++ Type:Real
Unit:(no unit assumed)
Range:relative_tolerance>0
Controllable:No
Description:Relative tolerance on |output - target|, taken relative to |target|.
Optional Parameters
- 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:No
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form