-
Notifications
You must be signed in to change notification settings - Fork 298
/
DgesvSolver.h
66 lines (53 loc) · 2.15 KB
/
DgesvSolver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
/** @addtogroup solverDgesvSolver
*
* @{
*/
#include "FactoryExport.h"
#include <Core/Solver/AlgLoopSolverDefaultImplementation.h>
class DgesvSolver : public ILinearAlgLoopSolver, public AlgLoopSolverDefaultImplementation
{
public:
DgesvSolver(ILinSolverSettings* settings,shared_ptr<ILinearAlgLoop> algLoop=shared_ptr<ILinearAlgLoop>());
virtual ~DgesvSolver();
/// (Re-) initialize the solver
virtual void initialize();
/// Solution of a (non-)linear system of equations
virtual void solve();
//solve for a single instance call
virtual void solve(shared_ptr<ILinearAlgLoop> algLoop,bool first_solve = false);
/// Returns the status of iteration
virtual ITERATIONSTATUS getIterationStatus();
virtual void stepCompleted(double time);
virtual void restoreOldValues();
virtual void restoreNewValues();
virtual bool* getConditionsWorkArray();
virtual bool* getConditions2WorkArray();
virtual double* getVariableWorkArray();
private:
// Member variables
//---------------------------------------------------------------
shared_ptr<ILinearAlgLoop> _algLoop; ///< Algebraic loop to be solved
ITERATIONSTATUS
_iterationStatus; ///< Output - Denotes the status of iteration
long int
*_iHelp, ///< Pivot indices for LAPACK routines
*_jHelp; ///< Pivot indices for LAPACK routines
bool
_firstCall, ///< Temp - Denotes the first call to the solver, init() is called
_hasDgesvFactors, ///< =true if previous dgesv was called
_hasDgetc2Factors; ///< =true if previous dgetc2 was called
const char*
*_yNames; ///< Names of variables
double
*_yNominal, ///< Nominal values of variables
*_y, ///< Temp - Unknowns
*_y0, ///< Temp - Auxillary variables
*_y_old, ///< Temp - Stores old solution
*_y_new, ///< Temp - Stores new solution
*_b, ///< Right hand side
*_A, ///< Coefficients of linear system
*_zeroVec, ///< Zero vector
*_fNominal;
};
/** @} */ // end of solverLinearSolver