OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::collision::PartialBounceBack::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <collision.h>

+ Collaboration diagram for olb::collision::PartialBounceBack::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Member Functions

template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Detailed Description

template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::collision::PartialBounceBack::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 311 of file collision.h.

Member Function Documentation

◆ apply()

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::collision::PartialBounceBack::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 313 of file collision.h.

313 {
314 for (int iPop=1; iPop <= DESCRIPTOR::q/2; ++iPop) {
315 std::swap(cell[iPop], cell[iPop+DESCRIPTOR::q/2]);
316 }
317 const V rf = parameters.template get<RF>();
318 for (int iPop=1; iPop < DESCRIPTOR::q; ++iPop) {
319 cell[iPop] = (rf - V{1}) * (cell[iPop] + descriptors::t<V,DESCRIPTOR>(iPop))
320 - descriptors::t<V,DESCRIPTOR>(iPop);
321 }
322 return {-1, -1};
323 };

The documentation for this struct was generated from the following file: