|
Flow123d
release_3.0.0-902-gf72c4b4
|
#include <float.h>
Go to the source code of this file.
Macros | |
| #define | NUM_ZERO DBL_MIN/DBL_EPSILON |
| Numerical helpers. More... | |
| #define | EPS(value) (value) |
| #define | ZERO EPS(1e-12) |
| #define | DBL_EQ(i, j) (fabs((i)-(j))<NUM_ZERO) |
| #define | DBL_GE(i, j) ((i)>(j)-NUM_ZERO) |
| #define | DBL_LE(i, j) ((i)<(j)+NUM_ZERO) |
| #define | DBL_GT(i, j) ((i)>(j)+NUM_ZERO) |
| #define | DBL_LT(i, j) ((i)<(j)-NUM_ZERO) |
| #define | SQUARE(x) ((x) * (x)) |
| Usefull math macros. More... | |
| #define | SGN(x) ( ((x)>ZERO)? (1) : ( ((x)<(-ZERO))? (-1) : (0) ) ) |
| #define | SUBDET2(i, j, k, l) (a[(i)][(k)]*a[(j)][(l)]-a[(i)][(l)]*a[(j)][(k)]) |
| #define | M_PI 3.14159265358979323846264338327950288f |
Typedefs | |
| typedef double | SmallVec1_t[1] |
| small matrix types More... | |
| typedef double | SmallVec2_t[2] |
| typedef double | SmallVec3_t[3] |
| typedef double | SmallVec4_t[4] |
| typedef SmallVec1_t * | SmallMtx1 |
| typedef SmallVec2_t * | SmallMtx2 |
| typedef SmallVec3_t * | SmallMtx3 |
| typedef SmallVec4_t * | SmallMtx4 |
Functions | |
| double | vector_length (double[]) |
| double | scalar_product (double[], double[]) |
| void | normalize_vector (double[]) |
| void | scale_vector (double[], double) |
| void | vector_product (double[], double[], double[]) |
| void | vector_difference (double[], double[], double[]) |
| double | Det3 (SmallMtx3 a) |
| double | MatrixInverse (double *a, double *b, int size) |
| void | PrintSmallMatrix (double *mtx, int size) |
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Definition in file math_fce.h.
| #define DBL_EQ | ( | i, | |
| j | |||
| ) | (fabs((i)-(j))<NUM_ZERO) |
Definition at line 50 of file math_fce.h.
| #define DBL_GE | ( | i, | |
| j | |||
| ) | ((i)>(j)-NUM_ZERO) |
Definition at line 51 of file math_fce.h.
| #define DBL_GT | ( | i, | |
| j | |||
| ) | ((i)>(j)+NUM_ZERO) |
Definition at line 53 of file math_fce.h.
| #define DBL_LE | ( | i, | |
| j | |||
| ) | ((i)<(j)+NUM_ZERO) |
Definition at line 52 of file math_fce.h.
| #define DBL_LT | ( | i, | |
| j | |||
| ) | ((i)<(j)-NUM_ZERO) |
Definition at line 54 of file math_fce.h.
Definition at line 45 of file math_fce.h.
| #define M_PI 3.14159265358979323846264338327950288f |
Definition at line 61 of file math_fce.h.
| #define NUM_ZERO DBL_MIN/DBL_EPSILON |
Numerical helpers.
Definition at line 41 of file math_fce.h.
Definition at line 58 of file math_fce.h.
| #define SQUARE | ( | x | ) | ((x) * (x)) |
Usefull math macros.
Definition at line 57 of file math_fce.h.
| #define SUBDET2 | ( | i, | |
| j, | |||
| k, | |||
| l | |||
| ) | (a[(i)][(k)]*a[(j)][(l)]-a[(i)][(l)]*a[(j)][(k)]) |
Definition at line 59 of file math_fce.h.
| #define ZERO EPS(1e-12) |
Definition at line 48 of file math_fce.h.
| typedef SmallVec1_t* SmallMtx1 |
Definition at line 29 of file math_fce.h.
| typedef SmallVec2_t* SmallMtx2 |
Definition at line 30 of file math_fce.h.
| typedef SmallVec3_t* SmallMtx3 |
Definition at line 31 of file math_fce.h.
| typedef SmallVec4_t* SmallMtx4 |
Definition at line 32 of file math_fce.h.
| typedef double SmallVec1_t[1] |
small matrix types
Definition at line 24 of file math_fce.h.
| typedef double SmallVec2_t[2] |
Definition at line 25 of file math_fce.h.
| typedef double SmallVec3_t[3] |
Definition at line 26 of file math_fce.h.
| typedef double SmallVec4_t[4] |
Definition at line 27 of file math_fce.h.
| double Det3 | ( | SmallMtx3 | a | ) |
Definition at line 94 of file math_fce.cc.
| double MatrixInverse | ( | double * | a, |
| double * | b, | ||
| int | size | ||
| ) |
Definition at line 104 of file math_fce.cc.
| void normalize_vector | ( | double | [] | ) |
Definition at line 48 of file math_fce.cc.
| void PrintSmallMatrix | ( | double * | mtx, |
| int | size | ||
| ) |
Definition at line 214 of file math_fce.cc.
| double scalar_product | ( | double | [], |
| double | [] | ||
| ) |
Definition at line 41 of file math_fce.cc.
| void scale_vector | ( | double | [], |
| double | |||
| ) |
Definition at line 60 of file math_fce.cc.
| void vector_difference | ( | double | [], |
| double | [], | ||
| double | [] | ||
| ) |
Definition at line 80 of file math_fce.cc.
| double vector_length | ( | double | [] | ) |
| void vector_product | ( | double | [], |
| double | [], | ||
| double | [] | ||
| ) |
Definition at line 68 of file math_fce.cc.
1.8.11