LCS::Field< T, Dim, Size > Class Template Reference
Class for general physical fields. More...
#include <field.hpp>
Public Member Functions | |
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 |
Protected Attributes | |
const unsigned | nx_ |
const unsigned | ny_ |
Tensor< Vector< T, Size >, Dim > | data_ |
T | time_ |
Friends | |
struct | FieldPolicy< T, Dim, Size > |
Detailed Description
template<typename T, unsigned Dim = 2, unsigned Size = 2>
class LCS::Field< T, Dim, Size >
Class for general physical fields.
This class is used for representing scalar or vector fields, such as displacement and velocity fields.
- Template Parameters
-
T Numeric data type of the field. Dim Dimension of the field (2 or 3). Size Length of the vector aassociated with each point in the field (e.g. 1 for scalar fields).
Constructor & Destructor Documentation
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
Constructor for initializating the Field.
- Parameters
-
nx The number of grid points in -direction.
ny The number of grid points in -direction.
Member Function Documentation
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
Read data from a file.
- Parameters
-
file_name Input data file name.
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
inline |
Write data to a file.
- Parameters
-
file_name Output data file name.
Member Data Documentation
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
protected |
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
protected |
Number of grid points in -direction.
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
protected |
Number of grid points in -direction.
template<typename T, unsigned Dim = 2, unsigned Size = 2>
|
protected |
Time of the Field.
The documentation for this class was generated from the following file:
- src/field.hpp