Defines custom types, for working with vectors, scalar and vector fields and general containers. More...
Classes | |
class | mm::Range< T, Allocator > |
An extension of std::vector<T> to support additional useful operations. More... | |
class | mm::ScalarField< Scalar > |
Represents a discretization of a scalar field, a finite collection of scalars. More... | |
class | mm::VectorField< Scalar, dimension > |
Represents a discretization of a vector field, a finite collection of vectors. More... | |
Typedefs | |
template<class scalar_t , int dim> | |
using | mm::Vec = Eigen::Matrix< scalar_t, dim, 1, Eigen::ColMajor|Eigen::AutoAlign, dim, 1 > |
Fixed size vector type, representing a mathematical 1d/2d/3d vector. More... | |
Defines custom types, for working with vectors, scalar and vector fields and general containers.
We define 4 custom types, Range, Vec, ScalarField and VectorField.
Range is a general purpose container with some convenience methods added to std::vector.
Vec is intended to be used for small vector, i.e. for a 3D vector quantity such as velocity or displacement. It is a typedef for Eigen vector with a few methods added via their plugin system.
ScalarField is an array of scalars, usually one for each point in the domain. Under the hood, this is Eigen's VectorXd with some additional methods.
VectorField is an array of vectors. Accessing it at one point gives a Vec, while accessing one component gives a ScalarField. Under the hood it extends Eigen's Matrix type so all operations are kept efficient.
These last three types are compatible with all Eigen expression and can interchangeably be used with Eigen's Matrix types.
using mm::Vec = typedef Eigen::Matrix<scalar_t, dim, 1, Eigen::ColMajor|Eigen::AutoAlign, dim, 1> |
Fixed size vector type, representing a mathematical 1d/2d/3d vector.
This is a special case of fixed size Eigen type. See our Matrix
and MatrixBase
add-ons for more functionality.
Usage example:
Definition at line 31 of file Vec_fwd.hpp.