SuperLuMtSolver
The GeMA Super LU Mt Numeric Solver Plugin
Loading...
Searching...
No Matches
superLuMtMatrix.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_SUPERLUMT_MATRIX_H_
25#define _GEMA_SUPERLUMT_MATRIX_H_
26
27#include <gmSparseMatrix.h>
28
29#include <slu_mt_ddefs.h> // For SuperMatrix and needed additional definitions used by supermatrix.h
30
32class SuperLuMtMatrix : public GmSparseMatrix<int, GM_CSC_SPARSE_FORMAT>
33{
34public:
35
36 SuperLuMtMatrix(int nlin, const SuperLuMtMatrix* sharedLayout, GmSparseMatrixOptions options);
37 virtual ~SuperLuMtMatrix();
38
40 SuperMatrix* superLuMatrix() { return &_sluMatrix; }
41
42 virtual void clear(bool keepSparseLayout);
43 virtual void clearLineAndColumnSet(const QVector<int>& indexList, bool setDiagonal, bool keepSparseLayout);
44 virtual void ensureDiagonal();
45
46protected:
47 virtual void matrixLayoutReady();
48 virtual GmSparseMatrix<int, GM_CSC_SPARSE_FORMAT>* detachAndClear();
49
50private:
51 void updateSluMatrix();
52 void clearSluMatrix();
53
54 SuperMatrix _sluMatrix;
55};
56
57#endif
A class for wrapping up a Super Lu Mt sparse matrix
Definition superLuMtMatrix.h:33
void clearSluMatrix()
Clears the information stored in the SuperLU matrix.
Definition superLuMtMatrix.cpp:144
SuperLuMtMatrix(int nlin, const SuperLuMtMatrix *sharedLayout, GmSparseMatrixOptions options)
Constructor for the square matrix used by the SuperLuMt solver. If sharedLayout is different from NUL...
Definition superLuMtMatrix.cpp:37
SuperMatrix * superLuMatrix()
Returns the SuperLu matrix wrapped by this class.
Definition superLuMtMatrix.h:40
virtual void matrixLayoutReady()
Allocates space for matrix values and build the wrapper over matrix vectors.
Definition superLuMtMatrix.cpp:65
virtual ~SuperLuMtMatrix()
Destructor.
Definition superLuMtMatrix.cpp:54
void updateSluMatrix()
Updates the number of non - zero values + value and index pointers in the super LU matrix from the sp...
Definition superLuMtMatrix.cpp:129