| 1 | /******************************************************************************
|
|---|
| 2 | * gmath.h
|
|---|
| 3 | * Top level header file for gmath units
|
|---|
| 4 |
|
|---|
| 5 | * @Copyright David D.Gray <ddgray@armadce.demon.co.uk>
|
|---|
| 6 | * 27th. Sep. 2000
|
|---|
| 7 | * Last updated: $Id: gmath.h 71201 2017-06-21 14:07:39Z neteler $
|
|---|
| 8 | *
|
|---|
| 9 |
|
|---|
| 10 | * This file is part of GRASS GIS. It is free software. You can
|
|---|
| 11 | * redistribute it and/or modify it under the terms of
|
|---|
| 12 | * the GNU General Public License as published by the Free Software
|
|---|
| 13 | * Foundation; either version 2 of the License, or (at your option)
|
|---|
| 14 | * any later version.
|
|---|
| 15 |
|
|---|
| 16 | * This program is distributed in the hope that it will be useful,
|
|---|
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 19 | * GNU General Public License for more details.
|
|---|
| 20 |
|
|---|
| 21 | ******************************************************************************/
|
|---|
| 22 |
|
|---|
| 23 | #ifndef GRASS_GMATH_H
|
|---|
| 24 | #define GRASS_GMATH_H
|
|---|
| 25 |
|
|---|
| 26 | #include <grass/config.h>
|
|---|
| 27 |
|
|---|
| 28 | #ifdef CTYPESGEN
|
|---|
| 29 | #undef __attribute__
|
|---|
| 30 | #define __attribute__(x)
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 | #include <stddef.h>
|
|---|
| 34 |
|
|---|
| 35 | /*solver names */
|
|---|
| 36 | #define G_MATH_SOLVER_DIRECT_GAUSS "gauss"
|
|---|
| 37 | #define G_MATH_SOLVER_DIRECT_LU "lu"
|
|---|
| 38 | #define G_MATH_SOLVER_DIRECT_CHOLESKY "cholesky"
|
|---|
| 39 | #define G_MATH_SOLVER_ITERATIVE_JACOBI "jacobi"
|
|---|
| 40 | #define G_MATH_SOLVER_ITERATIVE_SOR "sor"
|
|---|
| 41 | #define G_MATH_SOLVER_ITERATIVE_CG "cg"
|
|---|
| 42 | #define G_MATH_SOLVER_ITERATIVE_PCG "pcg"
|
|---|
| 43 | #define G_MATH_SOLVER_ITERATIVE_BICGSTAB "bicgstab"
|
|---|
| 44 |
|
|---|
| 45 | /*preconditioner */
|
|---|
| 46 | #define G_MATH_DIAGONAL_PRECONDITION 1
|
|---|
| 47 | #define G_MATH_ROWSCALE_ABSSUMNORM_PRECONDITION 2
|
|---|
| 48 | #define G_MATH_ROWSCALE_EUKLIDNORM_PRECONDITION 3
|
|---|
| 49 | #define G_MATH_ROWSCALE_MAXNORM_PRECONDITION 4
|
|---|
| 50 |
|
|---|
| 51 | /*!
|
|---|
| 52 | * \brief The row vector of the sparse matrix
|
|---|
| 53 | * */
|
|---|
| 54 | typedef struct
|
|---|
| 55 | {
|
|---|
| 56 | double *values; /*The non null values of the row */
|
|---|
| 57 | unsigned int cols; /*Number of entries */
|
|---|
| 58 | unsigned int *index; /*the index number */
|
|---|
| 59 | } G_math_spvector;
|
|---|
| 60 |
|
|---|
| 61 | #include <grass/defs/gmath.h>
|
|---|
| 62 |
|
|---|
| 63 | #endif /* GRASS_GMATH_H */
|
|---|