OpenLB 1.7
|
Base class for solvers that solve both primal and dual problems. More...
#include <adjointLbSolver.h>
Public Types | |
using | DESCRIPTOR = typename LATTICES::values_t::template get<0> |
Public Types inherited from olb::BaseSolver< T, PARAMETERS > | |
using | t = T |
using | Parameters_t = PARAMETERS |
Public Member Functions | |
AdjointLbSolverBase (utilities::TypeIndexedSharedPtrTuple< PARAMETERS > params) | |
Public Member Functions inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
LbSolver (utilities::TypeIndexedSharedPtrTuple< PARAMETERS > params) | |
void | buildAndReturn () |
Build geometry, lattice and call computeResults. | |
void | initialize () override |
Set up geometry. | |
Public Member Functions inherited from olb::BaseSolver< T, PARAMETERS > | |
BaseSolver (utilities::TypeIndexedSharedPtrTuple< PARAMETERS > params) | |
virtual void | preProcess () |
Configurations that take place before solving. | |
void | solve () |
virtual void | postProcess () |
Actions that take place after solving. | |
template<typename KEY > | |
auto & | parameters (KEY=KEY()) |
Access to parameter structs as parameters(KEY()) | |
template<typename KEY > | |
auto & | parameters (KEY=KEY()) const |
template<typename KEY > | |
auto & | parameters (meta::id< KEY >) |
template<typename KEY > | |
auto & | parameters (meta::id< KEY >) const |
Protected Member Functions | |
void | loadPrimalPopulations () |
Helper for dual solver: init external fields from primal solution. | |
Protected Member Functions inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
void | prepareSimulation () override |
Set up lattice and initialize fields. | |
void | timeStep (std::size_t iT) override |
Collide-and-stream + additional computations. | |
void | postSimulation () override |
Evaluate results. | |
virtual void | prepareGeometry ()=0 |
Define the geometry. | |
virtual void | prepareLattices ()=0 |
Choose dynamics and boundary conditions. | |
virtual void | setInitialValues ()=0 |
Define fields and initialize lattice populations. | |
virtual void | setBoundaryValues (std::size_t iT)=0 |
Update fields and boundary values. | |
virtual void | getResults (std::size_t iT) |
Computation of results and output with full flexibility. | |
virtual void | computeResults (std::size_t iT) |
Perform further computations (compute errors etc.) | |
virtual void | computeResults () |
virtual bool | exitCondition (std::size_t iT) const override |
Condition, when to exit the time-stepping loop Returns true if the loop shall be continued. | |
virtual bool | checkStability (std::size_t iT) |
check stability: maxU should be <= _boundMaxU for a stable simulation Returns true if this fulfilled | |
virtual void | printLog (std::size_t iT) const |
virtual void | writeLogConverter () const |
virtual void | prepareVTK () const |
Write geometric information for vtk output The default version writes geometry, cuboid, rank and works for several lattices. | |
virtual void | writeVTK (std::size_t iT) const |
virtual void | writeImages (std::size_t iT) const |
virtual void | writeGnuplot (std::size_t iT) const |
template<typename... ARGS> | |
auto & | converter (ARGS &&... args) |
template<typename... ARGS> | |
auto & | converter (ARGS &&... args) const |
template<typename KEY > | |
auto & | lattice (KEY=KEY()) |
template<typename KEY > | |
auto & | lattice (KEY=KEY()) const |
template<typename KEY > | |
auto & | lattice (meta::id< KEY >) |
template<typename KEY > | |
auto & | lattice (meta::id< KEY >) const |
auto & | lattice () |
auto & | lattice () const |
auto & | geometry () |
auto & | geometry () const |
Additional Inherited Members | |
Public Attributes inherited from olb::BaseSolver< T, PARAMETERS > | |
utilities::TypeIndexedSharedPtrTuple< PARAMETERS > | _parameters |
Protected Types inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
template<typename... DESCRIPTORS> | |
using | SuperLattices = std::tuple<std::shared_ptr<SuperLattice<T,DESCRIPTORS>>...> |
Static Protected Member Functions inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
static constexpr unsigned | getNumberStationaryLattices () |
Protected Attributes inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
std::shared_ptr< SuperGeometry< T, dim > > | _sGeometry |
std::shared_ptr< CuboidGeometry< T, dim > > | _cGeometry |
std::shared_ptr< LoadBalancer< T > > | _loadBalancer |
LATTICES::values_t::template decompose_into< SuperLattices > | _sLattices |
std::unique_ptr< util::Timer< BaseType< T > > > | _timer |
std::array< std::unique_ptr< util::ValueTracer< T > >, getNumberStationaryLattices()> | _convergenceCheck |
bool | _exitMaxU {false} |
BaseType< T > | _boundMaxU {1.0} |
std::size_t | _itCheckStability {1} |
std::size_t | _itBoundaryUpdate {1} |
Protected Attributes inherited from olb::BaseSolver< T, PARAMETERS > | |
bool | _isInitialized {false} |
std::size_t | _iT {0} |
bool | _finishedTimeLoop {false} |
Static Protected Attributes inherited from olb::LbSolver< T, PARAMETERS, LATTICES > | |
static constexpr unsigned | dim = LATTICES::values_t::template get<0>::d |
static constexpr bool | isStationary = PARAMETERS::keys_t::template contains<names::Stationarity>() |
static constexpr bool | outputGnuplot = PARAMETERS::keys_t::template contains<names::VisualizationGnuplot>() |
static constexpr bool | outputImages = PARAMETERS::keys_t::template contains<names::VisualizationImages>() |
static constexpr bool | outputVTK = PARAMETERS::keys_t::template contains<names::VisualizationVTK>() |
Base class for solvers that solve both primal and dual problems.
Implementation is close to old Solver3D implementation. So far, LATTICES is expected to hold exactly one lattice (only 3D and "Navier-Stokes" has been tested).
Definition at line 52 of file adjointLbSolver.h.
using olb::opti::AdjointLbSolverBase< T, PARAMETERS, LATTICES, MODE >::DESCRIPTOR = typename LATTICES::values_t::template get<0> |
Definition at line 58 of file adjointLbSolver.h.
|
inline |
Definition at line 60 of file adjointLbSolver.h.
|
inlineprotected |
Helper for dual solver: init external fields from primal solution.
Definition at line 66 of file adjointLbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices, olb::LbSolver< T, PARAMETERS, LATTICES >::geometry(), olb::LbSolver< T, PARAMETERS, LATTICES >::lattice(), olb::BaseSolver< T, PARAMETERS >::parameters(), and olb::Simulation.