LCS Namespace Reference

Namespace for the whole project. More...

Namespaces

 VelocityFunction
 Namespace for demo velocity functions.
 

Classes

struct  Vector
 Struct for vectors. More...
 
struct  Vector< T, 1 >
 Vector with one element. More...
 
class  Tensor
 Class for tensors. More...
 
class  Clock
 Class for time recording. More...
 
struct  FieldPolicy
 Dimension-dependent implementations of Field class. More...
 
class  Position
 Field of particle positions. More...
 
class  Velocity
 Field of particle velocities. More...
 
class  ContinuousVelocity
 Velocity field with continuous velocity function. More...
 
class  Field
 Class for general physical fields. More...
 
struct  FieldPolicy< T, 2, Size >
 2D implementations of Field class. More...
 
class  FlowField
 Class for flow field. More...
 
class  ContinuousFlowField
 Class for flow fields with a continous velocity function. More...
 
class  DiscreteFlowField
 Class for flow fields with discrete data. More...
 
class  FTLE
 Class for finite-time Lyapunov exponent (FTLE) fields. More...
 

Typedefs

template<typename T >
using Scalar = Vector< T, 1 >
 

Enumerations

enum  Direction { Forward, Backward }
 

Functions

template<typename T >
std::vector< T > operator+ (const std::vector< T > &a, const std::vector< T > &b)
 
template<typename T >
std::vector< T > operator- (const std::vector< T > &a, const std::vector< T > &b)
 
template<class T , class T2 >
std::vector< T > operator* (const T2 c, std::vector< T > a)
 
template<typename T , unsigned Size>
Vector< T, Size > operator+ (const Vector< T, Size > &a, const Vector< T, Size > &b)
 
template<typename T , unsigned Size>
Vector< T, Size > operator- (const Vector< T, Size > &a, const Vector< T, Size > &b)
 
template<typename T , unsigned Size>
Vector< T, Size > operator* (const T c, Vector< T, Size > a)
 
template<typename T >
interpolate (T x1, T x2, T y1, T y2, T xm)
 
template<typename Field , typename T >
void interpolate (T x1, T x2, Field &f1, Field &f2, T xm, Field &result)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Vector< T, 2 > &vec)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Scalar< T > &scalar)
 
template<typename T , unsigned Dim>
std::ostream & operator<< (std::ostream &os, const Tensor< T, Dim > &tensor)
 
template<typename T , unsigned Dim, unsigned Size>
std::ostream & operator<< (std::ostream &os, const Field< T, Dim, Size > &field)
 
template<typename T >
std::istream & operator>> (std::istream &is, Vector< T, 2 > &vec)
 
template<typename T >
std::ostream & operator>> (std::ostream &is, Scalar< T > &scalar)
 
template<typename T , unsigned Dim>
std::istream & operator>> (std::istream &is, Tensor< T, Dim > &tensor)
 
template<typename T , unsigned Dim, unsigned Size>
std::istream & operator>> (std::istream &is, Field< T, Dim > &field)
 

Detailed Description

Namespace for the whole project.

All classes in this project are in this namespace.

Typedef Documentation

template<typename T >
using LCS::Scalar = typedef Vector<T, 1>

Define a scalar as a Vector with one element.

Template Parameters
TNumeric data type of the element.

Enumeration Type Documentation

Enum for particle advection direction.

Enumerator
Forward 

Forward in time.

Backward 

Backward in time.

Function Documentation

template<typename T >
T LCS::interpolate ( x1,
x2,
y1,
y2,
xm 
)
inline

Linear interpolation of two known points $(x_1,y_1)$ and $(x_2,y_2)$.

Template Parameters
TData type of the values.
Parameters
x1$x$-coordinate of the first known point.
x2$x$-coordinate of the second known point.
y1$y$-coordinate of the first known point.
y2$y$-coordinate of the second known point.
xm$x$-coordinate of the interpolated point.
Returns
$y$-coordinate of the interpolated point.
template<typename Field , typename T >
void LCS::interpolate ( x1,
x2,
Field &  f1,
Field &  f2,
xm,
Field &  result 
)

Temporal linear interpolation of two Field.

Template Parameters
TData type of the time.
Parameters
x1First time point.
x2Second time point.
f1Field at time x1.
f2Field at time x2.
xmTime that associated with the interpolated Field.
resultInterpolated Field of f1 and f2.
template<class T , class T2 >
std::vector<T> LCS::operator* ( const T2  c,
std::vector< T >  a 
)

