MBDyn-1.7.3
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
mthrdslv.h
Go to the documentation of this file.
1
/*
2
* MBDyn (C) is a multibody analysis code.
3
* http://www.mbdyn.org
4
*
5
* Copyright (C) 2004-2017
6
*
7
* Pierangelo Masarati <masarati@aero.polimi.it>
8
* Paolo Mantegazza <mantegazza@aero.polimi.it>
9
*
10
* Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
11
* via La Masa, 34 - 20156 Milano, Italy
12
* http://www.aero.polimi.it
13
*
14
* Changing this copyright notice is forbidden.
15
*
16
* This program is free software; you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation (version 2 of the License).
19
*
20
*
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
25
*
26
* You should have received a copy of the GNU General Public License
27
* along with this program; if not, write to the Free Software
28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
*/
30
31
32
/*
33
neq: is the matrix size;
34
a: is used to store matrix elements; a[row][col] is the element in row
35
row and column col;
36
nzr and nzc: are vectors of size neq, used to count the nonzero elements of a particular row or
37
column, respectively;
38
ri and ci: are neq x neq matrices used to store nonzero element indices; ri[col][i]
39
(resp. ci[row][i]), with i < nzr[col] (i < nzc[row]), is the row (column)
40
index of one of the nzr[col] (nzc[row]) nonzero elements in
41
column col (row row); note that indices in ri[col] and ci[row] are
42
not ordered;
43
nz: nz[row][col] is true if the element in row row and column col is
44
nonzero, false otherwise;
45
piv: is a vector of size neq.
46
47
48
The subroutine naivfct perform the LU factorization, naivslv the back-solve.
49
50
*/
51
52
53
#ifndef mthrdslv_h
54
#define mthrdslv_h
55
56
#ifdef __cplusplus
57
extern
"C"
{
58
#endif
/* __cplusplus */
59
60
enum
{
61
NOPIV
,
62
SPRSPIV
,
63
FULLPIV
64
};
65
66
/* #define PIVMETH NOPIV */
67
#define PIVMETH SPRSPIV
68
/* #define PIVMETH FULLPIV */
69
70
#define NAIVE_MASK (0xF0000000U)
71
#define NAIVE_MAX (~NAIVE_MASK)
72
73
#define NAIVE_ENULCOL (0x10000000U)
74
#define NAIVE_ENOPIV (0x20000000U)
75
#define NAIVE_ERANGE (0x40000000U)
76
77
78
typedef
integer
**
IMAT
;
79
typedef
doublereal
**
RMAT
;
80
typedef
char
**
NZMAT
;
81
82
extern
int
naivfct
(RMAT
a
,
integer
neq,
integer
*nzr, IMAT ri,
83
integer
*nzc, IMAT ci, NZMAT nz,
84
integer
*piv,
doublereal
minpiv);
85
86
extern
int
naivslv
(RMAT
a
,
integer
neq,
integer
*nzc, IMAT ci,
87
doublereal
*rhs,
doublereal
*sol,
integer
*piv);
88
89
#ifdef __cplusplus
90
}
91
#endif
/* __cplusplus */
92
93
#endif
/* mthrdslv_h */
94
NZMAT
char ** NZMAT
Definition:
mthrdslv.h:80
SPRSPIV
Definition:
mthrdslv.h:62
FULLPIV
Definition:
mthrdslv.h:63
IMAT
integer ** IMAT
Definition:
mthrdslv.h:78
naivslv
int naivslv(RMAT a, integer neq, integer *nzc, IMAT ci, doublereal *rhs, doublereal *sol, integer *piv)
Definition:
mthrdslv.c:190
NOPIV
Definition:
mthrdslv.h:61
naivfct
int naivfct(RMAT a, integer neq, integer *nzr, IMAT ri, integer *nzc, IMAT ci, NZMAT nz, integer *piv, doublereal minpiv)
Definition:
mthrdslv.c:76
a
static const doublereal a
Definition:
hfluid_.h:289
doublereal
double doublereal
Definition:
colamd.c:52
integer
long int integer
Definition:
colamd.c:51
RMAT
doublereal ** RMAT
Definition:
mthrdslv.h:79
libraries
libnaive
mthrdslv.h
Generated on Fri Apr 13 2018 10:19:36 for MBDyn-1.7.3 by
1.8.7