programmer's documentation
Functions
cs_math.h File Reference
#include "cs_defs.h"
Include dependency graph for cs_math.h:

Go to the source code of this file.

Functions

void symmetric_matrix_inverse (const cs_real_6_t s, cs_real_6_t sout)
 
void symmetric_matrix_product (const cs_real_6_t s1, const cs_real_6_t s2, cs_real_6_t sout)
 
static void cs_math_33_3_product (const cs_real_t m[3][3], const cs_real_t v[3], cs_real_3_t mv)
 Compute the product of a matrix of 3x3 real values by a vector of 3 real values. More...
 
static void cs_math_sym_33_3_product (const cs_real_t m[6], const cs_real_t v[3], cs_real_t mv[restrict 3])
 Compute the product of a symmetric matrix of 3x3 real values by a vector of 3 real values. NB: Symmetric matrix are stored as follows (s11, s22, s33, s12, s23, s13) More...
 
static cs_real_t cs_math_3_dot_product (const cs_real_t u[3], const cs_real_t v[3])
 Compute the dot product of two vectors of 3 real values. More...
 
static cs_real_t cs_math_3_square_norm (const cs_real_t v[3])
 Compute the square norm of a vector of 3 real values. More...
 
static void cs_math_sym_33_inv_cramer (const cs_real_t s[6], cs_real_t sout[restrict 6])
 Compute the inverse of a symmetric matrix using Cramer's rule. More...
 
static void cs_math_sym_33_product (const cs_real_t s1[6], const cs_real_t s2[6], cs_real_t sout[restrict 6])
 Compute the product of two symmetric matrices. More...
 
static void cs_math_sym_33_double_product (const cs_real_t s1[6], const cs_real_t s2[6], const cs_real_t s3[6], cs_real_t sout[restrict 3][3])
 Compute the product of three symmetric matrices. More...
 

Function Documentation

static void cs_math_33_3_product ( const cs_real_t  m[3][3],
const cs_real_t  v[3],
cs_real_3_t  mv 
)
inlinestatic

Compute the product of a matrix of 3x3 real values by a vector of 3 real values.

Parameters
[in]mmatrix of 3x3 real values
[in]vvector of 3 real values
[out]mvvector of 3 real values
static cs_real_t cs_math_3_dot_product ( const cs_real_t  u[3],
const cs_real_t  v[3] 
)
inlinestatic

Compute the dot product of two vectors of 3 real values.

Parameters
[in]uvector of 3 real values
[in]vvector of 3 real values
Returns
the resulting dot product u.v.
static cs_real_t cs_math_3_square_norm ( const cs_real_t  v[3])
inlinestatic

Compute the square norm of a vector of 3 real values.

Parameters
[in]vvector of 3 real values
Returns
square norm of v.
static void cs_math_sym_33_3_product ( const cs_real_t  m[6],
const cs_real_t  v[3],
cs_real_t  mv[restrict 3] 
)
inlinestatic

Compute the product of a symmetric matrix of 3x3 real values by a vector of 3 real values. NB: Symmetric matrix are stored as follows (s11, s22, s33, s12, s23, s13)

Parameters
[in]mmatrix of 3x3 real values
[in]vvector of 3 real values
[out]mvvector of 3 real values
static void cs_math_sym_33_double_product ( const cs_real_t  s1[6],
const cs_real_t  s2[6],
const cs_real_t  s3[6],
cs_real_t  sout[restrict 3][3] 
)
inlinestatic

Compute the product of three symmetric matrices.

Remarks
Symmetric matrix coefficients are stored as follows: (s11, s22, s33, s12, s23, s13)
Parameters
[in]s1symmetric matrix
[in]s2symmetric matrix
[in]s3symmetric matrix
[out]soutsout = s1 * s2 * s3
static void cs_math_sym_33_inv_cramer ( const cs_real_t  s[6],
cs_real_t  sout[restrict 6] 
)
inlinestatic

Compute the inverse of a symmetric matrix using Cramer's rule.

Remarks
Symmetric matrix coefficients are stored as follows: (s11, s22, s33, s12, s23, s13)
Parameters
[in]ssymmetric matrix
[out]soutsout = 1/s1
static void cs_math_sym_33_product ( const cs_real_t  s1[6],
const cs_real_t  s2[6],
cs_real_t  sout[restrict 6] 
)
inlinestatic

Compute the product of two symmetric matrices.

Remarks
Symmetric matrix coefficients are stored as follows: (s11, s22, s33, s12, s23, s13)
Parameters
[in]s1symmetric matrix
[in]s2symmetric matrix
[out]soutsout = s1 * s2
void symmetric_matrix_inverse ( const cs_real_6_t  s,
cs_real_6_t  sout 
)
void symmetric_matrix_product ( const cs_real_6_t  s1,
const cs_real_6_t  s2,
cs_real_6_t  sout 
)