Multiplication of a scalar with a STL vector.

Template Parameters
TNumeric data type of the vector elements.
T2Numeric data tpye of the scalar value.
Parameters
cA scalar value.
aA STL vector.
Returns
A new STL vector that is the result of c * a.
template<typename T , unsigned Size>
Vector<T, Size> LCS::operator* ( const T  c,
Vector< T, Size >  a 
)

Implementation of multiplication of a scalar and a vector.

Template Parameters
TNumeric data type of the vector elements.
SizeLength of the vector.
Parameters
cA scalar value.
aA Vector.
Returns
A Vector that is the result of c * a.
template<typename T >
std::vector<T> LCS::operator+ ( const std::vector< T > &  a,
const std::vector< T > &  b 
)

Elementwise addition for STL vectors.

Template Parameters
TNumeric data type of the elements.
Parameters
aThe first STL vectors in the addition.
bThe second STL vectors in the addition.
Returns
A new STL vector that is the elementwise addition of a and b (a + b).
template<typename T , unsigned Size>
Vector<T, Size> LCS::operator+ ( const Vector< T, Size > &  a,
const Vector< T, Size > &  b 
)

Implementation of vector additions.

Template Parameters
TNumeric data type of the vector elements.
SizeLength of the vector.
Parameters
aThe first Vector in the addition.
bThe second Vector in the addition.
Returns
A Vector that is the result of a + b.
template<typename T >
std::vector<T> LCS::operator- ( const std::vector< T > &  a,
const std::vector< T > &  b 
)

Elementwise subtraction for STL vectors.

Template Parameters
TNumeric data type of the elements.
Parameters
aThe first STL vectors in the subtraction.
bThe second STL vectors in the subtraction.
Returns
A new STL vector that is the elementwise subtraction of a and b (a - b).
template<typename T , unsigned Size>
Vector<T, Size> LCS::operator- ( const Vector< T, Size > &  a,
const Vector< T, Size > &  b 
)

Implementation of vector subtractions.

Template Parameters
TNumeric data type of the vector elements.
SizeLength of the vector.
Parameters
aThe first Vector in the subtraction.
bThe second Vector in the subtraction.
Returns
A Vector that is the result of a - b.
template<typename T >
std::ostream& LCS::operator<< ( std::ostream &  os,
const Vector< T, 2 > &  vec 
)

Output a Vector.

Parameters
osOutput stream object.
vecVector to be outputted.
Returns
Updated output stream object.
template<typename T >
std::ostream& LCS::operator<< ( std::ostream &  os,
const Scalar< T > &  scalar 
)

Output a Scalar.

Parameters
osOutput stream object.
scalarScalar to be outputted.
Returns
Updated output stream object.
template<typename T , unsigned Dim>
std::ostream& LCS::operator<< ( std::ostream &  os,
const Tensor< T, Dim > &  tensor 
)

Output a Tensor.

Parameters
osOutput stream object.
tensorTensor to be outputted.
Returns
Updated output stream object.
template<typename T , unsigned Dim, unsigned Size>
std::ostream& LCS::operator<< ( std::ostream &  os,
const Field< T, Dim, Size > &  field 
)

Output a Field.

Parameters
osOutput stream object.
fieldField to be outputted.
Returns
Updated output stream object.
template<typename T >
std::istream& LCS::operator>> ( std::istream &  is,
Vector< T, 2 > &  vec 
)

Input a Vector.

Parameters
isInput stream object.
vecVector to be outputted.
Returns
Updated input stream object.
template<typename T >
std::ostream& LCS::operator>> ( std::ostream &  is,
Scalar< T > &  scalar 
)

Input a Scalar.

Parameters
isInput stream object.
scalarScalar to be outputted.
Returns
Updated input stream object.
template<typename T , unsigned Dim>
std::istream& LCS::operator>> ( std::istream &  is,
Tensor< T, Dim > &  tensor 
)

Input a Tensor.

Parameters
isInput stream object.
tensorTensor to be outputted.
Returns
Updated input stream object.
template<typename T , unsigned Dim, unsigned Size>
std::istream& LCS::operator>> ( std::istream &  is,
Field< T, Dim > &  field 
)

Input a Field.

Parameters
isInput stream object.
fieldField to be outputted.
Returns
Updated input stream object.