![]() |
OpenLB 1.8.1
|
This class implements the evaluation of the goal functional and its derivatives by using adjoint LBM. More...
#include <optiCaseDual.h>
Inheritance diagram for olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >:
Collaboration diagram for olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >:Public Member Functions | |
| OptiCaseDual (XMLreader const &xml) | |
| ~OptiCaseDual () | |
| void | free () |
| S | evaluateObjective (const C &control, unsigned optiStep=0) override |
| Solve primal problem and evaluate objective. | |
| void | computeDerivatives (const C &control, C &derivatives, unsigned optiStep=0) override |
| Compute derivatives via adjoint problem. | |
| void | setObjective (std::shared_ptr< DistributedObjective< S, SOLVER > > objective) |
Public Member Functions inherited from olb::opti::OptiCase< S, C > | |
| OptiCase ()=default | |
| OptiCase (std::function< void(void)> postEvaluation) | |
| void | postEvaluation () |
Public Attributes | |
| bool | _verbose {true} |
| std::size_t | _dimCtrl |
| upper limit for the number of control variables (#voxels * field-dimension) | |
| StartValueType | _startValueType {Control} |
| std::string | _projectionName |
| std::shared_ptr< SuperIndicatorF< S, dim > > | _controlIndicator |
| Marks, where there are active control variables. | |
| Controller< S > * | _controller {nullptr} |
| Manages the array of control variables. | |
| UnitConverter< S, descriptor > * | _converter {nullptr} |
| std::shared_ptr< SOLVER< S, SolverMode::Primal > > | _primalSolver |
| std::shared_ptr< SOLVER< S, SolverMode::Dual > > | _dualSolver |
| std::shared_ptr< DistributedObjective< S, SOLVER > > | _objective |
| std::shared_ptr< SuperGeometry< S, dim > > | _primalGeometry |
| std::shared_ptr< SuperLattice< S, descriptor > > | _refLattice |
| std::shared_ptr< GeometrySerializer< S, dim > > | _serializer |
| std::shared_ptr< projection::Base< S > > | _projection |
| std::shared_ptr< SuperLatticeF< S, descriptor > > | _projectedControl |
| maps the control to a lattice functor | |
| std::shared_ptr< SuperLatticeF< S, descriptor > > | _dProjectionDcontrol |
| derivative of _projectionControl | |
Additional Inherited Members | |
Protected Attributes inherited from olb::opti::OptiCase< S, C > | |
| std::function< void(void)> | _postEvaluation |
This class implements the evaluation of the goal functional and its derivatives by using adjoint LBM.
The adjoint equations are problem-specific and have been computed for force and porosity optimization so far.
Requirements: S is the arithmetic data type SOLVER implements the (primal/ dual) simulation, inherits from AdjointLbSolver An xml file is expected to provide additional information on e.g. simulation and optimization parameters
Definition at line 522 of file serialization.h.
|
inline |
Definition at line 108 of file optiCaseDual.h.
|
inline |
Definition at line 114 of file optiCaseDual.h.
References olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::free().
Here is the call graph for this function:
|
overridevirtual |
Compute derivatives via adjoint problem.
Implements olb::opti::OptiCase< S, C >.
Definition at line 134 of file optiCaseDual.hh.
References olb::opti::control.
|
overridevirtual |
Solve primal problem and evaluate objective.
Implements olb::opti::OptiCase< S, C >.
Definition at line 116 of file optiCaseDual.hh.
References olb::opti::control.
|
inline |
Definition at line 118 of file optiCaseDual.h.
References olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_controller, and olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_converter.
Here is the caller graph for this function:
|
inline |
Definition at line 133 of file optiCaseDual.h.
References olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_controller, olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_objective, and olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_serializer.
| std::shared_ptr<SuperIndicatorF<S,dim> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_controlIndicator |
Marks, where there are active control variables.
Definition at line 87 of file optiCaseDual.h.
| Controller<S>* olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_controller {nullptr} |
| UnitConverter<S,descriptor>* olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_converter {nullptr} |
Definition at line 91 of file optiCaseDual.h.
| std::size_t olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_dimCtrl |
upper limit for the number of control variables (#voxels * field-dimension)
Definition at line 81 of file optiCaseDual.h.
| std::shared_ptr<SuperLatticeF<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_dProjectionDcontrol |
derivative of _projectionControl
Definition at line 106 of file optiCaseDual.h.
| std::shared_ptr<SOLVER<S,SolverMode::Dual> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_dualSolver |
Definition at line 93 of file optiCaseDual.h.
| std::shared_ptr<DistributedObjective<S,SOLVER> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_objective |
Definition at line 95 of file optiCaseDual.h.
| std::shared_ptr<SuperGeometry<S,dim> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_primalGeometry |
Definition at line 97 of file optiCaseDual.h.
| std::shared_ptr<SOLVER<S,SolverMode::Primal> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_primalSolver |
Definition at line 92 of file optiCaseDual.h.
| std::shared_ptr<SuperLatticeF<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_projectedControl |
maps the control to a lattice functor
Definition at line 104 of file optiCaseDual.h.
| std::shared_ptr<projection::Base<S> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_projection |
Definition at line 102 of file optiCaseDual.h.
| std::string olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_projectionName |
Definition at line 84 of file optiCaseDual.h.
| std::shared_ptr<SuperLattice<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_refLattice |
Definition at line 99 of file optiCaseDual.h.
| std::shared_ptr<GeometrySerializer<S,dim> > olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_serializer |
Definition at line 101 of file optiCaseDual.h.
| StartValueType olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_startValueType {Control} |
Definition at line 83 of file optiCaseDual.h.
| bool olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_verbose {true} |
Definition at line 79 of file optiCaseDual.h.