LCS::ContinuousVelocity< T, Func, Dim > Class Template Reference

Velocity field with continuous velocity function. More...

#include <field.hpp>

Public Types

using vec = LCS::Vector< T, Dim >
 
- Public Types inherited from LCS::Velocity< T, Dim >
using vec = LCS::Vector< T, Dim >
 

Public Member Functions

 ContinuousVelocity (unsigned nx, unsigned ny, Position< T, Dim > &pos, T time=0)
 
 ContinuousVelocity (unsigned nx, unsigned ny, Position< T, Dim > &pos, std::vector< T > &parameters, T time=0)
 
void SetAll ()
 
Func & Function ()
 
- Public Member Functions inherited from LCS::Velocity< T, Dim >
 Velocity (unsigned nx, unsigned ny, Position< T, Dim > &pos)
 
auto Get (const unsigned i, const unsigned j) const
 
auto & GetPosition ()
 
void InterpolateFrom (Velocity< T, Dim > &ref_vel)
 
- Public Member Functions inherited from LCS::Field< T, Dim, Dim >
 Field (unsigned nx, unsigned ny)
 
auto & GetAll () const
 
auto GetTime () const
 
void ReadFromFile (const std::string &file_name)
 
void SetAll (Tensor< Vector< T, Size >, Dim > &data)
 
void UpdateTime (const T time)
 
void WriteToFile (const std::string &file_name) const
 

Additional Inherited Members

- Protected Attributes inherited from LCS::Velocity< T, Dim >
Position< T, Dim > & pos_
 
- Protected Attributes inherited from LCS::Field< T, Dim, Dim >
const unsigned nx_
 
const unsigned ny_
 
Tensor< Vector< T, Size >, Dim > data_
 
time_
 

Detailed Description

template<typename T, typename Func, unsigned Dim>
class LCS::ContinuousVelocity< T, Func, Dim >

Velocity field with continuous velocity function.

This class represents velocity fields that are defined by known continuous velocity function. It is a subclass of Velocity.

Template Parameters
TNumeric data type of the field.
FuncContinous velocity function for this field.
DimDimension of the field (2 or 3).
Inheritance diagram for LCS::ContinuousVelocity< T, Func, Dim >:
LCS::Velocity< T, Dim > LCS::Field< T, Dim, Dim >

Constructor & Destructor Documentation

template<typename T , typename Func , unsigned Dim>
LCS::ContinuousVelocity< T, Func, Dim >::ContinuousVelocity ( unsigned  nx,
unsigned  ny,
Position< T, Dim > &  pos,
time = 0 
)
inline

Constructor for initializating the continous velocity field.

Parameters
nxThe number of points in $x$-direction.
nyThe number of points in $y$-direction.
posThe Position field that associated with the ContinuousVelocity field.
timeInitial time, default value is 0.
template<typename T , typename Func , unsigned Dim>
LCS::ContinuousVelocity< T, Func, Dim >::ContinuousVelocity ( unsigned  nx,
unsigned  ny,
Position< T, Dim > &  pos,
std::vector< T > &  parameters,
time = 0 
)
inline

Constructor for initializating the continous velocity field that the velocity function has parameters.

Parameters
nxThe number of points in $x$-direction.
nyThe number of points in $y$-direction.
posThe Position field that associated with the ContinuousVelocity field.
parametersA vector that contains all the parameters of the velocity function.
timeInitial time, default value is 0.

Member Function Documentation

template<typename T , typename Func , unsigned Dim>
Func& LCS::ContinuousVelocity< T, Func, Dim >::Function ( )
inline

Get the velocity function of this field.

Returns
Continuous velocity function of this field.
template<typename T , typename Func , unsigned Dim>
void LCS::ContinuousVelocity< T, Func, Dim >::SetAll ( )
inline

Use continuous function to set all velocity values.


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