OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::graphics::PowerLawFunction< T > Class Template Reference

#include <colormaps.h>

+ Inheritance diagram for olb::graphics::PowerLawFunction< T >:
+ Collaboration diagram for olb::graphics::PowerLawFunction< T >:

Public Member Functions

 PowerLawFunction (T x1_, T x2_, T y1_, T y2_, T b_)
 
operator() (T x) const override
 
PowerLawFunction< T > * clone () const override
 
- Public Member Functions inherited from olb::graphics::ScalarFunction< T >
virtual ~ScalarFunction ()
 

Detailed Description

template<typename T>
class olb::graphics::PowerLawFunction< T >

Definition at line 52 of file colormaps.h.

Constructor & Destructor Documentation

◆ PowerLawFunction()

template<typename T >
olb::graphics::PowerLawFunction< T >::PowerLawFunction ( T x1_,
T x2_,
T y1_,
T y2_,
T b_ )

Definition at line 52 of file colormaps.hh.

53 : x1(util::pow(x1_,b_)), x2(util::pow(x2_,b_)), y1(y1_), y2(y2_), b(b_)
54{ }
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112

Member Function Documentation

◆ clone()

template<typename T >
PowerLawFunction< T > * olb::graphics::PowerLawFunction< T >::clone ( ) const
overridevirtual

Implements olb::graphics::ScalarFunction< T >.

Definition at line 63 of file colormaps.hh.

64{
65 return new PowerLawFunction(*this);
66}
PowerLawFunction(T x1_, T x2_, T y1_, T y2_, T b_)
Definition colormaps.hh:52

◆ operator()()

template<typename T >
T olb::graphics::PowerLawFunction< T >::operator() ( T x) const
overridevirtual

Implements olb::graphics::ScalarFunction< T >.

Definition at line 57 of file colormaps.hh.

58{
59 return ( (y2-y1) * util::pow(x,b) + x2*y1-x1*y2 )/(x2-x1);
60}

References olb::util::pow().

+ Here is the call graph for this function:

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