![]() |
OpenLB 1.8.1
|
LbSolver is a generic solver for Lattice-Boltzmann problems. More...
#include <lbSolver.h>
Inheritance diagram for olb::LbSolver< T, PARAMETERS, LATTICES >:
Collaboration diagram for olb::LbSolver< T, PARAMETERS, LATTICES >:Public Member Functions | |
| LbSolver () | |
| LbSolver (utilities::TypeIndexedSharedPtrTuple< PARAMETERS > params) | |
| void | initialize () override |
| Set up geometry. | |
| void | buildAndReturn () |
| Build geometry, lattice. | |
| 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 |
Public Member Functions inherited from olb::BaseSolver< T, PARAMETERS > | |
| BaseSolver ()=default | |
| 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 |
Static Public Attributes | |
| static constexpr unsigned | dim = LATTICES::values_t::template get<0>::d |
Protected Types | |
| template<typename... DESCRIPTORS> | |
| using | SuperLattices = std::tuple<std::shared_ptr<SuperLattice<T,DESCRIPTORS>>...> |
Protected Member Functions | |
| 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 |
Protected Member Functions inherited from olb::BaseSolver< T, PARAMETERS > | |
Static Protected Member Functions | |
| static constexpr unsigned | getNumberStationaryLattices () |
Protected Attributes | |
| std::shared_ptr< SuperGeometry< T, dim > > | _sGeometry |
| std::shared_ptr< CuboidDecomposition< 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 |
| 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 | |
| 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>() |
Additional Inherited Members | |
Public Types inherited from olb::BaseSolver< T, PARAMETERS > | |
| using | t = T |
| using | Parameters_t = PARAMETERS |
Public Attributes inherited from olb::BaseSolver< T, PARAMETERS > | |
| utilities::TypeIndexedSharedPtrTuple< PARAMETERS > | _parameters |
LbSolver is a generic solver for Lattice-Boltzmann problems.
It holds geometry and lattices and defines the abstract methods of BaseSolver. Every simulation app should be able to inherit from this class.
Definition at line 132 of file lbSolver.h.
|
protected |
Definition at line 142 of file lbSolver.h.
|
inline |
Definition at line 172 of file lbSolver.h.
|
inline |
Definition at line 175 of file lbSolver.h.
| void olb::LbSolver< T, PARAMETERS, LATTICES >::buildAndReturn | ( | ) |
Build geometry, lattice.
Definition at line 60 of file lbSolver.hh.
References olb::initialize().
Here is the call graph for this function:
|
protectedvirtual |
check stability: maxU should be <= _boundMaxU for a stable simulation Returns true if this fulfilled
Definition at line 277 of file lbSolver.hh.
References olb::meta::tuple_for_each().
Here is the call graph for this function:
|
inlineprotectedvirtual |
Reimplemented in olb::opti::AdjointLbSolver< T, PARAMETERS, LATTICES, MODE >.
Definition at line 221 of file lbSolver.h.
|
inlineprotectedvirtual |
Perform further computations (compute errors etc.)
Definition at line 219 of file lbSolver.h.
|
inline |
Definition at line 260 of file lbSolver.h.
References olb::BaseSolver< T, PARAMETERS >::parameters().
Here is the call graph for this function:
|
inline |
Definition at line 271 of file lbSolver.h.
References olb::BaseSolver< T, PARAMETERS >::parameters().
Here is the call graph for this function:
|
overrideprotectedvirtual |
Condition, when to exit the time-stepping loop Returns true if the loop shall be continued.
Implements olb::BaseSolver< T, PARAMETERS >.
Definition at line 256 of file lbSolver.hh.
|
inline |
Definition at line 305 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sGeometry.
|
inline |
Definition at line 308 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sGeometry.
|
inlinestaticconstexprprotected |
Definition at line 153 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::isStationary.
|
inlineprotectedvirtual |
Computation of results and output with full flexibility.
Definition at line 214 of file lbSolver.h.
|
overridevirtual |
Set up geometry.
Implements olb::BaseSolver< T, PARAMETERS >.
Definition at line 36 of file lbSolver.hh.
|
inline |
Definition at line 297 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
Here is the caller graph for this function:
|
inline |
Definition at line 301 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
|
inline |
Definition at line 282 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
|
inline |
Definition at line 286 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
|
inline |
Definition at line 290 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
|
inline |
Definition at line 294 of file lbSolver.h.
References olb::LbSolver< T, PARAMETERS, LATTICES >::_sLattices.
|
overrideprotectedvirtual |
Evaluate results.
Implements olb::BaseSolver< T, PARAMETERS >.
Definition at line 207 of file lbSolver.hh.
References olb::Evaluation, olb::meta::tuple_for_each(), and olb::writeVTK().
Here is the call graph for this function:
|
protectedpure virtual |
Define the geometry.
|
protectedpure virtual |
Choose dynamics and boundary conditions.
|
overrideprotectedvirtual |
Set up lattice and initialize fields.
Implements olb::BaseSolver< T, PARAMETERS >.
Definition at line 100 of file lbSolver.hh.
References olb::meta::tuple_for_each().
Here is the call graph for this function:
|
protectedvirtual |
Write geometric information for vtk output The default version writes geometry, cuboid, rank and works for several lattices.
This method may be overridden in case e.g. discrete normals shall be visualized (cf. example cavity2d).
Writes the geometry, cuboid no. and rank no. as vti file for visualization
Definition at line 323 of file lbSolver.hh.
|
protectedvirtual |
Definition at line 305 of file lbSolver.hh.
|
protectedpure virtual |
Update fields and boundary values.
|
protectedpure virtual |
Define fields and initialize lattice populations.
|
overrideprotectedvirtual |
Collide-and-stream + additional computations.
Implements olb::BaseSolver< T, PARAMETERS >.
Definition at line 134 of file lbSolver.hh.
References olb::meta::tuple_for_each(), and olb::writeVTK().
Here is the call graph for this function:
|
inlineprotectedvirtual |
Definition at line 255 of file lbSolver.h.
|
inlineprotectedvirtual |
Definition at line 252 of file lbSolver.h.
|
protectedvirtual |
Definition at line 316 of file lbSolver.hh.
|
inlineprotectedvirtual |
Definition at line 249 of file lbSolver.h.
|
protected |
Definition at line 145 of file lbSolver.h.
|
protected |
Definition at line 162 of file lbSolver.h.
|
protected |
Definition at line 169 of file lbSolver.h.
|
protected |
Definition at line 168 of file lbSolver.h.
|
protected |
Definition at line 146 of file lbSolver.h.
|
protected |
Definition at line 144 of file lbSolver.h.
|
protected |
Definition at line 148 of file lbSolver.h.
|
protected |
Definition at line 150 of file lbSolver.h.
|
staticconstexpr |
Definition at line 138 of file lbSolver.h.
|
staticconstexprprotected |
Definition at line 152 of file lbSolver.h.
|
staticconstexprprotected |
Definition at line 164 of file lbSolver.h.
|
staticconstexprprotected |
Definition at line 165 of file lbSolver.h.
|
staticconstexprprotected |
Definition at line 166 of file lbSolver.h.