Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
solverWrapper.h
1/******************************************************************************
2 * Copyright (C) 2006-2024 by the GIMLi development team *
3 * Carsten Rücker carsten@resistivity.net *
4 * *
5 * Licensed under the Apache License, Version 2.0 (the "License"); *
6 * you may not use this file except in compliance with the License. *
7 * You may obtain a copy of the License at *
8 * *
9 * http://www.apache.org/licenses/LICENSE-2.0 *
10 * *
11 * Unless required by applicable law or agreed to in writing, software *
12 * distributed under the License is distributed on an "AS IS" BASIS, *
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14 * See the License for the specific language governing permissions and *
15 * limitations under the License. *
16 * *
17 ******************************************************************************/
18
19#ifndef _GIMLI_SOLVERWRAPPER__H
20#define _GIMLI_SOLVERWRAPPER__H
21
22#include "gimli.h"
23
24namespace GIMLI{
25
26class DLLEXPORT SolverWrapper{
27public:
28
29 SolverWrapper(bool verbose=false);
30
31 virtual ~SolverWrapper();
32
33 virtual void setMatrix(const RSparseMatrix & S){THROW_TO_IMPL;};
34
35 virtual void setMatrix(const CSparseMatrix & S){THROW_TO_IMPL;};
36
37 virtual void solve(const RVector & rhs, RVector & solution) = 0;
38
39 virtual void solve(const CVector & rhs, CVector & solution){ THROW_TO_IMPL;}
40
41 std::string name() const { return name_; }
42
43protected:
44
45 std::string name_;
46 bool dummy_;
47 bool verbose_;
48 bool isComplex_;
49 uint dim_;
50 long nVals_;
51 double dropTol_;
52 double tolerance_;
53 double maxiter_;
54
55};
56
57} //namespace GIMLI;
58
59#endif // _GIMLI_SOLVERWRAPPER__H
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24