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

StasiusProjection for arbitrary n. More...

#include <projection.h>

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

Public Member Functions

 StasiusN (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::StasiusN< T, DESCRIPTOR >

StasiusProjection for arbitrary n.

subproj(a) = a^(2n)

Definition at line 300 of file projection.h.

Constructor & Destructor Documentation

◆ StasiusN()

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

Definition at line 304 of file projection.h.

305 : GiBase<T,DESCRIPTOR>(converter), _n(n)
306 {
307 OLB_PRECONDITION(_n >= 1);
308 }
#define OLB_PRECONDITION(COND)
Definition olbDebug.h:46

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

Member Function Documentation

◆ derivSubprojection()

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

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

Definition at line 311 of file projection.h.

311{ return T(2*_n) * util::pow(x, 2*_n-1); }
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112

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

+ Here is the call graph for this function:

◆ inverseSubprojection()

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

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

Definition at line 312 of file projection.h.

312 {
313 return util::pow(x, T(1)/T(2*_n));
314 }

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

+ Here is the call graph for this function:

◆ subprojection()

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

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

Definition at line 310 of file projection.h.

310{ return util::pow(x, 2*_n); }

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

+ Here is the call graph for this function:

Member Data Documentation

◆ _n

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

Definition at line 302 of file projection.h.


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