cashocs.space_mapping.optimal_control.FineModel#

class cashocs.space_mapping.optimal_control.FineModel[source]#

Bases: ABC

Base class for the fine model in space mapping.

Variables:
  • controls (list[fenics.Function]) – The control variables of the fine model.

  • cost_functional_value (float) – The current cost functional value of the fine model.

Methods Summary

simulate()

Simulates the fine model.

solve_and_evaluate()

Solves and evaluates the fine model.

Attributes Summary

Methods Documentation

simulate() None[source]#

Simulates the fine model.

This is done in this method so it can be decorated for logging purposes.

Return type:

None

abstractmethod solve_and_evaluate() None[source]#

Solves and evaluates the fine model.

This needs to be overwritten with a custom implementation.

Return type:

None

Attributes Documentation

controls: list[fenics.Function]#
cost_functional_value: float#