![]() |
OpenLB 1.8.1
|
All optimization code is contained in this namespace. More...
Namespaces | |
| namespace | projection |
Classes | |
| class | AdjointLbSolver |
| Base class for solvers that solve both primal and dual problems. More... | |
| class | BlockDdifferenceObjectiveDf3D |
| functor to compute 0.5*(f-f_wanted)^2 on a lattice More... | |
| class | BlockDrelativeDifferenceObjectiveComponentDf3D |
| functor to compute 0.5*(f[extractDim]-f_wanted[0])^2/f_wanted^2 on a lattice More... | |
| class | BlockDrelativeDifferenceObjectiveDf3D |
| functor to compute 0.5(f-f_wanted)^2/f_wanted^2 on a lattice More... | |
| class | BlockLatticeDphysDissipationDf |
| functor to get the pointwise dual dissipation density on local lattices, if globIC is not on the local processor, the returned vector is empty More... | |
| class | BlockLatticeDphysVelocityDf3D |
| functor to get pointwise dual velocity density on local lattices, if globIC is not on the local processor, the returned vector is empty More... | |
| class | BlockLatticeSerialDataF |
| class | Controller |
| struct | DCDALPHA |
| Collision operator derivative regarding optimization controls. More... | |
| class | DdifferenceObjectiveDf3D |
| functor to compute 0.5*(f-f_wanted)^2 on a lattice More... | |
| class | DifferenceObjective3D |
| functor to compute 0.5*L2Norm(f-f_wanted)^2 on a lattice More... | |
| class | DistributedObjective |
| Objective in optimization with adjoint LBM. More... | |
| struct | DJDALPHA |
| Objective functional derivative regarding optimization controls. More... | |
| struct | DJDF |
| Derivative of Objective functional regarding populations. More... | |
| struct | DPROJECTIONDALPHA |
| Derivative of control projection regarding control variable. More... | |
| class | DrelativeDifferenceObjectiveComponentDf3D |
| functor to compute 0.5*(f[extractDim]-f_wanted[0])^2/f_wanted^2 on a lattice More... | |
| class | DrelativeDifferenceObjectiveDf3D |
| functor to compute 0.5(f-f_wanted)^2/f_wanted^2 on a lattice More... | |
| class | DualController |
| class | DualForcedMRTdynamics |
| Implementation of the dual MRT collision step with external force. More... | |
| struct | dualLbHelpers |
| This structure forwards the calls to the appropriate helper class. More... | |
| struct | dualLbMomentaHelpers |
| struct | F |
| Stores populations of the primal problems for adjoint simulations. More... | |
| class | GenericObjective |
| Objective in optimization with adjoint LBM. More... | |
| class | GeometrySerializer |
| This class serializes the cells inside the geometry. More... | |
| struct | J |
| Objective functional results, always scalar. More... | |
| class | OptiCase |
| Abstract base class for optimization tasks. More... | |
| class | OptiCaseAD |
| Derivatives are computed with automatic differentiation. More... | |
| class | OptiCaseAdForSolver |
| Interface for OptiCaseAD that performs Lattice-Boltzmann-Solver construction itself (from xml file) More... | |
| class | OptiCaseAnalytical |
| Gradient is just passed as a function (and not computed by an own routine) More... | |
| class | OptiCaseCDQ |
| Gradient computation with central difference quotients. More... | |
| class | OptiCaseDQ |
| class | OptiCaseDual |
| This class implements the evaluation of the goal functional and its derivatives by using adjoint LBM. More... | |
| class | OptiCaseFDQ |
| Gradient computation with forward difference quotients. More... | |
| class | Optimizer |
| Interface for the use of various optimization algorithms. More... | |
| class | OptimizerBarzilaiBorwein |
| Optimization algorithm: BarzilaiBorwein. More... | |
| class | OptimizerLBFGS |
| Optimization algorithm: LBFGS. More... | |
| class | OptimizerLineSearch |
| Optimization algorithm: LineSearch. More... | |
| class | OptimizerSteepestDescent |
| Optimization algorithm: SteepestDescent. More... | |
| class | RelativeDifferenceObjective3D |
| functor to compute 0.5*L2Norm(f-f_wanted)^2/L2Norm(f_wanted)^2 on a lattice More... | |
| struct | SENSITIVITY |
| Total derivative of the objective functional regarding controls. More... | |
| class | SimpleGeometrySerializer |
| This class serializes the cells inside the geometry. More... | |
| class | SparseGeometrySerializer |
| This class serializes the cells which are marked by indicator. More... | |
| class | SuperLatticeDphysDissipationDf |
| functor to get pointwise dual dissipation density on local lattices, if globIC is not on the local processor, the returned vector is empty More... | |
| class | SuperLatticeDphysVelocityDf3D |
| functor to get pointwise dual velocity density on local lattices, if globIC is not on the local processor, the returned vector is empty More... | |
| class | SuperLatticeSerialDataF |
| A data field whose values are managed by a controller. More... | |
Enumerations | |
| enum | OptimizerLogType { control , derivative , value , error , norm_derivative } |
| enum | StartValueType { Control , ProjectedControl , Porosity , Permeability } |
| enum class | SolverMode : int { Reference , Primal , Dual } |
| Tags different simulation modes: compute either reference simulation or perform primal or dual (adjoint) simulation. More... | |
Functions | |
| template<typename S , typename C > | |
| OptiCaseAnalytical (std::function< S(const C &)>, std::function< void(const C &, C &)>) -> OptiCaseAnalytical< S, C > | |
| template<typename S , typename C > | |
| OptiCaseAnalytical (std::function< S(const C &)>, std::function< void(const C &, C &)>, std::function< void(void)>) -> OptiCaseAnalytical< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &)>, std::function< void(void)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &)>, S, std::function< void(void)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &, unsigned)>, std::function< void(void)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &, unsigned)>, S, std::function< void(void)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &)>, S) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &, unsigned)>) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseFDQ (std::function< S(const C &, unsigned)>, S) -> OptiCaseFDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &)>, std::function< void(void)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &)>, S, std::function< void(void)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &, unsigned)>, std::function< void(void)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &, unsigned)>, S, std::function< void(void)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &)>, S) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &, unsigned)>) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename C > | |
| OptiCaseCDQ (std::function< S(const C &, unsigned)>, S) -> OptiCaseCDQ< S, C > | |
| template<typename S , typename T , template< typename > typename SOLVER> | |
| OptiCaseAdForSolver (std::shared_ptr< SOLVER< S > >, std::shared_ptr< SOLVER< T > >) -> OptiCaseAdForSolver< S, T::dim, SOLVER, util::StdVector > | |
| void | getGnuplotTagsFromString (std::string gplotAnalysisString, std::vector< OptimizerLogType > &gplotAnalysis) |
| the gplotAnalysisString is gained from the xml file and the function than separates and prepares it to be used in the constructor | |
| template<typename S , typename C = std::vector<S>> | |
| OptimizerBarzilaiBorwein< S, C > * | createOptimizerBarzilaiBorwein (XMLreader const ¶ms, std::size_t dimCtrl) |
| Creator Function for Barzilai-Borwein. | |
| template<typename S , typename C = std::vector<S>> | |
| OptimizerLBFGS< S, C > * | createOptimizerLBFGS (XMLreader const ¶ms, std::size_t dimCtrl) |
| Creator Function for LBFGS. | |
| template<typename S , typename C = std::vector<S>> | |
| OptimizerSteepestDescent< S, C > * | createOptimizerSteepestDescent (XMLreader const ¶ms, std::size_t dimCtrl) |
| Creator Function for Steepest Decent. | |
| template<typename PROJECTION , typename T > | |
| std::vector< T > | applyProjection (const std::vector< T > &vector) |
| template<typename PROJECTION , typename T , typename ARG > | |
| std::vector< T > | applyProjection (const std::vector< T > &vector, ARG arg) |
| template<typename S , unsigned dim> | |
| int | getMaterialGlobally (SuperGeometry< S, dim > &sGeometry, LatticeR< dim+1 > latticeR) |
| Helper that gives global access to material numbers. | |
| template<unsigned D, typename T > | |
| bool | evaluateSuperIndicatorFglobally (SuperIndicatorF< T, D > &f, const int input[]) |
| Helper that gives global access to the values of an indicator. | |
| template<unsigned D, typename T , typename U = T> | |
| bool | evaluateSuperFglobally (SuperF< D, T, U > &f, U *output, const int input[]) |
| Helper that gives global access to the values of a functor. | |
| template<typename FIELD , typename T , typename DESCRIPTOR , typename C = std::vector<T>> | |
| C | serialDataFromField (SuperLattice< T, DESCRIPTOR > &sLattice, const GeometrySerializer< T, DESCRIPTOR::d > &serializer, SuperIndicatorF< T, DESCRIPTOR::d > &indicator, unsigned controlDim) |
| Take values of a field and put them into a long vector Idea: FIELD[cartesianCoordinates] = result[serialIndex] -> we want to get the vector ''result''. | |
| template<typename T , template< typename, SolverMode > typename SOLVER, concepts::Field CONTROLLED_FIELD, template< typename... > typename PRIMAL_DYNAMICS, typename C = std::vector<T>> | |
| C | serialDataFromField (OptiCaseDual< T, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C > &optiCase, std::shared_ptr< SOLVER< T, SolverMode::Reference > > solver) |
| Take values of FIELD and put them into a long vector Idea: FIELD[cartesianCoordinates] = result[serialIndex] -> we want to get the vector ''result''. | |
| template<typename T , template< typename, SolverMode > typename SOLVER, concepts::Field CONTROLLED_FIELD, template< typename... > typename PRIMAL_DYNAMICS, typename C = std::vector<T>> | |
| C | getControl (OptiCaseDual< T, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C > &optiCase, std::shared_ptr< SOLVER< T, SolverMode::Reference > > solver) |
| Get control values of some simulation in the context of adjoint optimization Take values of FIELD, apply inverse projection and put them into a long vector Idea: FIELD[cartesianCoordinates] = projection(result[serialIndex]) -> we want to get the vector ''result''. | |
All optimization code is contained in this namespace.
|
strong |
Tags different simulation modes: compute either reference simulation or perform primal or dual (adjoint) simulation.
| Enumerator | |
|---|---|
| Reference | |
| Primal | |
| Dual | |
Definition at line 39 of file adjointLbSolver.h.
| Enumerator | |
|---|---|
| Control | |
| ProjectedControl | |
| Porosity | |
| Permeability | |
Definition at line 42 of file projection.h.
| std::vector< T > olb::opti::applyProjection | ( | const std::vector< T > & | vector | ) |
Definition at line 394 of file projection.h.
| std::vector< T > olb::opti::applyProjection | ( | const std::vector< T > & | vector, |
| ARG | arg ) |
Definition at line 403 of file projection.h.
| OptimizerBarzilaiBorwein< S, C > * olb::opti::createOptimizerBarzilaiBorwein | ( | XMLreader const & | params, |
| std::size_t | dimCtrl ) |
Creator Function for Barzilai-Borwein.
Definition at line 181 of file optimizerBarzilaiBorwein.h.
References getGnuplotTagsFromString(), and olb::XMLreader::readOrWarn().
Here is the call graph for this function:| OptimizerLBFGS< S, C > * olb::opti::createOptimizerLBFGS | ( | XMLreader const & | params, |
| std::size_t | dimCtrl ) |
Creator Function for LBFGS.
Definition at line 263 of file optimizerLBFGS.h.
References getGnuplotTagsFromString(), and olb::XMLreader::readOrWarn().
Here is the call graph for this function:| OptimizerSteepestDescent< S, C > * olb::opti::createOptimizerSteepestDescent | ( | XMLreader const & | params, |
| std::size_t | dimCtrl ) |
Creator Function for Steepest Decent.
Definition at line 93 of file optimizerSteepestDecent.h.
References getGnuplotTagsFromString(), and olb::XMLreader::readOrWarn().
Here is the call graph for this function:| bool olb::opti::evaluateSuperFglobally | ( | SuperF< D, T, U > & | f, |
| U * | output, | ||
| const int | input[] ) |
Helper that gives global access to the values of a functor.
Definition at line 435 of file serialization.h.
References olb::singleton::MpiManager::bCast(), olb::singleton::MpiManager::getRank(), and olb::singleton::mpi().
Here is the call graph for this function:| bool olb::opti::evaluateSuperIndicatorFglobally | ( | SuperIndicatorF< T, D > & | f, |
| const int | input[] ) |
Helper that gives global access to the values of an indicator.
Definition at line 418 of file serialization.h.
References olb::singleton::MpiManager::bCast(), olb::singleton::MpiManager::getRank(), and olb::singleton::mpi().
Here is the call graph for this function:
Here is the caller graph for this function:| C olb::opti::getControl | ( | OptiCaseDual< T, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C > & | optiCase, |
| std::shared_ptr< SOLVER< T, SolverMode::Reference > > | solver ) |
Get control values of some simulation in the context of adjoint optimization Take values of FIELD, apply inverse projection and put them into a long vector Idea: FIELD[cartesianCoordinates] = projection(result[serialIndex]) -> we want to get the vector ''result''.
| T | floating point type |
| C | container type, where result is written |
| FIELD | name of the field |
| optiCase | dual opti case, provides the information on serialization etc. |
| solver | the solver, whose FIELD data is taken |
Definition at line 570 of file serialization.h.
References serialDataFromField().
Here is the call graph for this function:| void olb::opti::getGnuplotTagsFromString | ( | std::string | gplotAnalysisString, |
| std::vector< OptimizerLogType > & | gplotAnalysis ) |
the gplotAnalysisString is gained from the xml file and the function than separates and prepares it to be used in the constructor
Definition at line 244 of file optimizer.hh.
References control, derivative, error, norm_derivative, and value.
Here is the caller graph for this function:| int olb::opti::getMaterialGlobally | ( | SuperGeometry< S, dim > & | sGeometry, |
| LatticeR< dim+1 > | latticeR ) |
Helper that gives global access to material numbers.
Definition at line 402 of file serialization.h.
References olb::singleton::MpiManager::bCast(), olb::SuperGeometry< T, D >::get(), olb::SuperStructure< T, D >::getLoadBalancer(), olb::singleton::MpiManager::getRank(), and olb::singleton::mpi().
Here is the call graph for this function:| olb::opti::OptiCaseAdForSolver | ( | std::shared_ptr< SOLVER< S > > | , |
| std::shared_ptr< SOLVER< T > > | ) -> OptiCaseAdForSolver< S, T::dim, SOLVER, util::StdVector > |
| olb::opti::OptiCaseAnalytical | ( | std::function< S(const C &)> | , |
| std::function< void(const C &, C &)> | ) -> OptiCaseAnalytical< S, C > |
| olb::opti::OptiCaseAnalytical | ( | std::function< S(const C &)> | , |
| std::function< void(const C &, C &)> | , | ||
| std::function< void(void)> | ) -> OptiCaseAnalytical< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &)> | ) | -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &)> | , |
| S | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &)> | , |
| S | , | ||
| std::function< void(void)> | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &)> | , |
| std::function< void(void)> | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &, unsigned)> | ) | -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &, unsigned)> | , |
| S | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &, unsigned)> | , |
| S | , | ||
| std::function< void(void)> | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseCDQ | ( | std::function< S(const C &, unsigned)> | , |
| std::function< void(void)> | ) -> OptiCaseCDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &)> | ) | -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &)> | , |
| S | ) -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &)> | , |
| S | , | ||
| std::function< void(void)> | ) -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &)> | , |
| std::function< void(void)> | ) -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &, unsigned)> | ) | -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &, unsigned)> | , |
| S | ) -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &, unsigned)> | , |
| S | , | ||
| std::function< void(void)> | ) -> OptiCaseFDQ< S, C > |
| olb::opti::OptiCaseFDQ | ( | std::function< S(const C &, unsigned)> | , |
| std::function< void(void)> | ) -> OptiCaseFDQ< S, C > |
| C olb::opti::serialDataFromField | ( | OptiCaseDual< T, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C > & | optiCase, |
| std::shared_ptr< SOLVER< T, SolverMode::Reference > > | solver ) |
Take values of FIELD and put them into a long vector Idea: FIELD[cartesianCoordinates] = result[serialIndex] -> we want to get the vector ''result''.
| T | floating point type |
| C | container type, where result is written |
| FIELD | name of the field |
| optiCase | dual opti case, provides the information on serialization etc. |
| solver | the solver, whose FIELD data is taken |
Definition at line 540 of file serialization.h.
References olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_controlIndicator, olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_dimCtrl, olb::opti::OptiCaseDual< S, SOLVER, CONTROLLED_FIELD, PRIMAL_DYNAMICS, C >::_serializer, and serialDataFromField().
Here is the call graph for this function:| C olb::opti::serialDataFromField | ( | SuperLattice< T, DESCRIPTOR > & | sLattice, |
| const GeometrySerializer< T, DESCRIPTOR::d > & | serializer, | ||
| SuperIndicatorF< T, DESCRIPTOR::d > & | indicator, | ||
| unsigned | controlDim ) |
Take values of a field and put them into a long vector Idea: FIELD[cartesianCoordinates] = result[serialIndex] -> we want to get the vector ''result''.
| T | floating point type |
| DESCRIPTOR | lattice descriptor, must provide the field FIELD |
| C | container type, where result is written |
| FIELD | name of the field |
| sLattice | super lattice |
| serializer | implements the transformation from cartesian to serial data |
| indicator | describes, at which positions FIELD is evaluated (at other positions, the default value of C remains) |
| controlDim | length of result vector |
Definition at line 466 of file serialization.h.
References olb::singleton::MpiManager::bCast(), olb::Vector< T, Size >::data(), evaluateSuperIndicatorFglobally(), olb::SuperLattice< T, DESCRIPTOR >::get(), olb::SuperStructure< T, D >::getCuboidDecomposition(), olb::SuperStructure< T, D >::getLoadBalancer(), olb::singleton::MpiManager::getRank(), olb::opti::GeometrySerializer< S, dim >::getSerializedComponentIndex(), and olb::singleton::mpi().
Here is the call graph for this function:
Here is the caller graph for this function: