![]() |
programmer's documentation
|
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 cs_real_t | cs_math_sq (cs_real_t x) |
Compute the square of a real value. More... | |
static cs_real_t | cs_math_3_length (const cs_real_t xa[3], const cs_real_t xb[3]) |
Compute the (euclidean) length between two points xa and xb in a cartesian coordinate system of dimension 3. 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_norm (const cs_real_t v[3]) |
Compute the euclidean norm of a vector of dimension 3. 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_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_33t_3_product (const cs_real_t m[3][3], const cs_real_t v[3], cs_real_3_t mv) |
Compute the product of the transpose 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_33_determinant (const cs_real_t m[3][3]) |
Compute the determinant of a 3x3 matrix. More... | |
static void | cs_math_3_cross_product (const cs_real_t u[3], const cs_real_t v[3], cs_real_t uv[restrict 3]) |
Compute the cross product of two vectors of 3 real values. More... | |
static void | cs_math_33_inv (const cs_real_t in[3][3], cs_real_t out[3][3]) |
Inverse a 3x3 matrix. 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... | |
void | cs_math_set_machine_epsilon (void) |
Compute the value related to the machine precision. More... | |
double | cs_math_get_machine_epsilon (void) |
Get the value related to the machine precision. More... | |
void | cs_math_3_length_unitv (const cs_real_t xa[3], const cs_real_t xb[3], cs_real_t *len, cs_real_3_t unitv) |
Compute the length (euclidien norm) between two points xa and xb in a cartesian coordinate system of dimension 3. More... | |
void | cs_math_33_eigen (const cs_real_t m[3][3], cs_real_t *eig_ratio, cs_real_t *eig_max) |
Compute the eigenvalues of a 3x3 matrix which is symmetric and real -> Oliver K. Smith "eigenvalues of a symmetric 3x3 matrix", Communication of the ACM (April 1961) -> Wikipedia article entitled "Eigenvalue algorithm". More... | |
double | cs_math_surftri (const cs_real_t xv[3], const cs_real_t xe[3], const cs_real_t xf[3]) |
Compute the area of the convex_hull generated by 3 points. This corresponds to the computation of the surface of a triangle. More... | |
double | cs_math_voltet (const cs_real_t xv[3], const cs_real_t xe[3], const cs_real_t xf[3], const cs_real_t xc[3]) |
Compute the volume of the convex_hull generated by 4 points. This is equivalent to the computation of the volume of a tetrahedron. More... | |
Variables | |
const cs_real_t | cs_math_zero_threshold |
const cs_real_t | cs_math_onethird |
const cs_real_t | cs_math_onesix |
const cs_real_t | cs_math_onetwelve |
const cs_real_t | cs_math_epzero |
const cs_real_t | cs_math_infinite_r |
const cs_real_t | cs_math_big_r |
const cs_real_t | cs_math_pi |
|
inlinestatic |
Compute the product of a matrix of 3x3 real values by a vector of 3 real values.
[in] | m | matrix of 3x3 real values |
[in] | v | vector of 3 real values |
[out] | mv | vector of 3 real values |
Compute the determinant of a 3x3 matrix.
[in] | m | 3x3 matrix |
Compute the eigenvalues of a 3x3 matrix which is symmetric and real -> Oliver K. Smith "eigenvalues of a symmetric 3x3 matrix", Communication of the ACM (April 1961) -> Wikipedia article entitled "Eigenvalue algorithm".
[in] | m | 3x3 matrix |
[out] | eig_ratio | max/min |
[out] | eig_max | max. eigenvalue |
Inverse a 3x3 matrix.
[in] | in | matrix to inverse |
[out] | out | inversed matrix |
|
inlinestatic |
Compute the product of the transpose of a matrix of 3x3 real values by a vector of 3 real values.
[in] | m | matrix of 3x3 real values |
[in] | v | vector of 3 real values |
[out] | mv | vector of 3 real values |
|
inlinestatic |
Compute the cross product of two vectors of 3 real values.
[in] | u | vector of 3 real values |
[in] | v | vector of 3 real values |
[out] | uv | vector of 3 real values |
Compute the dot product of two vectors of 3 real values.
[in] | u | vector of 3 real values |
[in] | v | vector of 3 real values |
Compute the (euclidean) length between two points xa and xb in a cartesian coordinate system of dimension 3.
[in] | xa | first coordinate |
[in] | xb | second coordinate |
|
inline |
Compute the length (euclidien norm) between two points xa and xb in a cartesian coordinate system of dimension 3.
[in] | xa | coordinate of the first extremity |
[in] | xb | coordinate of the second extremity |
[out] | len | pointer to the length of the vector va -> vb |
[out] | unitv | unitary vector along xa -> xb |
[in] | xa | coordinate of the first extremity |
[in] | xb | coordinate of the second extremity |
[out] | len | pointer to the length of the vector va -> vb |
[out] | unitv | unitary vector anlong va -> vb |
Compute the euclidean norm of a vector of dimension 3.
[in] | v |
Compute the square norm of a vector of 3 real values.
[in] | v | vector of 3 real values |
double cs_math_get_machine_epsilon | ( | void | ) |
Get the value related to the machine precision.
void cs_math_set_machine_epsilon | ( | void | ) |
Compute the value related to the machine precision.
Compute the square of a real value.
[in] | x | value |
|
inline |
Compute the area of the convex_hull generated by 3 points. This corresponds to the computation of the surface of a triangle.
[in] | xv | coordinates of the first vertex |
[in] | xe | coordinates of the second vertex |
[in] | xf | coordinates of the third vertex |
|
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)
[in] | m | matrix of 3x3 real values |
[in] | v | vector of 3 real values |
[out] | mv | vector of 3 real values |
|
inlinestatic |
Compute the product of three symmetric matrices.
[in] | s1 | symmetric matrix |
[in] | s2 | symmetric matrix |
[in] | s3 | symmetric matrix |
[out] | sout | sout = s1 * s2 * s3 |
|
inlinestatic |
Compute the inverse of a symmetric matrix using Cramer's rule.
[in] | s | symmetric matrix |
[out] | sout | sout = 1/s1 |
|
inlinestatic |
Compute the product of two symmetric matrices.
[in] | s1 | symmetric matrix |
[in] | s2 | symmetric matrix |
[out] | sout | sout = s1 * s2 |
double cs_math_voltet | ( | const cs_real_t | xv[3], |
const cs_real_t | xe[3], | ||
const cs_real_t | xf[3], | ||
const cs_real_t | xc[3] | ||
) |
Compute the volume of the convex_hull generated by 4 points. This is equivalent to the computation of the volume of a tetrahedron.
[in] | xv | coordinates of the first vertex |
[in] | xe | coordinates of the second vertex |
[in] | xf | coordinates of the third vertex |
[in] | xc | coordinates of the fourth vertex |
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 | ||
) |
const cs_real_t cs_math_big_r |
const cs_real_t cs_math_epzero |
const cs_real_t cs_math_infinite_r |
const cs_real_t cs_math_onesix |
const cs_real_t cs_math_onethird |
const cs_real_t cs_math_onetwelve |
const cs_real_t cs_math_pi |
const cs_real_t cs_math_zero_threshold |