EPANET  3.0
EPANET Development Project
sparspak.h
1 
2 // !!!! THIS IS LEGACY CODE THAT SHOULD BE TREATED AS AN !!!!
3 // !!!! EXTERNAL LIBRARY AND NOT BE MODIFIED. !!!!
4 
5 
6 /*****************************************************************
7 ********** SPARSPAK ..... SOLUTION OF SPARSE *********
8 ********** SYMMETRIC SYSTEMS OF LINEAR EQUATIONS *********
9 ********** BY LDL FACTORIZATION WITH MMD RE-ORDERING *********
10 ******************************************************************
11 *
12 *******************************************************************/
13 #ifndef SPARSPAK_H_
14 #define SPARSPAK_H_
15 
16 int sp_genmmd(int* neqns, int* xadj, int* adjncy, int* invp, int* perm,
17  int* delta, int* dhead, int* qsize, int* llist, int* marker,
18  int* maxint, int* nofsub);
19  // Re-orders rows of matrix A to reduce fill-in when A is
20  // factorized to produce L.
21 
22 void sp_smbfct(int neqns, int* xadj, int* adjncy, int* perm, int* invp,
23  int *xlnz, int& maxlnz, int* xnzsub, int* nzsub,
24  int& maxsub, int* rchlnk, int* mrglnk, int* marker,
25  int& flag);
26  // Performs symbolic factorization of matrix A to identify non-zero
27  // entries of L.
28 
29 void sp_numfct(int neqns, int* xlnz, double* lnz, int* xnzsub, int* nzsub,
30  double* diag, int* link, int* first, double* temp,
31  int& iflag);
32  // Performs numerical factorization of A to compute the non-zero
33  // values in L.
34 
35 void sp_solve(int neqns, int* xlnz, double* lnz, int* xnzsub,
36  int* nzsub, double* diag, double* rhs);
37  // Solves the factorized system LDL'x = b.
38 
39 #endif