LCS::DiscreteFlowField< T, Dim > Class Template Reference

Class for flow fields with discrete data. More...

#include <flow.hpp>

Public Member Functions

 DiscreteFlowField (unsigned nx, unsigned ny, unsigned data_nx, unsigned data_ny)
 
 DiscreteFlowField (unsigned nx, unsigned ny)
 
void SetVelocityFileNamePrefix (const std::string prefix)
 
void SetVelocityFileNameSuffix (const std::string suffix)
 
void ReadDataVelocityFromFile (Velocity< T, Dim > &data_vel)
 
void SetCurrentVelocity ()
 
void SetDirection (const Direction direction)
 
void CopyInitialPositionToCurrentPosition ()
 
auto & DataPosition ()
 
auto & CurrentDataVelocity ()
 
void SetDataDelta (const T delta)
 
void SetDataTimeRange (const T t1, const T t2)
 
- Public Member Functions inherited from LCS::FlowField< T, Dim >
 FlowField (unsigned nx, unsigned ny)
 
auto & InitialPosition ()
 
auto & CurrentPosition ()
 
virtual Velocity< T, Dim > & CurrentVelocity ()
 
auto GetTime ()
 
auto GetDirection ()
 
void SetDelta (const T delta)
 
void SetStep (const unsigned step)
 
void SetInitialTime (const T time)
 
void UpdateTime ()
 
void UpdateTime (const T time)
 
void Run ()
 

Additional Inherited Members

- Protected Attributes inherited from LCS::FlowField< T, Dim >
const unsigned nx_
 
const unsigned ny_
 
delta_
 
initial_time_
 
current_time_
 
unsigned step_
 
Direction direction_ = Forward
 
std::unique_ptr< Position< T,
Dim > > 
initial_pos_
 
std::unique_ptr< Position< T,
Dim > > 
current_pos_
 
std::shared_ptr< Velocity< T,
Dim > > 
current_vel_
 

Detailed Description

template<typename T, unsigned Dim = 2>
class LCS::DiscreteFlowField< T, Dim >

Class for flow fields with discrete data.

This class is used for representing flow fields with discrete data which typically come from experiments or CFD simulations.

Template Parameters
TNumeric data type of all the numeric values in the flow.
DimDimension of the flow field (2 or 3).
Inheritance diagram for LCS::DiscreteFlowField< T, Dim >:
LCS::FlowField< T, Dim >

Constructor & Destructor Documentation

template<typename T , unsigned Dim = 2>
LCS::DiscreteFlowField< T, Dim >::DiscreteFlowField ( unsigned  nx,
unsigned  ny,
unsigned  data_nx,
unsigned  data_ny 
)
inline

Constructor for initializating the discrete flow field.

Parameters
nxThe number of grid points in $x$-direction for calculation.
nyThe number of grid points in $y$-direction for calculation.
data_nxThe number of grid points in $x$-direction in the input flow data.
data_nyThe number of grid points in $y$-direction in the input flow data.
template<typename T , unsigned Dim = 2>
LCS::DiscreteFlowField< T, Dim >::DiscreteFlowField ( unsigned  nx,
unsigned  ny 
)
inline

Constructor for initializating the discrete flow field when the input data and calculation data have the same resolution.

Parameters
nxThe number of grid points in $x$-direction.
nyThe number of grid points in $y$-direction.

Member Function Documentation

template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::CopyInitialPositionToCurrentPosition ( )
inlinevirtual

Copy the initial position to the current position.

Reimplemented from LCS::FlowField< T, Dim >.

template<typename T , unsigned Dim = 2>
auto& LCS::DiscreteFlowField< T, Dim >::CurrentDataVelocity ( )
inline

Get the current velocity field of the input data.

template<typename T , unsigned Dim = 2>
auto& LCS::DiscreteFlowField< T, Dim >::DataPosition ( )
inline

Get the Position field of the input data.

template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::ReadDataVelocityFromFile ( Velocity< T, Dim > &  data_vel)
inline

Read velocity data from a file.

Parameters
data_velVelocity fields that contains the input velocity data from a file.
template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetCurrentVelocity ( )
inlinevirtual

Calculate and set the current velocities of the flow particles from temporal and spatical interpolations of the velocity data.

Reimplemented from LCS::FlowField< T, Dim >.

template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetDataDelta ( const T  delta)
inline

Set the time difference between two adjacent data files.

Parameters
deltaTime difference between two adjacent data files.
template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetDataTimeRange ( const T  t1,
const T  t2 
)
inline

Set the time range of the data files.

Parameters
t1One end point of the data time range.
t2The another end point of the data time range.
template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetDirection ( const Direction  direction)
inlinevirtual

Set the advection direction.

Parameters
directionDirection for particle advection.

Reimplemented from LCS::FlowField< T, Dim >.

template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetVelocityFileNamePrefix ( const std::string  prefix)
inline

Set the prefix of the file names of the input velocity data.

Parameters
prefixA string contains the prefix of file names.
template<typename T , unsigned Dim = 2>
void LCS::DiscreteFlowField< T, Dim >::SetVelocityFileNameSuffix ( const std::string  suffix)
inline

Set the suffix of the file names of the input velocity data.

Parameters
suffixA string contains the prefix of file names.

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