Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
ldlWrapper.h
1/***************************************************************************
2 * Copyright (C) 2006-2014 by the GIMLi development team *
3 * Carsten Rücker carsten@resistivity.net *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21#ifndef _GIMLI_LDLWRAPPER__H
22#define _GIMLI_LDLWRAPPER__H
23
24#include "gimli.h"
25#include "solverWrapper.h"
26
27namespace GIMLI{
28
29class DLLEXPORT LDLWrapper : public SolverWrapper {
30public:
31 LDLWrapper(RSparseMatrix & S, bool verbose=false);
32
33 LDLWrapper(CSparseMatrix & S, bool verbose=false);
34
35 virtual ~LDLWrapper();
36
37 static bool valid();
38
39 int factorise();
40
41 virtual void setMatrix(RSparseMatrix & S);
42
43 virtual void solve(const RVector & rhs, RVector & solution);
44
45protected:
46
47 int initialize_(RSparseMatrix & S);
48 void free_();
49
50 int * colPtr_;
51 int * rowIdx_;
52 double * vals_;
53
54 int * Li_;
55 int * Lp_;
56 double * Lx_;
57 double * D_;
58
59 bool preordering_;
60 int * P_;
61 int * Pinv_;
62};
63
64} //namespace GIMLI;
65
66#endif // _GIMLI_LDLWRAPPER__H
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24