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

Computes resulting lattice velocity of an object from translational and rotational velocity. More...

#include <analyticalF.h>

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

Public Member Functions

 EccentricLatticeVelocityField (Vector< T, DESCRIPTOR::d > position, Vector< T, DESCRIPTOR::d > velocity, Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > angularVelocity, UnitConverter< T, DESCRIPTOR > const &converter)
 
bool operator() (T output[], const S input[]) override
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::AnalyticalF< DESCRIPTOR::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

Vector< T, DESCRIPTOR::d > _position
 
Vector< T, DESCRIPTOR::d > _velocity
 
Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > _angularVelocity
 
UnitConverter< T, DESCRIPTOR > const & _converter
 

Additional Inherited Members

- Public Types inherited from olb::AnalyticalF< DESCRIPTOR::d, T, S >
using identity_functor_type
 
- 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< DESCRIPTOR::d, T, S >
static constexpr unsigned dim
 
- Protected Member Functions inherited from olb::AnalyticalF< DESCRIPTOR::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, typename DESCRIPTOR>
class olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >

Computes resulting lattice velocity of an object from translational and rotational velocity.

Parameters
positionthe rotation center
velocitytranslational velocity of the object - expected in lattice units
angularVelocityrotational velocity of the object - expected in lattice units
converterunit converter to convert to lattice velocity

Definition at line 207 of file analyticalF.h.

Constructor & Destructor Documentation

◆ EccentricLatticeVelocityField()

template<typename T , typename S , typename DESCRIPTOR >
olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::EccentricLatticeVelocityField ( Vector< T, DESCRIPTOR::d > position,
Vector< T, DESCRIPTOR::d > velocity,
Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > angularVelocity,
UnitConverter< T, DESCRIPTOR > const & converter )

Definition at line 285 of file analyticalF.hh.

290 : AnalyticalF<DESCRIPTOR::d,T,S>(DESCRIPTOR::d),
291 _position(position),
292 _velocity(velocity),
293 _angularVelocity(angularVelocity),
294 _converter(converter)
295{
296 this->getName() = "EccentricLatticeVelocityField";
297}
Vector< T, DESCRIPTOR::d > _position
UnitConverter< T, DESCRIPTOR > const & _converter
Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > _angularVelocity
Vector< T, DESCRIPTOR::d > _velocity
std::string & getName()
read and write access to name
Definition genericF.hh:51

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

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename T , typename S , typename DESCRIPTOR >
bool olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::operator() ( T output[],
const S input[] )
overridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, S >.

Definition at line 300 of file analyticalF.hh.

301{
302 constexpr unsigned D = DESCRIPTOR::d;
303
304 Vector<T,D> localVel = util::calculateLocalVelocity(_position, _velocity, _angularVelocity, Vector<T,D>(input));
305 for (unsigned iDim=0; iDim<D; ++iDim) {
306 output[iDim] = _converter.getLatticeVelocity( localVel[iDim] );
307 }
308
309 return true;
310}
constexpr Vector< T, D > calculateLocalVelocity(const Vector< T, D > &rotationCenter, const Vector< T, D > &velocity, const Vector< T, utilities::dimensions::convert< D >::rotation > &angularVelocity, const Vector< T, D > &position)
Calculate local velocity.

References olb::util::calculateLocalVelocity().

+ Here is the call graph for this function:

Member Data Documentation

◆ _angularVelocity

template<typename T , typename S , typename DESCRIPTOR >
Vector<T,utilities::dimensions::convert<DESCRIPTOR::d>::rotation> olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::_angularVelocity
protected

Definition at line 211 of file analyticalF.h.

◆ _converter

template<typename T , typename S , typename DESCRIPTOR >
UnitConverter<T,DESCRIPTOR> const& olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::_converter
protected

Definition at line 212 of file analyticalF.h.

◆ _position

template<typename T , typename S , typename DESCRIPTOR >
Vector<T,DESCRIPTOR::d> olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::_position
protected

Definition at line 209 of file analyticalF.h.

◆ _velocity

template<typename T , typename S , typename DESCRIPTOR >
Vector<T,DESCRIPTOR::d> olb::EccentricLatticeVelocityField< T, S, DESCRIPTOR >::_velocity
protected

Definition at line 210 of file analyticalF.h.


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