Class for flow field. More...
#include <flow.hpp>
Public Member Functions | |
| FlowField (unsigned nx, unsigned ny) | |
| auto & | InitialPosition () |
| auto & | CurrentPosition () |
| virtual Velocity< T, Dim > & | CurrentVelocity () |
| auto | GetTime () |
| auto | GetDirection () |
| virtual void | CopyInitialPositionToCurrentPosition () |
| void | SetDelta (const T delta) |
| void | SetStep (const unsigned step) |
| virtual void | SetCurrentVelocity () |
| virtual void | SetDirection (const Direction direction) |
| void | SetInitialTime (const T time) |
| void | UpdateTime () |
| void | UpdateTime (const T time) |
| void | Run () |
Protected Attributes | |
| const unsigned | nx_ |
| const unsigned | ny_ |
| T | delta_ |
| T | initial_time_ |
| T | 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>
class LCS::FlowField< T, Dim >
Class for flow field.
This class is used for representing flow fields, which contains many information (such as positions and velocities for all fluid particles) about the flow field.
- Template Parameters
-
T Numeric data type of all the numeric values in the flow. Dim Dimension of the flow field (2 or 3).
Constructor & Destructor Documentation
|
inline |
Constructor for initializating the flow field.
- Parameters
-
nx The number of grid points in
-direction. ny The number of grid points in
-direction.
Member Function Documentation
|
inlinevirtual |
Copy the initial position to the current position. It is used before particle advection. The actual implementaions are in the subclasses.
Reimplemented in LCS::ContinuousFlowField< T, Func, Dim >, and LCS::DiscreteFlowField< T, Dim >.
|
inline |
Get the current positions of all particles.
- Returns
- Position field associated with the current time of the flow.
|
inlinevirtual |
Get the current velocities of all particles.
- Returns
- Velocity field associated with the current time of the flow.
Reimplemented in LCS::ContinuousFlowField< T, Func, Dim >.
|
inline |
Get the direction associated with the flow field.
- Returns
- Direction that shows that the flow advection is forward or backward.
|
inline |
Get the current time of the flow.
- Returns
- Current time of the flow.
|
inline |
Get the initial positions of all particles.
- Returns
- Position field associated with the initial time of the flow.
|
inline |
Particle advection (calculating particle trajectories).
|
inlinevirtual |
Set the current velocity. The actual implementations are in the subclasses.
Reimplemented in LCS::ContinuousFlowField< T, Func, Dim >, and LCS::DiscreteFlowField< T, Dim >.
|
inline |
Set the time step for particle advection.
- Parameters
-
delta Time step for advection.
|
inlinevirtual |
Set the advection direction. The actual implementations are in the subclesses.
- Parameters
-
direction Direction for particle advection.
Reimplemented in LCS::ContinuousFlowField< T, Func, Dim >, and LCS::DiscreteFlowField< T, Dim >.
|
inline |
Set the initial time.
- Parameters
-
time Initial time of calculation.
|
inline |
Set the number of steps for particle advection.
- Parameters
-
step Number of total advection steps.
|
inline |
Update time of the flow field using the time step.
|
inline |
Update time of the flow field using the provided time.
- Parameters
-
time New time for the flow field.
Member Data Documentation
|
protected |
Pointer to the Position field at the current time.
|
protected |
Current time of the calculation.
|
protected |
Pointer to the Velocity field at the current time.
|
protected |
Time step for integration.
|
protected |
Direction of the calculation.
|
protected |
Pointer to the Position field at the initial time.
|
protected |
Initial time of the calculation.
|
protected |
The number of grid points in
-direction.
|
protected |
The number of grid points in
-direction.
|
protected |
Number of calculation steps.
The documentation for this class was generated from the following file:
- src/flow.hpp
