Gromacs  2026.0-dev-20251119-5f0a571d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
matrix.h File Reference
#include <array>
#include "gromacs/math/multidimarray.h"
#include "gromacs/math/utilities.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/real.h"
#include "gromacs/utility/vectypes.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
Alexey Shvetsov alexx.nosp@m.yum@.nosp@m.gmail.nosp@m..com

Classes

class  gmx::BasicMatrix3x3< ElementType >
 Three-by-three matrix of ElementType. More...
 

Typedefs

using gmx::Matrix3x3 = BasicMatrix3x3< real >
 Three-by-three real number matrix. More...
 

Functions

template<typename ElementType >
BasicMatrix3x3< ElementType > gmx::operator* (const ElementType scalar, const BasicMatrix3x3< ElementType > &other)
 Return the product of multiplying the 3x3 matrix other by the scalar.
 
template<typename ElementType >
BasicVector< ElementType > gmx::diagonal (const BasicMatrix3x3< ElementType > &matrix)
 Return a vector that is the diagonal of the 3x3 matrix.
 
template<typename ElementType >
BasicMatrix3x3< ElementType > gmx::transpose (BasicMatrix3x3< ElementType > matrix)
 Returns the transposition of matrix.
 
template<typename ElementType >
constexpr ElementType gmx::determinant (BasicMatrix3x3< ElementType > matrix)
 Returns the determinant of matrix.
 
template<typename ElementType >
constexpr ElementType gmx::trace (BasicMatrix3x3< ElementType > matrix)
 Returns the trace of matrix.
 
template<typename ElementType >
BasicMatrix3x3< ElementType > gmx::inner (const BasicMatrix3x3< ElementType > &a, const BasicMatrix3x3< ElementType > &b)
 Return the inner product of multiplication of two 3x3 matrices a and b.
 
template<typename ElementType >
BasicMatrix3x3< ElementType > gmx::diagonalMatrix (const ElementType value)
 Create a diagonal matrix of ElementType. More...
 
template<typename ElementType >
BasicMatrix3x3< ElementType > gmx::identityMatrix ()
 Create an identity matrix of ElementType. More...
 
static Matrix3x3 gmx::createMatrix3x3FromLegacyMatrix (const matrix legacyMatrix)
 Create new matrix type from legacy type.
 
static void gmx::fillLegacyMatrix (Matrix3x3 newMatrix, matrix legacyMatrix)
 Fill existing legacy matrix from new matrix type.