/
LinearAlgLoopDefaultImplementation.h
55 lines (38 loc) · 1.3 KB
/
LinearAlgLoopDefaultImplementation.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
#pragma once
/** @addtogroup coreSystem
*
* @{
*/
/*****************************************************************************/
/**
Services for the implementation of an algebraic loop in open modelica.
\date October, 1st, 2008
\author
*/
/*****************************************************************************
Copyright (c) 2008, OSMC
*****************************************************************************/
class BOOST_EXTENSION_ALGLOOPDEFAULTIMPL_DECL LinearAlgLoopDefaultImplementation
{
public:
LinearAlgLoopDefaultImplementation();
~LinearAlgLoopDefaultImplementation();
/// Provide number (dimension) of variables according to data type
int getDimReal() const;
/// (Re-) initialize the system of equations
void initialize();
/// Provide the right hand side (residuals)
void getb(double* res) const;
bool getUseSparseFormat();
void setUseSparseFormat(bool value);
//void getSparseAdata(double* data, int nonzeros);
// Member variables
//---------------------------------------------------------------
protected:
int _dimAEq; ///< Number (dimension) of unknown/equations (the index denotes the data type; 0: double, 1: int, 2: bool)
double* _b;
double * _AData;
double* _Ax;
bool _useSparseFormat;
};
/** @} */ // end of coreSystem