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

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

#include <analyticalF.h>

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

Public Member Functions

 EccentricVelocityField (Vector< T, DESCRIPTOR::d > position, Vector< T, DESCRIPTOR::d > velocity, Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > angularVelocity)
 
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
 

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::EccentricVelocityField< T, S, DESCRIPTOR >

Computes resulting 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

Definition at line 188 of file analyticalF.h.

Constructor & Destructor Documentation

◆ EccentricVelocityField()

template<typename T , typename S , typename DESCRIPTOR >
olb::EccentricVelocityField< T, S, DESCRIPTOR >::EccentricVelocityField ( Vector< T, DESCRIPTOR::d > position,
Vector< T, DESCRIPTOR::d > velocity,
Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > angularVelocity )

Definition at line 259 of file analyticalF.hh.

263 : AnalyticalF<DESCRIPTOR::d,T,S>(DESCRIPTOR::d),
264 _position(position),
265 _velocity(velocity),
266 _angularVelocity(angularVelocity)
267{
268 this->getName() = "EccentricVelocityField";
269}
Vector< T, DESCRIPTOR::d > _velocity
Vector< T, utilities::dimensions::convert< DESCRIPTOR::d >::rotation > _angularVelocity
Vector< T, DESCRIPTOR::d > _position
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::EccentricVelocityField< 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 272 of file analyticalF.hh.

273{
274 constexpr unsigned D = DESCRIPTOR::d;
275
276 Vector<T,D> localVel = util::calculateLocalVelocity(_position, _velocity, _angularVelocity, Vector<T,D>(input));
277 for (unsigned iDim=0; iDim<D; ++iDim) {
278 output[iDim] = localVel[iDim];
279 }
280
281 return true;
282}
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::EccentricVelocityField< T, S, DESCRIPTOR >::_angularVelocity
protected

Definition at line 192 of file analyticalF.h.

◆ _position

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

Definition at line 190 of file analyticalF.h.

◆ _velocity

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

Definition at line 191 of file analyticalF.h.


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