|
mmg2d
|
Find eigenvalues and eigenvectors of matrix. More...
#include <stdio.h>#include <string.h>#include <math.h>#include <assert.h>#include <stdlib.h>#include <stdint.h>#include "eigenv.h"
Macros | |
| #define | MG_EIGENV_EPS27 1.e-27 |
| #define | MG_EIGENV_EPS13 1.e-13 |
| #define | MG_EIGENV_EPS10 1.e-10 |
| #define | MG_EIGENV_EPS5e6 5.e-06 |
| #define | MG_EIGENV_EPS6 1.e-06 |
| #define | MG_EIGENV_EPS2e6 2.e-06 |
| #define | MG_EIGENV_EPS5 1.e-05 |
| #define | MAXTOU 50 |
| #define | egal(x, y) |
Functions | |
| static int | newton3 (double p[4], double x[3]) |
| Find root(s) of a polynomial of degree 3. More... | |
| static int | MMG5_check_accuracy (double mat[6], double lambda[3], double v[3][3], double w1[3], double w2[3], double w3[3], double maxm, int order, int symmat) |
| int | MMG5_eigenv (int symmat, double *mat, double lambda[3], double v[3][3]) |
| Find eigenvalues and vectors of a 3x3 matrix. More... | |
| int | MMG5_eigen2 (double *mm, double *lambda, double vp[2][2]) |
| Find eigenvalues and vectors of a 2x2 matrix. More... | |
| int | MMG5_eigensym (double m[3], double lambda[2], double vp[2][2]) |
Variables | |
| static double | Id [3][3] |
| Identity matrix. More... | |
Find eigenvalues and eigenvectors of matrix.
Find eigenvalues and eigenvectors of 2x2 or 3x3 symetric definite positive matrix.
| #define egal | ( | x, | |
| y | |||
| ) |
Check if numbers x and y are equal.
| #define MAXTOU 50 |
| #define MG_EIGENV_EPS10 1.e-10 |
| #define MG_EIGENV_EPS13 1.e-13 |
| #define MG_EIGENV_EPS27 1.e-27 |
| #define MG_EIGENV_EPS2e6 2.e-06 |
| #define MG_EIGENV_EPS5 1.e-05 |
| #define MG_EIGENV_EPS5e6 5.e-06 |
| #define MG_EIGENV_EPS6 1.e-06 |
|
static |
| mat | pointer toward a 3x3 matrix. |
| lambda | eigenvalues. |
| v | eigenvectors. |
| w1 | temporary array to perform the matrix cross product. |
| w2 | temporary array to perform the matrix cross product. |
| w3 | temporary array to perform the matrix cross product. |
| maxm | maximal value of the matrix used for normalization. |
| order | order of eigenvalues (1,2,3) or 0 if failed. |
| symmat | 0 if matrix is not symetric, 1 otherwise. |
Check the accuracy of the eigenvalues and vectors computation of a 3x3 matrix (symetric).

| int MMG5_eigen2 | ( | double * | mm, |
| double * | lambda, | ||
| double | vp[2][2] | ||
| ) |
Find eigenvalues and vectors of a 2x2 matrix.
| mm | pointer toward the matrix. |
| lambda | pointer toward the output eigenvalues. |
| vp | eigenvectors. |

|
inline |
| m | terms of symetric matrix . |
| lambda | eigenvalues of m. |
| vp | eigenvectors of m. |
Compute eigenelements of a symetric matrix m. Eigenvectors are orthogonal.

| int MMG5_eigenv | ( | int | symmat, |
| double * | mat, | ||
| double | lambda[3], | ||
| double | v[3][3] | ||
| ) |
Find eigenvalues and vectors of a 3x3 matrix.
| symmat | 0 if matrix is not symetric, 1 otherwise. |
| mat | pointer toward the matrix. |
| lambda | eigenvalues. |
| v | eigenvectors. |


|
static |
Find root(s) of a polynomial of degree 3.
| p | polynomial coefficients (b=p[2], c=p[1], d=p[0]). |
| x | root(s) of polynomial. |
Find root(s) of a polynomial of degree 3:
.

|
static |
Identity matrix.