OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
olb::AnalyticalParticleAdsorptionLinear2D< T, S > Class Template Referencefinal

AnalyticalRandom2D: 2D -> 1D with maxValue in the center decreasing linearly with the distrance to the center to zero at the radius and zero outside. More...

#include <analyticalF.h>

+ Inheritance diagram for olb::AnalyticalParticleAdsorptionLinear2D< T, S >:
+ Collaboration diagram for olb::AnalyticalParticleAdsorptionLinear2D< T, S >:

Public Member Functions

 AnalyticalParticleAdsorptionLinear2D (T center[], T radius, T maxValue)
 
bool operator() (T output[], const S x[])
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::AnalyticalF< D, T, S >
AnalyticalF< D, T, S > & operator- (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator+ (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator* (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator/ (AnalyticalF< D, T, S > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, S >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], S input0)
 
bool operator() (T output[], S input0, S input1)
 
bool operator() (T output[], S input0, S input1, S input2)
 
bool operator() (T output[], S input0, S input1, S input2, S input3)
 

Protected Attributes

_center [2]
 
_radius
 
_maxValue
 

Additional Inherited Members

- Public Types inherited from olb::AnalyticalF< D, T, S >
using identity_functor_type = AnalyticalIdentity<D,T,S>
 
- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 
- Public Attributes inherited from olb::GenericF< T, S >
std::shared_ptr< GenericF< T, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Static Public Attributes inherited from olb::AnalyticalF< D, T, S >
static constexpr unsigned dim = D
 
- Protected Member Functions inherited from olb::AnalyticalF< D, T, S >
 AnalyticalF (int n)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, typename S>
class olb::AnalyticalParticleAdsorptionLinear2D< T, S >

AnalyticalRandom2D: 2D -> 1D with maxValue in the center decreasing linearly with the distrance to the center to zero at the radius and zero outside.

Definition at line 517 of file analyticalF.h.

Constructor & Destructor Documentation

◆ AnalyticalParticleAdsorptionLinear2D()

template<typename T , typename S >
olb::AnalyticalParticleAdsorptionLinear2D< T, S >::AnalyticalParticleAdsorptionLinear2D ( T center[],
T radius,
T maxValue )

Definition at line 543 of file analyticalF.hh.

543 : AnalyticalF2D<T,S>(2), _radius(radius), _maxValue(maxValue)
544{
545 _center[0] = center[0];
546 _center[1] = center[1];
547 this->getName() = "particleAdsorptionLinear2D";
548}
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::AnalyticalParticleAdsorptionLinear2D< T, S >::_center, and olb::GenericF< T, S >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename T , typename S >
bool olb::AnalyticalParticleAdsorptionLinear2D< T, S >::operator() ( T output[],
const S input[] )
virtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, S >.

Definition at line 551 of file analyticalF.hh.

552{
553 T dist = util::sqrt((input[0]-_center[0])*(input[0]-_center[0]) + (input[1]-_center[1])*(input[1]-_center[1]));
554
555 if (dist > _radius) {
556 output[0] = T();
557 output[1] = T();
558 return true;
559 }
560 else {
561 output[0] = _maxValue*(T(1) - dist/_radius)*(_center[0]-input[0])/_radius;
562 output[1] = _maxValue*(T(1) - dist/_radius)*(_center[1]-input[1])/_radius;
563 return true;
564 }
565}
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References olb::util::sqrt().

+ Here is the call graph for this function:

Member Data Documentation

◆ _center

template<typename T , typename S >
T olb::AnalyticalParticleAdsorptionLinear2D< T, S >::_center[2]
protected

Definition at line 519 of file analyticalF.h.

◆ _maxValue

template<typename T , typename S >
T olb::AnalyticalParticleAdsorptionLinear2D< T, S >::_maxValue
protected

Definition at line 521 of file analyticalF.h.

◆ _radius

template<typename T , typename S >
T olb::AnalyticalParticleAdsorptionLinear2D< T, S >::_radius
protected

Definition at line 520 of file analyticalF.h.


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