OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
olb::opti::projection::FoersterN< T, DESCRIPTOR > Struct Template Reference

FoersterProjection for arbitrary n. More...

#include <projection.h>

+ Inheritance diagram for olb::opti::projection::FoersterN< T, DESCRIPTOR >:
+ Collaboration diagram for olb::opti::projection::FoersterN< T, DESCRIPTOR >:

Public Member Functions

 FoersterN (const UnitConverter< T, DESCRIPTOR > &converter, unsigned n)
 
subprojection (T x) const override
 
derivSubprojection (T x) const override
 
inverseSubprojection (T x) const override
 
- Public Member Functions inherited from olb::opti::projection::GiBase< T, DESCRIPTOR >
 GiBase (const UnitConverter< T, DESCRIPTOR > &converter)
 
project (T x) const override
 
derivative (T x) const override
 
inverse (T x) const override
 

Public Attributes

const unsigned _n
 
- Public Attributes inherited from olb::opti::projection::GiBase< T, DESCRIPTOR >
const T _gridTerm
 

Detailed Description

template<typename T, typename DESCRIPTOR>
struct olb::opti::projection::FoersterN< T, DESCRIPTOR >

FoersterProjection for arbitrary n.

subproj(a) = util::exp(a^(2n)) - 1

Definition at line 276 of file projection.h.

Constructor & Destructor Documentation

◆ FoersterN()

template<typename T , typename DESCRIPTOR >
olb::opti::projection::FoersterN< T, DESCRIPTOR >::FoersterN ( const UnitConverter< T, DESCRIPTOR > & converter,
unsigned n )
inline

Definition at line 280 of file projection.h.

281 : GiBase<T,DESCRIPTOR>(converter), _n(n)
282 {
283 OLB_PRECONDITION(_n >= 1);
284 }
#define OLB_PRECONDITION(COND)
Definition olbDebug.h:46

References olb::opti::projection::FoersterN< T, DESCRIPTOR >::_n, and OLB_PRECONDITION.

Member Function Documentation

◆ derivSubprojection()

template<typename T , typename DESCRIPTOR >
T olb::opti::projection::FoersterN< T, DESCRIPTOR >::derivSubprojection ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::GiBase< T, DESCRIPTOR >.

Definition at line 287 of file projection.h.

287 {
288 return T(2*_n) * util::pow(x, 2*_n-1) * subprojection(x);
289 }
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112
T subprojection(T x) const override
Definition projection.h:286

References olb::opti::projection::FoersterN< T, DESCRIPTOR >::_n, olb::util::pow(), and olb::opti::projection::FoersterN< T, DESCRIPTOR >::subprojection().

+ Here is the call graph for this function:

◆ inverseSubprojection()

template<typename T , typename DESCRIPTOR >
T olb::opti::projection::FoersterN< T, DESCRIPTOR >::inverseSubprojection ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::GiBase< T, DESCRIPTOR >.

Definition at line 290 of file projection.h.

290 {
291 return util::pow(util::log(x+T(1)), T(1)/T(2*_n));
292 }
ADf< T, DIM > log(const ADf< T, DIM > &a)
Definition aDiff.h:475

References olb::opti::projection::FoersterN< T, DESCRIPTOR >::_n, olb::util::log(), and olb::util::pow().

+ Here is the call graph for this function:

◆ subprojection()

template<typename T , typename DESCRIPTOR >
T olb::opti::projection::FoersterN< T, DESCRIPTOR >::subprojection ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::GiBase< T, DESCRIPTOR >.

Definition at line 286 of file projection.h.

286{ return util::exp(util::pow(x, 2*_n)) - T(1); }
ADf< T, DIM > exp(const ADf< T, DIM > &a)
Definition aDiff.h:455

References olb::opti::projection::FoersterN< T, DESCRIPTOR >::_n, olb::util::exp(), and olb::util::pow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _n

template<typename T , typename DESCRIPTOR >
const unsigned olb::opti::projection::FoersterN< T, DESCRIPTOR >::_n

Definition at line 278 of file projection.h.


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