1 | /* $Id: ClpCholeskyMumps.hpp 1692 2011-03-05 18:05:01Z forrest $ */ |
---|
2 | // Copyright (C) 2009, International Business Machines |
---|
3 | // Corporation and others. All Rights Reserved. |
---|
4 | // This code is licensed under the terms of the Eclipse Public License (EPL). |
---|
5 | |
---|
6 | #ifndef ClpCholeskyMumps_H |
---|
7 | #define ClpCholeskyMumps_H |
---|
8 | #include "ClpCholeskyBase.hpp" |
---|
9 | class ClpMatrixBase; |
---|
10 | class ClpCholeskyDense; |
---|
11 | |
---|
12 | // unfortunately, DMUMPS_STRUC_C is an anonymous struct in MUMPS, so we define it to void for everyone outside ClpCholeskyMumps |
---|
13 | // if this file is included by ClpCholeskyMumps.cpp, then after dmumps_c.h has been included, which defines MUMPS_VERSION |
---|
14 | #ifndef MUMPS_VERSION |
---|
15 | typedef void DMUMPS_STRUC_C; |
---|
16 | #endif |
---|
17 | |
---|
18 | /** Mumps class for Clp Cholesky factorization |
---|
19 | |
---|
20 | */ |
---|
21 | class ClpCholeskyMumps : public ClpCholeskyBase { |
---|
22 | |
---|
23 | public: |
---|
24 | /**@name Virtual methods that the derived classes provides */ |
---|
25 | //@{ |
---|
26 | /** Orders rows and saves pointer to matrix.and model. |
---|
27 | Returns non-zero if not enough memory */ |
---|
28 | virtual int order(ClpInterior * model) ; |
---|
29 | /** Does Symbolic factorization given permutation. |
---|
30 | This is called immediately after order. If user provides this then |
---|
31 | user must provide factorize and solve. Otherwise the default factorization is used |
---|
32 | returns non-zero if not enough memory */ |
---|
33 | virtual int symbolic(); |
---|
34 | /** Factorize - filling in rowsDropped and returning number dropped. |
---|
35 | If return code negative then out of memory */ |
---|
36 | virtual int factorize(const double * diagonal, int * rowsDropped) ; |
---|
37 | /** Uses factorization to solve. */ |
---|
38 | virtual void solve (double * region) ; |
---|
39 | //@} |
---|
40 | |
---|
41 | |
---|
42 | /**@name Constructors, destructor */ |
---|
43 | //@{ |
---|
44 | /** Constructor which has dense columns activated. |
---|
45 | Default is off. */ |
---|
46 | ClpCholeskyMumps(int denseThreshold = -1); |
---|
47 | /** Destructor */ |
---|
48 | virtual ~ClpCholeskyMumps(); |
---|
49 | /// Clone |
---|
50 | virtual ClpCholeskyBase * clone() const ; |
---|
51 | //@} |
---|
52 | |
---|
53 | private: |
---|
54 | // Mumps structure |
---|
55 | DMUMPS_STRUC_C* mumps_; |
---|
56 | |
---|
57 | // Copy |
---|
58 | ClpCholeskyMumps(const ClpCholeskyMumps&); |
---|
59 | // Assignment |
---|
60 | ClpCholeskyMumps& operator=(const ClpCholeskyMumps&); |
---|
61 | }; |
---|
62 | |
---|
63 | #endif |
---|