Reply To: applying the force into Fluid in the openLB code not DEFINITION
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › applying the force into Fluid in the openLB code not DEFINITION › Reply To: applying the force into Fluid in the openLB code not DEFINITION
A “view” is a common term for a class that doesn’t store data but only provides a view of data (stored in some other class). This way the data structures and the actual access can be abstracted. This is also the way we use the concept in OpenLB. There is a central, per-block, column storage where all field data (populations, forces, …) are stored for each cell location of the lattice. The various Cell classes then access this structure and expose it to to the user via convenient functions (get/setField, operator(iPop), computeRho, …).
The cell you found is probably
src/core/cell.h. This is only used for high-level access during pre- / post-processing and is the cell you as a user commonly interact with. The actual high-performance model implementations in the framework (e.g. on GPUs or when using SIMD) are provided with different, more optimized but less flexible, cells.
Most of this, including fields, is covered by chapter 2 (Core Data) of the user guide. All data you have access to on the cell-level is stored in fields. i.e. there is also
descriptors::POPULATION which declares the population functions used by the LB algorithm.
In case your actual goal is not understanding OpenLB in depth so you can e.g. modify the core code but to use OpenLB for your application (including implementing new models) you do not need to understand the details here. This abstraction one of the points of a framework – you can focus on only the model and case setup without caring of how this is implemented to run on different platforms and be efficiently parallelized.
In any case I can also recommend our annual Spring School where both the core concepts and the practical usage of OpenLB are covered in detail.