 Include dependency graph for cs_math.h:
 Include dependency graph for cs_math.h:Go to the source code of this file.
| Enumerations | |
| enum | cs_math_sym_tensor_component_t { XX , YY , ZZ , XY , YZ , XZ } | 
| Functions | |
| static int | cs_math_binom (int n, int k) | 
| Computes the binomial coefficient of n and k.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_fabs (cs_real_t x) | 
| Compute the absolute value of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_fmin (cs_real_t x, cs_real_t y) | 
| Compute the min value of two real values.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_fmax (cs_real_t x, cs_real_t y) | 
| Compute the max value of two real values.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_clamp (cs_real_t x, cs_real_t xmin, cs_real_t xmax) | 
| Clamp function for a given scalar value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_sq (cs_real_t x) | 
| Compute the square of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_pow2 (cs_real_t x) | 
| Compute the square of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_pow3 (cs_real_t x) | 
| Compute the cube of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_pow4 (cs_real_t x) | 
| Compute the 4-th power of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_pow5 (cs_real_t x) | 
| Compute the 5-th power of a real value.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_3_distance (const cs_real_t xa[3], const cs_real_t xb[3]) | 
| Compute the (euclidean) distance between two points xa and xb in a Cartesian coordinate system of dimension 3.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_3_distance_dot_product (const cs_real_t xa[3], const cs_real_t xb[3], const cs_real_t xc[3]) | 
| Compute  .  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_3_square_distance (const cs_real_t xa[3], const cs_real_t xb[3]) | 
| Compute the squared distance between two points xa and xb in a Cartesian coordinate system of dimension 3.  More... | |
| static CS_F_HOST_DEVICE 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_F_HOST_DEVICE cs_real_t | cs_math_3_33_3_dot_product (const cs_real_t n1[3], const cs_real_t t[3][3], const cs_real_t n2[3]) | 
| Compute the dot product of a tensor t with two vectors, n1 and n2.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_3_sym_33_3_dot_product (const cs_real_t n1[3], const cs_real_t t[6], const cs_real_t n2[3]) | 
| Compute the dot product of a symmetric tensor t with two vectors, n1 and n2.  More... | |
| static CS_F_HOST_DEVICE 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_F_HOST_DEVICE 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_3_normalise (const cs_real_t vin[3], cs_real_t vout[3]) | 
| Normalize a vector of 3 real values.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_3_normalize (const cs_real_t vin[3], cs_real_t vout[3]) | 
| Normalise a vector of 3 real values.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_3_normalize_threshold (const cs_real_t vin[3], const cs_real_t thres, cs_real_t vout[3]) | 
| Normalise a vector of 3 real values and clip the norm using a threshold value.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_3_orthogonal_projection (const cs_real_t n[3], const cs_real_t v[3], cs_real_t vout[restrict 3]) | 
| Orthogonal projection of a vector with respect to a normalised vector.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_3_normal_scaling (const cs_real_t n[3], cs_real_t factor, cs_real_t v[3]) | 
| Add the dot product with a normal vector to the normal direction to a vector.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_normal_scaling_add (const cs_real_t n[3], cs_real_t factor, cs_real_t t[3][3]) | 
| Add the dot product with a normal vector to the normal,normal component of a tensor: t += factor * n.t.n n(x)n.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_3_product (const cs_real_t m[3][3], const cs_real_t v[3], cs_real_t mv[restrict 3]) | 
| Compute the product of a matrix of 3x3 real values by a vector of 3 real values.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_3_product_add (const cs_real_t m[3][3], const cs_real_t v[3], cs_real_t mv[restrict 3]) | 
| Compute the product of a matrix of 3x3 real values by a vector of 3 real values add.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33t_3_product (const cs_real_t m[3][3], const cs_real_t v[3], cs_real_t mv[restrict 3]) | 
| Compute the product of the transpose of a matrix of 3x3 real values by a vector of 3 real values.  More... | |
| static CS_F_HOST_DEVICE 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_F_HOST_DEVICE void | cs_math_sym_33_3_product_add (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 and add it to the vector. NB: Symmetric matrix are stored as follows (s11, s22, s33, s12, s23, s13)  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_sym_33_sym_33_product_trace (const cs_real_t m1[6], const cs_real_t m2[6]) | 
| Compute the product of two symmetric matrices of 3x3 real values and take the trace. NB: Symmetric matrix are stored as follows (s11, s22, s33, s12, s23, s13)  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_33_trace (const cs_real_t t[3][3]) | 
| Compute the trace of a 3x3 tensor.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_6_trace (const cs_real_t t[6]) | 
| Compute the trace of a symmetric tensor.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_66_6_product (const cs_real_t m[6][6], const cs_real_t v[6], cs_real_t mv[restrict 6]) | 
| Compute the product of a matrix of 6x6 real values by a vector of 6 real values.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_66_6_product_add (const cs_real_t m[6][6], const cs_real_t v[6], cs_real_t mv[restrict 6]) | 
| Compute the product of a matrix of 6x6 real values by a vector of 6 real values and add it to the vector.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_33_determinant (const cs_real_t m[3][3]) | 
| Compute the determinant of a 3x3 matrix.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_sym_33_determinant (const cs_real_6_t m) | 
| Compute the determinant of a 3x3 symmetric matrix.  More... | |
| static CS_F_HOST_DEVICE 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 CS_F_HOST_DEVICE cs_real_t | cs_math_3_triple_product (const cs_real_t u[3], const cs_real_t v[3], const cs_real_t w[3]) | 
| Compute the triple product.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_3_orthonormal_basis (const cs_real_t vect[3], cs_real_t axes[3][3]) | 
| Build an orthonormal basis based on a first vector "vect". axes[0] is vect normalized, while (axes[0], axes[1], axes[23]) is an orthonormal base.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_inv_cramer (const cs_real_t in[3][3], cs_real_t out[3][3]) | 
| Inverse a 3x3 matrix.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_inv_cramer_in_place (cs_real_t a[3][3]) | 
| Inverse a 3x3 matrix in place, using Cramer's rule.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_inv_cramer_sym_in_place (cs_real_t a[3][3]) | 
| Inverse a 3x3 symmetric matrix (with non-symmetric storage) in place, using Cramer's rule.  More... | |
| static CS_F_HOST_DEVICE 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 CS_F_HOST_DEVICE void | cs_math_33_product (const cs_real_t m1[3][3], const cs_real_t m2[3][3], cs_real_t mout[3][3]) | 
| Compute the product of two 3x3 real valued matrices.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_transform_r_to_a (const cs_real_t m[3][3], const cs_real_t q[3][3], cs_real_t mout[3][3]) | 
| Compute transformation from relative to absolute reference frame Q^t M Q.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_sym_33_transform_r_to_a (const cs_real_t m[6], const cs_real_t q[3][3], cs_real_t mout[6]) | 
| Compute transformation from relative to absolute reference frame Q^t M Q.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_transform_a_to_r (const cs_real_t m[3][3], const cs_real_t q[3][3], cs_real_t mout[3][3]) | 
| Compute transformation from absolute to relative reference frame Q M Q^t.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_sym_33_transform_a_to_r (const cs_real_t m[6], const cs_real_t q[3][3], cs_real_t mout[6]) | 
| Compute transformation from absolute to relative reference frame Q M Q^t.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_extract_sym_ant (const cs_real_t m[3][3], cs_real_t m_sym[3][3], cs_real_t m_ant[3][3]) | 
| Extract from the given matrix its symmetric and anti-symmetric part.  More... | |
| static CS_F_HOST_DEVICE cs_real_t | cs_math_33_main_invariant_2 (const cs_real_t m[3][3]) | 
| Compute the second main invariant of the symmetric part of a 3x3 tensor.  More... | |
| static CS_F_HOST_DEVICE void | cs_math_33_product_add (const cs_real_t m1[3][3], const cs_real_t m2[3][3], cs_real_t mout[restrict 3][3]) | 
| Add the product of two 3x3 real matrices to a matrix.  More... | |
| static CS_F_HOST_DEVICE 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 CS_F_HOST_DEVICE void | cs_math_reduce_sym_prod_33_to_66 (const cs_real_t s[3][3], cs_real_t sout[restrict 6][6]) | 
| Compute a 6x6 matrix A, equivalent to a 3x3 matrix s, such as: A*R_6 = R*s^t + s*R.  More... | |
| static CS_F_HOST_DEVICE 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... | |
| static CS_F_HOST_DEVICE void | cs_nvec3 (const cs_real_3_t v, cs_nvec3_t *qv) | 
| Define a cs_nvec3_t structure from a cs_real_3_t.  More... | |
| CS_F_HOST_DEVICE 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 (Euclidean norm) between two points xa and xb in a Cartesian coordinate system of dimension 3.  More... | |
| void | cs_math_sym_33_eigen (const cs_real_t m[6], cs_real_t eig_vals[3]) | 
| Compute all eigenvalues of a 3x3 symmetric matrix with symmetric storage.  More... | |
| void | cs_math_33_eigen (const cs_real_t m[3][3], cs_real_t *eig_ratio, cs_real_t *eig_max) | 
| Compute max/min eigenvalues ratio and max. eigenvalue of a 3x3 symmetric matrix with non-symmetric storage.  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... | |
| void | cs_math_33_eig_val_vec (const cs_real_t m_in[3][3], const cs_real_t tol_err, cs_real_t eig_val[restrict 3], cs_real_t eig_vec[restrict 3][3]) | 
| Evaluate eigenvalues and eigenvectors of a real symmetric matrix m1[3,3]: m1*m2 = lambda*m2.  More... | |
| void | cs_math_fact_lu (cs_lnum_t n_blocks, const int b_size, const cs_real_t *a, cs_real_t *a_lu) | 
| Compute LU factorization of an array of dense matrices of identical size.  More... | |
| void | cs_math_fw_and_bw_lu (const cs_real_t a_lu[], const int n, cs_real_t x[], const cs_real_t b[]) | 
| Block Jacobi utilities. Compute forward and backward to solve an LU P*P system.  More... | |
| void | cs_math_sym_44_factor_ldlt (cs_real_t ldlt[10]) | 
| LDL^T: Modified Cholesky decomposition of a 4x4 SPD matrix. For more reference, see for instance http://mathforcollege.com/nm/mws/gen/04sle/mws_gen_sle_txt_cholesky.pdf.  More... | |
| cs_real_t | cs_math_sym_44_partial_solve_ldlt (const cs_real_t ldlt[10], const cs_real_t rhs[4]) | 
| LDL^T: Modified Cholesky decomposition of a 4x4 SPD matrix. For more reference, see for instance http://mathforcollege.com/nm/mws/gen/04sle/mws_gen_sle_txt_cholesky.pdf.  More... | |
| Variables | |
| const cs_real_t | cs_math_zero_threshold | 
| const cs_real_t | cs_math_1ov3 | 
| const cs_real_t | cs_math_2ov3 | 
| const cs_real_t | cs_math_4ov3 | 
| const cs_real_t | cs_math_5ov3 | 
| const cs_real_t | cs_math_1ov6 | 
| const cs_real_t | cs_math_1ov12 | 
| const cs_real_t | cs_math_1ov24 | 
| 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 | 
| static const cs_real_33_t | cs_math_33_identity | 
| static const cs_real_6_t | cs_math_sym_33_identity = {1., 1., 1., 0. ,0., 0.} | 
| 
 | 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 | 
| 
 | inlinestatic | 
Compute the product of a matrix of 3x3 real values by a vector of 3 real values add.
| [in] | m | matrix of 3x3 real values | 
| [in] | v | vector of 3 real values | 
| [in,out] | mv | vector of 3 real values | 
| 
 | inlinestatic | 
Compute the determinant of a 3x3 matrix.
| [in] | m | 3x3 matrix | 
| void cs_math_33_eig_val_vec | ( | const cs_real_t | m_in[3][3], | 
| const cs_real_t | tol_err, | ||
| cs_real_t | eig_val[restrict 3], | ||
| cs_real_t | eig_vec[restrict 3][3] | ||
| ) | 
Evaluate eigenvalues and eigenvectors of a real symmetric matrix m1[3,3]: m1*m2 = lambda*m2.
Use of Jacobi method for symmetric matrices (adapted from the book Numerical Recipes in C, Chapter 11.1)
| [in] | m_in | matrix of 3x3 real values (initial) | 
| [in] | tol_err | absolute tolerance (sum of off-diagonal elements) | 
| [out] | eig_val | vector of 3 real values (eigenvalues) | 
| [out] | eig_vec | matrix of 3x3 real values (eigenvectors) | 
Compute max/min eigenvalues ratio and max. eigenvalue of a 3x3 symmetric matrix with non-symmetric storage.
Based on: 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 | 
| 
 | inlinestatic | 
Extract from the given matrix its symmetric and anti-symmetric part.
| [in] | m | matrix of 3x3 real values | 
| [out] | m_sym | matrix of 3x3 real values (symmetric part) | 
| [out] | m_ant | matrix of 3x3 real values (anti-symmetric part) | 
| 
 | inlinestatic | 
Inverse a 3x3 matrix.
| [in] | in | matrix to inverse | 
| [out] | out | inversed matrix | 
| 
 | inlinestatic | 
Inverse a 3x3 matrix in place, using Cramer's rule.
| [in,out] | a | matrix to inverse | 
| 
 | inlinestatic | 
Inverse a 3x3 symmetric matrix (with non-symmetric storage) in place, using Cramer's rule.
| [in,out] | a | matrix to inverse | 
| 
 | inlinestatic | 
Compute the second main invariant of the symmetric part of a 3x3 tensor.
| [in] | m | matrix of 3x3 real values | 
| 
 | inlinestatic | 
Add the dot product with a normal vector to the normal,normal component of a tensor: t += factor * n.t.n n(x)n.
| [in] | n | normalised face normal vector | 
| [in] | factor | factor | 
| [in,out] | t | matrix to be scaled | 
| 
 | inlinestatic | 
Compute the product of two 3x3 real valued matrices.
| [in] | m1 | matrix of 3x3 real values | 
| [in] | m2 | matrix of 3x3 real values | 
| [out] | mout | m1.m2 product | 
| 
 | inlinestatic | 
Add the product of two 3x3 real matrices to a matrix.
| [in] | m1 | matrix of 3x3 real values | 
| [in] | m2 | matrix of 3x3 real values | 
| [out] | mout | matrix of 3x3 real values | 
| 
 | inlinestatic | 
Compute the trace of a 3x3 tensor.
| [in] | t | tensor of 3x3 real values | 
| 
 | inlinestatic | 
Compute transformation from absolute to relative reference frame Q M Q^t.
| [in] | m | matrix of 3x3 real values | 
| [in] | q | transformation matrix of 3x3 real values | 
| [out] | mout | Q M Q^t | 
| 
 | inlinestatic | 
Compute transformation from relative to absolute reference frame Q^t M Q.
| [in] | m | matrix of 3x3 real values | 
| [in] | q | transformation matrix of 3x3 real values | 
| [out] | mout | Q^t M Q | 
| 
 | 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 dot product of a tensor t with two vectors, n1 and n2.
| [in] | n1 | vector of 3 real values | 
| [in] | t | tensor of 3x3 real values | 
| [in] | n2 | 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 | cross-product of u an v | 
| 
 | inlinestatic | 
Compute the (euclidean) distance between two points xa and xb in a Cartesian coordinate system of dimension 3.
| [in] | xa | first coordinate | 
| [in] | xb | second coordinate | 
| 
 | inlinestatic | 
Compute  .
. 
| [in] | xa | first coordinate | 
| [in] | xb | second coordinate | 
| [in] | xc | third coordinate | 
| 
 | inlinestatic | 
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 | 
| CS_F_HOST_DEVICE 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 (Euclidean 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 va -> vb | 
| 
 | inlinestatic | 
Compute the euclidean norm of a vector of dimension 3.
| [in] | v | 
| 
 | inlinestatic | 
Add the dot product with a normal vector to the normal direction to a vector.
| [in] | n | normalised face normal vector | 
| [in] | factor | factor | 
| [in,out] | v | vector to be scaled | 
Normalize a vector of 3 real values.
| [in] | vin | vector | 
| [out] | vout | normalized vector | 
| 
 | inlinestatic | 
Normalise a vector of 3 real values.
To normalize in-place, vin and vout may point to the same array.
| [in] | vin | vector | 
| [out] | vout | normalized vector | 
| 
 | inlinestatic | 
Normalise a vector of 3 real values and clip the norm using a threshold value.
To normalize in-place, vin and vout may point to the same array.
| [in] | vin | vector | 
| [in] | thres | threshold for normalization | 
| [out] | vout | normalized vector | 
| 
 | inlinestatic | 
Orthogonal projection of a vector with respect to a normalised vector.
| [in] | n | normal vector direction | 
| [in] | v | vector to be projected | 
| [out] | vout | projection | 
| 
 | inlinestatic | 
Build an orthonormal basis based on a first vector "vect". axes[0] is vect normalized, while (axes[0], axes[1], axes[23]) is an orthonormal base.
| [in] | vect | Vector used to build the orthonormal basis | 
| [out] | axes | axes basis (cs_real_t[3][3]) | 
| 
 | inlinestatic | 
Compute the squared distance between two points xa and xb in a Cartesian coordinate system of dimension 3.
| [in] | xa | first coordinate | 
| [in] | xb | second coordinate | 
| 
 | inlinestatic | 
Compute the square norm of a vector of 3 real values.
| [in] | v | vector of 3 real values | 
| 
 | inlinestatic | 
Compute the dot product of a symmetric tensor t with two vectors, n1 and n2.
| [in] | n1 | vector of 3 real values | 
| [in] | t | tensor of 6 real values [ 0 3 5 ] [ 3 1 4 ] [ 5 4 2 ] | 
| [in] | n2 | vector of 3 real values | 
| 
 | inlinestatic | 
Compute the triple product.
| [in] | u | vector of 3 real values | 
| [in] | v | vector of 3 real values | 
| [in] | w | vector of 3 real values | 
| 
 | inlinestatic | 
Compute the product of a matrix of 6x6 real values by a vector of 6 real values.
| [in] | m | matrix of 6x6 real values | 
| [in] | v | vector of 6 real values | 
| [out] | mv | vector of 6 real values | 
| 
 | inlinestatic | 
Compute the product of a matrix of 6x6 real values by a vector of 6 real values and add it to the vector.
| [in] | m | matrix of 6x6 real values | 
| [in] | v | vector of 6 real values | 
| [out] | mv | vector of 6 real values | 
| 
 | inlinestatic | 
Compute the trace of a symmetric tensor.
| [in] | t | vector of 6 real values (symmetric tensor) | 
| 
 | inlinestatic | 
Computes the binomial coefficient of n and k.
| [in] | n | first argument | 
| [in] | k | second argument | 
| 
 | inlinestatic | 
Clamp function for a given scalar value.
| [in] | x | initial value | 
| [in] | xmin | min value for clamping | 
| [in] | xmax | max value for clamping | 
| 
 | inlinestatic | 
Compute the absolute value of a real value.
| [in] | x | value | 
Compute LU factorization of an array of dense matrices of identical size.
| [in] | n_blocks | number of blocks | 
| [in] | b_size | block size | 
| [in] | a | matrix blocks | 
| [out] | a_lu | LU factorizations of matrix blocks | 
| 
 | inlinestatic | 
Compute the max value of two real values.
| [in] | x,y | values | 
| 
 | inlinestatic | 
Compute the min value of two real values.
| [in] | x,y | values | 
Block Jacobi utilities. Compute forward and backward to solve an LU P*P system.
| [in] | a_lu | matrix LU factorization | 
| [in] | n | matrix size | 
| [out] | x | solution | 
| [out] | b | right hand side | 
| 
 | inlinestatic | 
Compute the square of a real value.
| [in] | x | value | 
| 
 | inlinestatic | 
Compute the cube of a real value.
| [in] | x | value | 
| 
 | inlinestatic | 
Compute the 4-th power of a real value.
| [in] | x | value | 
| 
 | inlinestatic | 
Compute the 5-th power of a real value.
| [in] | x | value | 
| 
 | inlinestatic | 
Compute a 6x6 matrix A, equivalent to a 3x3 matrix s, such as: A*R_6 = R*s^t + s*R.
| [in] | s | 3x3 matrix | 
| [out] | sout | 6x6 matrix | 
| 
 | inlinestatic | 
Compute the square of a real value.
| [in] | x | value | 
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 a symmetric matrix of 3x3 real values by a vector of 3 real values and add it to the vector. 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 determinant of a 3x3 symmetric matrix.
| [in] | m | 3x3 symmetric matrix | 
| 
 | 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 | 
Compute all eigenvalues of a 3x3 symmetric matrix with symmetric storage.
Based on: Oliver K. Smith "eigenvalues of a symmetric 3x3 matrix", Communication of the ACM (April 1961) (Wikipedia article entitled "Eigenvalue algorithm")
| [in] | m | 3x3 symmetric matrix (m11, m22, m33, m12, m23, m13) | 
| [out] | eig_vals | size 3 vector | 
| 
 | 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.
Warning: this is valid if and only if s1 and s2 commute (otherwise sout is not symmetric).
| [in] | s1 | symmetric matrix | 
| [in] | s2 | symmetric matrix | 
| [out] | sout | sout = s1 * s2 | 
| 
 | inlinestatic | 
Compute the product of two symmetric matrices of 3x3 real values and take the trace. NB: Symmetric matrix are stored as follows (s11, s22, s33, s12, s23, s13)
| [in] | m1 | matrix of 3x3 real values | 
| [in] | m2 | matrix of 3x3 real values | 
| 
 | inlinestatic | 
Compute transformation from absolute to relative reference frame Q M Q^t.
| [in] | m | symetric matrix of 3x3 real values | 
| [in] | q | transformation matrix of 3x3 real values | 
| [out] | mout | Q M Q^t | 
| 
 | inlinestatic | 
Compute transformation from relative to absolute reference frame Q^t M Q.
| [in] | m | symetric matrix of 3x3 real values | 
| [in] | q | transformation matrix of 3x3 real values | 
| [out] | mout | Q^t M Q | 
| void cs_math_sym_44_factor_ldlt | ( | cs_real_t | ldlt[10] | ) | 
LDL^T: Modified Cholesky decomposition of a 4x4 SPD matrix. For more reference, see for instance http://mathforcollege.com/nm/mws/gen/04sle/mws_gen_sle_txt_cholesky.pdf.
| [in,out] | ldlt | pointer to matrix coefficients: (m00, m10, m11, m20, m21, m22, m30, m31, m32, m33) in (f00, l10, f11, l20, l21, f22, l30, l31, l32, f33) out | 
LDL^T: Modified Cholesky decomposition of a 4x4 SPD matrix. For more reference, see for instance http://mathforcollege.com/nm/mws/gen/04sle/mws_gen_sle_txt_cholesky.pdf.
Here we only need to use the last element of the solution vector, so we return that value only and simplify the computation.
| [in,out] | ldlt | pointer to matrix coefficients: (f00, l10, f11, l20, l21, f22, l30, l31, l32, f33) | 
| [in] | rhs | right-hand side | 
| 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 | 
| 
 | inlinestatic | 
Define a cs_nvec3_t structure from a cs_real_3_t.
| [in] | v | vector of size 3 | 
| [out] | qv | pointer to a cs_nvec3_t structure | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | static | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | extern | 
| 
 | static | 
| 
 | extern |