cashocs.space_mapping.optimal_control.ParameterExtraction#
- class cashocs.space_mapping.optimal_control.ParameterExtraction(coarse_model: CoarseModel, cost_functional_form: list[_typing.CostFunctional] | _typing.CostFunctional, states: list[fenics.Function] | fenics.Function, controls: list[fenics.Function] | fenics.Function, config: io.Config | None = None, desired_weights: list[float] | None = None, mode: str = 'initial')[source]#
Bases:
object
Parameter extraction for optimal control problems.
Initializes self.
- Parameters:
coarse_model (CoarseModel) – The coarse model optimization problem
cost_functional_form (list[_typing.CostFunctional] | _typing.CostFunctional) – The cost functional for the parameter extraction
states (list[fenics.Function] | fenics.Function) – The state variables for the parameter extraction
controls (list[fenics.Function] | fenics.Function) – The control variables for the parameter extraction
config (io.Config | None) – config: The config file for the problem, generated via
cashocs.load_config()
. Alternatively, this can also beNone
, in which case the default configurations are used, except for the optimization algorithm. This has then to be specified in thesolve
method. The default isNone
.desired_weights (list[float] | None) – The list of desired weights for the parameter extraction
mode (str) – The mode used for the initial guess of the parameter extraction. If this is coarse_optimum, the default, then the coarse model optimum is used as initial guess, if this is initial, then the initial guess for the optimization is used.