OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY > Struct Template Referencefinal

#include <centralWithAntidiffusivity.h>

+ Inheritance diagram for olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY >:
+ Collaboration diagram for olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY >:

Public Member Functions

 DiffusionScheme ()=delete
 

Static Public Member Functions

template<typename PARAMETERS >
static T apply (T &f0, T f[], T F[], T u[], PARAMETERS &params)
 
- Static Public Member Functions inherited from olb::fd::FdScheme< tag::CENTRAL_WITH_ANTIDIFFUSIVITY >
static constexpr int extent ()
 

Detailed Description

template<unsigned D, typename T>
struct olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY >

Definition at line 45 of file centralWithAntidiffusivity.h.

Constructor & Destructor Documentation

◆ DiffusionScheme()

template<unsigned D, typename T >
olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY >::DiffusionScheme ( )
delete

Member Function Documentation

◆ apply()

template<unsigned D, typename T >
template<typename PARAMETERS >
T olb::fd::DiffusionScheme< D, T, tag::CENTRAL_WITH_ANTIDIFFUSIVITY >::apply ( T & f0,
T f[],
T F[],
T u[],
PARAMETERS & params )
static

Definition at line 37 of file centralWithAntidiffusivity.hh.

39{
40 T fNew = 0.;
41 T fCorr = 0.; // Negative-diffusivity correction to counterbalance upwind schemes' numerical diffusivity
42 for (unsigned iD=0; iD<D; ++iD) {
43 fNew += F[getArrayPos<1>(0,iD)] + f[getArrayPos<1>(0,iD)];
44 fCorr += (F[getArrayPos<1>(0,iD)] + f[getArrayPos<1>(0,iD)] - 2.*f0) * abs(u[iD]);
45 }
46 fNew -= 2.*D*f0;
47 return fNew * params.template get<fdParams::Diffusivity>()
48 - 0.5 * fCorr * params.template get<fdParams::AntiDiffusivityTuning>();
49}
std::enable_if_t< std::is_arithmetic< T >::type::value, T > abs(T x)
Definition util.h:396

References olb::abs().

+ Here is the call graph for this function:

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