OpenLB 1.7
|
This class implements the evaluation of the goal functional and its derivatives by using adjoint LBM. More...
#include <optiCaseDual.h>
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. | |
C | getReferenceControl () const |
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) | |
ControlType | _controlType |
Either force or porosity field. | |
StartValueType | _startValueType {Control} |
std::string | _projectionName |
int | _fieldDim |
Spatial dimension of controlled field. | |
int | _controlMaterial |
Material number of design domain. | |
S | _regAlpha {0} |
Regulatory term in objective functional (so far unused) | |
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< SOLVER< S, SolverMode::Reference > > | _referenceSolver |
bool | _computeReference {false} |
std::shared_ptr< SuperGeometry< S, dim > > | _referenceGeometry |
std::shared_ptr< SuperLattice< S, descriptor > > | _referenceLattice |
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 AdjointLbSolverBase An xml file is expected to provide additional information on e.g. simulation and optimization parameters
Definition at line 60 of file optiCaseDual.h.
|
inline |
Definition at line 102 of file optiCaseDual.h.
|
inline |
Definition at line 108 of file optiCaseDual.h.
References olb::opti::OptiCaseDual< S, SOLVER, C >::free().
|
overridevirtual |
Compute derivatives via adjoint problem.
Implements olb::opti::OptiCase< S, C >.
Definition at line 177 of file optiCaseDual.hh.
References olb::opti::control.
|
overridevirtual |
Solve primal problem and evaluate objective.
Implements olb::opti::OptiCase< S, C >.
Definition at line 120 of file optiCaseDual.hh.
References olb::util::atan(), and olb::opti::control.
|
inline |
Definition at line 112 of file optiCaseDual.h.
References olb::opti::OptiCaseDual< S, SOLVER, C >::_controller, and olb::opti::OptiCaseDual< S, SOLVER, C >::_converter.
C olb::opti::OptiCaseDual< S, SOLVER, C >::getReferenceControl | ( | ) | const |
Definition at line 269 of file optiCaseDual.hh.
References olb::singleton::MpiManager::bCast(), olb::opti::ForceControl, olb::opti::getMaterialGlobally(), olb::singleton::MpiManager::getRank(), and olb::singleton::mpi().
bool olb::opti::OptiCaseDual< S, SOLVER, C >::_computeReference {false} |
Definition at line 91 of file optiCaseDual.h.
Controller<S>* olb::opti::OptiCaseDual< S, SOLVER, C >::_controller {nullptr} |
int olb::opti::OptiCaseDual< S, SOLVER, C >::_controlMaterial |
Material number of design domain.
Definition at line 80 of file optiCaseDual.h.
ControlType olb::opti::OptiCaseDual< S, SOLVER, C >::_controlType |
Either force or porosity field.
Definition at line 73 of file optiCaseDual.h.
UnitConverter<S,descriptor>* olb::opti::OptiCaseDual< S, SOLVER, C >::_converter {nullptr} |
Definition at line 86 of file optiCaseDual.h.
std::size_t olb::opti::OptiCaseDual< S, SOLVER, C >::_dimCtrl |
upper limit for the number of control variables (#voxels * field-dimension)
Definition at line 70 of file optiCaseDual.h.
std::shared_ptr<SuperLatticeF<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, C >::_dProjectionDcontrol |
derivative of _projectionControl
Definition at line 100 of file optiCaseDual.h.
std::shared_ptr<SOLVER<S,SolverMode::Dual> > olb::opti::OptiCaseDual< S, SOLVER, C >::_dualSolver |
Definition at line 88 of file optiCaseDual.h.
int olb::opti::OptiCaseDual< S, SOLVER, C >::_fieldDim |
Spatial dimension of controlled field.
Definition at line 78 of file optiCaseDual.h.
std::shared_ptr<SOLVER<S,SolverMode::Primal> > olb::opti::OptiCaseDual< S, SOLVER, C >::_primalSolver |
Definition at line 87 of file optiCaseDual.h.
std::shared_ptr<SuperLatticeF<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, C >::_projectedControl |
maps the control to a lattice functor
Definition at line 98 of file optiCaseDual.h.
std::shared_ptr<projection::Base<S> > olb::opti::OptiCaseDual< S, SOLVER, C >::_projection |
Definition at line 96 of file optiCaseDual.h.
std::string olb::opti::OptiCaseDual< S, SOLVER, C >::_projectionName |
Definition at line 75 of file optiCaseDual.h.
std::shared_ptr<SuperGeometry<S,dim> > olb::opti::OptiCaseDual< S, SOLVER, C >::_referenceGeometry |
Definition at line 92 of file optiCaseDual.h.
std::shared_ptr<SuperLattice<S,descriptor> > olb::opti::OptiCaseDual< S, SOLVER, C >::_referenceLattice |
Definition at line 93 of file optiCaseDual.h.
std::shared_ptr<SOLVER<S,SolverMode::Reference> > olb::opti::OptiCaseDual< S, SOLVER, C >::_referenceSolver |
Definition at line 89 of file optiCaseDual.h.
S olb::opti::OptiCaseDual< S, SOLVER, C >::_regAlpha {0} |
Regulatory term in objective functional (so far unused)
Definition at line 82 of file optiCaseDual.h.
std::shared_ptr<GeometrySerializer<S,dim> > olb::opti::OptiCaseDual< S, SOLVER, C >::_serializer |
Definition at line 95 of file optiCaseDual.h.
StartValueType olb::opti::OptiCaseDual< S, SOLVER, C >::_startValueType {Control} |
Definition at line 74 of file optiCaseDual.h.
bool olb::opti::OptiCaseDual< S, SOLVER, C >::_verbose {true} |
Definition at line 68 of file optiCaseDual.h.