LisSolver
The GeMA Lis Numeric Solver Plugin
Loading...
Searching...
No Matches
lisMatrix.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_LIS_MATRIX_H_
25#define _GEMA_LIS_MATRIX_H_
26
27#include <gmSparseMatrix.h>
28
29struct LIS_MATRIX_STRUCT;
30typedef struct LIS_MATRIX_STRUCT *LIS_MATRIX;
31
32
34class LisMatrix : public GmSparseMatrix<int, GM_CSR_SPARSE_FORMAT>
35{
36public:
37
38 LisMatrix(int nlin, const LisMatrix* sharedLayout, GmSparseMatrixOptions options);
39 virtual ~LisMatrix();
40
42 LIS_MATRIX lis() const { return _lisMat; }
43
44 virtual void clear(bool keepSparseLayout);
45 virtual void clearLineAndColumnSet(const QVector<int>& indexList, bool setDiagonal, bool keepSparseLayout);
46 virtual void ensureDiagonal();
47
48protected:
49 virtual void matrixLayoutReady();
50 virtual GmSparseMatrix<int, GM_CSR_SPARSE_FORMAT>* detachAndClear();
51
52private:
53 LIS_MATRIX _lisMat;
54};
55
56#endif
A class for wrapping up a LIS sparse matrix
Definition lisMatrix.h:35
virtual void matrixLayoutReady()
Allocates space for matrix values and build the LIS wrapper over matrix vectors.
Definition lisMatrix.cpp:69
LIS_MATRIX lis() const
Returns the Lis matrix wrapped by this class.
Definition lisMatrix.h:42
LIS_MATRIX _lisMat
A Lis wrapper over the sparse matrix stored by the base class, without allocating additional memory.
Definition lisMatrix.h:53
virtual ~LisMatrix()
Destructor.
Definition lisMatrix.cpp:57
LisMatrix(int nlin, const LisMatrix *sharedLayout, GmSparseMatrixOptions options)
Constructor for the square matrix used by the LIS solver. If sharedLayout is different from NULL,...
Definition lisMatrix.cpp:42