Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions
matrix.h File Reference
#include <array>
#include "gromacs/math/multidimarray.h"
#include "gromacs/math/vec.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for matrix.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declares special case of 3x3 matrix frequently used, and associated functions.

Author
Christian Blau cblau.nosp@m.@gwd.nosp@m.g.de

Typedefs

template<class ElementType >
using gmx::BasicMatrix3x3 = MultiDimArray< std::array< ElementType, 3 *3 >, extents< 3, 3 >>
 Three-by-three matrix of ElementType. More...
 
using gmx::Matrix3x3 = BasicMatrix3x3< real >
 Three-by-three real number matrix. More...
 
using gmx::Matrix3x3Span = Matrix3x3::view_type
 Convenience alias for a matrix view.
 
using gmx::Matrix3x3ConstSpan = Matrix3x3::const_view_type
 Convenience alias for a const matrix view.
 

Functions

constexpr real gmx::determinant (Matrix3x3ConstSpan matrix)
 Determinant of a 3x3 matrix.
 
constexpr real gmx::trace (Matrix3x3ConstSpan matrixView)
 Calculates the trace of a 3x3 matrix view.
 
static Matrix3x3 gmx::transpose (Matrix3x3ConstSpan matrixView)
 Calculate the transpose of a 3x3 matrix, from its view.
 
static Matrix3x3 gmx::createMatrix3x3FromLegacyMatrix (const matrix legacyMatrix)
 Create new matrix type from legacy type.
 
static void gmx::fillLegacyMatrix (Matrix3x3ConstSpan newMatrix, matrix legacyMatrix)
 Fill legacy matrix from new matrix type.