escript  Revision_
SystemMatrix.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2018 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 
18 /****************************************************************************/
19 
20 /* Paso: SystemMatrix */
21 
22 /****************************************************************************/
23 
24 /* Copyrights by ACcESS Australia 2003,2004,2005,2006 */
25 /* Author: Lutz Gross, l.gross@uq.edu.au */
26 
27 /****************************************************************************/
28 
29 #ifndef __PASO_SYSTEMMATRIX_H__
30 #define __PASO_SYSTEMMATRIX_H__
31 
32 #include "SparseMatrix.h"
33 #include "SystemMatrixPattern.h"
34 
35 #include <escript/AbstractSystemMatrix.h>
36 
37 namespace paso {
38 
39 struct Options;
40 class SystemMatrix;
41 typedef boost::shared_ptr<SystemMatrix> SystemMatrix_ptr;
42 typedef boost::shared_ptr<const SystemMatrix> const_SystemMatrix_ptr;
43 
44 typedef int SystemMatrixType;
45 
47 class SystemMatrix : public escript::AbstractSystemMatrix
48 {
49 public:
52 
54  dim_t rowBlockSize, dim_t columnBlockSize,
55  bool patternIsUnrolled, const escript::FunctionSpace& rowFS,
56  const escript::FunctionSpace& colFS);
57 
59 
64  virtual void nullifyRowsAndCols(escript::Data& mask_row,
65  escript::Data& mask_col,
66  double main_diagonal_value);
67 
68  virtual inline void saveMM(const std::string& filename) const
69  {
70  if (mpi_info->size > 1) {
71  //throw PasoException("SystemMatrix::saveMM: Only single rank supported.");
73  if (mpi_info->rank == 0)
74  merged->saveMM(filename.c_str());
75  } else {
76  mainBlock->saveMM(filename.c_str());
77  }
78  }
79 
80  virtual inline void saveHB(const std::string& filename) const
81  {
82  if (mpi_info->size > 1) {
83  throw PasoException("SystemMatrix::saveHB: Only single rank supported.");
84  } else if (!(type & MATRIX_FORMAT_CSC)) {
85  throw PasoException("SystemMatrix::saveHB: Only CSC format supported.");
86  } else {
87  mainBlock->saveHB_CSC(filename.c_str());
88  }
89  }
90 
91  virtual void resetValues(bool preserveSolverData = false);
92 
97  void nullifyRows(double* mask_row, double main_diagonal_value);
98 
99  void add(dim_t, index_t*, dim_t, dim_t, index_t*, dim_t, double*);
100 
101  void makeZeroRowSums(double* left_over);
102 
111  void copyColCoupleBlock();
112 
113  void copyRemoteCoupleBlock(bool recreatePattern);
114 
115  void fillWithGlobalCoordinates(double f1);
116 
117  void print() const;
118 
122 
123  void mergeMainAndCouple(index_t** p_ptr, index_t** p_idx, double** p_val) const;
124 
125  void mergeMainAndCouple_CSR_OFFSET0(index_t** p_ptr, index_t** p_idx, double** p_val) const;
126  void mergeMainAndCouple_CSR_OFFSET0_Block(index_t** p_ptr, index_t** p_idx, double** p_val) const;
127 
128  void mergeMainAndCouple_CSC_OFFSET1(index_t** p_ptr, index_t** p_idx, double** p_val) const;
129 
130  void copyMain_CSC_OFFSET1(index_t** p_ptr, index_t** p_idx, double** p_val);
131 
132  void extendedRowsForST(dim_t* degree_ST, index_t* offset_ST, index_t* ST);
133 
134  void applyBalanceInPlace(double* x, bool RHS) const;
135 
136  void applyBalance(double* x_out, const double* x, bool RHS) const;
137 
138  void balance();
139 
140  double getGlobalSize() const;
141 
142  void setPreconditioner(Options* options);
143 
148  void solvePreconditioner(double* x, double* b);
149 
150  void freePreconditioner();
151 
153 
154  inline void startCollect(const double* in) const
155  {
156  startColCollect(in);
157  }
158 
159  inline double* finishCollect() const
160  {
161  return finishColCollect();
162  }
163 
164  inline void startColCollect(const double* in) const
165  {
166  col_coupler->startCollect(in);
167  }
168 
169  inline double* finishColCollect() const
170  {
171  return col_coupler->finishCollect();
172  }
173 
174  inline void startRowCollect(const double* in)
175  {
176  row_coupler->startCollect(in);
177  }
178 
179  inline double* finishRowCollect()
180  {
181  return row_coupler->finishCollect();
182  }
183 
184  inline dim_t getNumRows() const
185  {
186  return mainBlock->numRows;
187  }
188 
189  inline dim_t getNumCols() const
190  {
191  return mainBlock->numCols;
192  }
193 
194  inline dim_t getTotalNumRows() const
195  {
196  return getNumRows() * row_block_size;
197  }
198 
199  inline dim_t getTotalNumCols() const
200  {
201  return getNumCols() * col_block_size;
202  }
203 
204  inline dim_t getRowOverlap() const
205  {
206  return row_coupler->getNumOverlapComponents();
207  }
208 
209  inline dim_t getColOverlap() const
210  {
211  return col_coupler->getNumOverlapComponents();
212  }
213 
214  inline dim_t getGlobalNumRows() const
215  {
216  if (type & MATRIX_FORMAT_CSC) {
217  return pattern->input_distribution->getGlobalNumComponents();
218  }
219  return pattern->output_distribution->getGlobalNumComponents();
220  }
221 
222  inline dim_t getGlobalNumCols() const
223  {
224  if (type & MATRIX_FORMAT_CSC) {
225  return pattern->output_distribution->getGlobalNumComponents();
226  }
227  return pattern->input_distribution->getGlobalNumComponents();
228  }
229 
230  inline dim_t getGlobalTotalNumRows() const
231  {
232  return getGlobalNumRows() * row_block_size;
233  }
234 
235  inline dim_t getGlobalTotalNumCols() const
236  {
237  return getGlobalNumCols() * col_block_size;
238  }
239 
240  inline double getSparsity() const
241  {
242  return getGlobalSize() /
244  }
245 
246  inline dim_t getNumOutput() const
247  {
248  return pattern->getNumOutput();
249  }
250 
251  inline void copyBlockFromMainDiagonal(double* out) const
252  {
253  mainBlock->copyBlockFromMainDiagonal(out);
254  }
255 
256  inline void copyBlockToMainDiagonal(const double* in)
257  {
258  mainBlock->copyBlockToMainDiagonal(in);
259  }
260 
261  inline void copyFromMainDiagonal(double* out) const
262  {
263  mainBlock->copyFromMainDiagonal(out);
264  }
265 
266  inline void copyToMainDiagonal(const double* in)
267  {
268  mainBlock->copyToMainDiagonal(in);
269  }
270 
271  inline void setValues(double value)
272  {
273  mainBlock->setValues(value);
274  col_coupleBlock->setValues(value);
275  row_coupleBlock->setValues(value);
276  is_balanced = false;
277  }
278 
279  inline void rowSum(double* row_sum) const
280  {
282  throw PasoException("SystemMatrix::rowSum: No normalization "
283  "available for compressed sparse column or index offset 1.");
284  } else {
285  const dim_t nrow = mainBlock->numRows*row_block_size;
286 #pragma omp parallel for
287  for (index_t irow=0; irow<nrow; ++irow) {
288  row_sum[irow]=0.;
289  }
290  mainBlock->addRow_CSR_OFFSET0(row_sum);
291  col_coupleBlock->addRow_CSR_OFFSET0(row_sum);
292  }
293  }
294 
295  void MatrixVector(double alpha, const double* in, double beta,
296  double* out) const;
297 
298  void MatrixVector_CSR_OFFSET0(double alpha, const double* in, double beta,
299  double* out) const;
300 
301  static SystemMatrix_ptr loadMM_toCSR(const char* filename);
302 
303  static SystemMatrix_ptr loadMM_toCSC(const char* filename);
304 
305  static int getSystemMatrixTypeId(int solver, int preconditioner,
306  int package, bool symmetry,
307  const escript::JMPI& mpi_info);
308 
311 
314 
318 
322 
325 
334 
336 
342  double* balance_vector;
343 
345  mutable index_t* global_id;
346 
348  mutable index_t solver_package;
349 
351  void* solver_p;
352 
353 private:
354  virtual void setToSolution(escript::Data& out, escript::Data& in,
355  boost::python::object& options) const;
356 
357  virtual void ypAx(escript::Data& y, escript::Data& x) const;
358 
359  void solve(double* out, double* in, Options* options) const;
360 };
361 
362 
363 void RHS_loadMM_toCSR(const char* filename, double* b, dim_t size);
364 
365 
366 } // namespace paso
367 
368 #endif // __PASO_SYSTEMMATRIX_H__
369 
MATRIX_FORMAT_BLK1
#define MATRIX_FORMAT_BLK1
Definition: Paso.h:62
paso::SystemMatrix::copyFromMainDiagonal
void copyFromMainDiagonal(double *out) const
Definition: SystemMatrix.h:272
escript::Data::isComplex
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1163
paso::SystemMatrix::nullifyRowsAndCols
virtual void nullifyRowsAndCols(escript::Data &mask_row, escript::Data &mask_col, double main_diagonal_value)
Definition: SystemMatrix.cpp:255
paso::SystemMatrix::getGlobalSize
double getGlobalSize() const
Definition: SystemMatrix.cpp:182
paso::SystemMatrix::loadMM_toCSC
static SystemMatrix_ptr loadMM_toCSC(const char *filename)
Definition: SystemMatrix_loadMM.cpp:211
paso::SystemMatrix::nullifyRows
void nullifyRows(double *mask_row, double main_diagonal_value)
Definition: SystemMatrix.cpp:234
paso::SystemMatrix::mpi_info
escript::JMPI mpi_info
Definition: SystemMatrix.h:332
escript::Data::requireWrite
void requireWrite()
Ensures data is ready for write access. This means that the data will be resolved if lazy and will be...
Definition: Data.cpp:1242
paso::SystemMatrix::is_balanced
bool is_balanced
Definition: SystemMatrix.h:346
paso::SystemMatrix::freePreconditioner
void freePreconditioner()
Definition: SystemMatrix.cpp:175
paso::SystemMatrix::copyBlockFromMainDiagonal
void copyBlockFromMainDiagonal(double *out) const
Definition: SystemMatrix.h:262
escript::Distribution_ptr
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:35
paso::SystemMatrix::copyColCoupleBlock
void copyColCoupleBlock()
Definition: SystemMatrix.cpp:376
paso::SystemMatrix::col_distribution
escript::Distribution_ptr col_distribution
Definition: SystemMatrix.h:331
MATRIX_FORMAT_CSC
#define MATRIX_FORMAT_CSC
Definition: Paso.h:61
paso::RHS_loadMM_toCSR
void RHS_loadMM_toCSR(const char *filename, double *b, dim_t size)
Definition: SystemMatrix_loadMM.cpp:310
paso::SystemMatrix::print
void print() const
Definition: SystemMatrix_debug.cpp:117
paso::solve_free
void solve_free(SystemMatrix *in)
Definition: solve.cpp:140
paso::SystemMatrix::getColOverlap
dim_t getColOverlap() const
Definition: SystemMatrix.h:220
paso::SystemMatrix::resetValues
virtual void resetValues(bool preserveSolverData=false)
resets the matrix entries
Definition: SystemMatrix.cpp:317
paso::SystemMatrix::mergeMainAndCouple_CSR_OFFSET0
void mergeMainAndCouple_CSR_OFFSET0(index_t **p_ptr, index_t **p_idx, double **p_val) const
Definition: SystemMatrix_mergeMainAndCouple.cpp:76
paso::SystemMatrix::rowSum
void rowSum(double *row_sum) const
Definition: SystemMatrix.h:290
paso::Coupler
Definition: Coupler.h:52
paso::SystemMatrix::saveHB
virtual void saveHB(const std::string &filename) const
writes the matrix to a file using the Harwell-Boeing file format
Definition: SystemMatrix.h:91
paso::SystemMatrix::getGlobalNumCols
dim_t getGlobalNumCols() const
Definition: SystemMatrix.h:233
paso::SystemMatrix::copyBlockToMainDiagonal
void copyBlockToMainDiagonal(const double *in)
Definition: SystemMatrix.h:267
paso::SystemMatrix::getGlobalTotalNumRows
dim_t getGlobalTotalNumRows() const
Definition: SystemMatrix.h:241
paso::SystemMatrix::getGlobalTotalNumCols
dim_t getGlobalTotalNumCols() const
Definition: SystemMatrix.h:246
paso::SystemMatrix::mergeMainAndCouple_CSC_OFFSET1
void mergeMainAndCouple_CSC_OFFSET1(index_t **p_ptr, index_t **p_idx, double **p_val) const
Definition: SystemMatrix_mergeMainAndCouple.cpp:296
paso::SystemMatrix_ptr
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:51
paso::Options::getPackage
static int getPackage(int solver, int package, bool symmetry, const escript::JMPI &mpi_info)
Definition: Options.cpp:321
paso::SystemMatrix::getSparsity
double getSparsity() const
Definition: SystemMatrix.h:251
escript::DataTypes::DataVectorAlt::data
ElementType * data()
Definition: DataVectorAlt.h:222
MPI_SUM
#define MPI_SUM
Definition: EsysMPI.h:50
paso::SystemMatrix::add
void add(dim_t, index_t *, dim_t, dim_t, index_t *, dim_t, double *)
paso::SystemMatrixPattern_ptr
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:50
paso::SystemMatrix::mergeMainAndCouple_CSR_OFFSET0_Block
void mergeMainAndCouple_CSR_OFFSET0_Block(index_t **p_ptr, index_t **p_idx, double **p_val) const
Definition: SystemMatrix_mergeMainAndCouple.cpp:188
paso::Options::mapEscriptOption
static int mapEscriptOption(int escriptOption)
returns the corresponding paso option code for an escript option code
Definition: Options.cpp:361
escript::AbstractSystemMatrix::getColumnFunctionSpace
FunctionSpace getColumnFunctionSpace() const
returns the column function space
Definition: AbstractSystemMatrix.h:102
paso::SystemMatrix::copyRemoteCoupleBlock
void copyRemoteCoupleBlock(bool recreatePattern)
Definition: SystemMatrix_copyRemoteCoupleBlock.cpp:50
escript::Data::getDataPointSize
int getDataPointSize() const
Return the size of the data point. It is the product of the data point shape dimensions.
Definition: Data.cpp:1363
escript::FunctionSpace
Definition: FunctionSpace.h:45
paso::SystemMatrix::applyBalanceInPlace
void applyBalanceInPlace(double *x, bool RHS) const
Definition: SystemMatrix.cpp:454
escript::Data::getFunctionSpace
const FunctionSpace & getFunctionSpace() const
Return the function space.
Definition: Data.h:461
paso::SystemMatrix::setPreconditioner
void setPreconditioner(Options *options)
Definition: SystemMatrix.cpp:160
PASO_MKL
#define PASO_MKL
Definition: Options.h:48
MATRIX_FORMAT_OFFSET1
#define MATRIX_FORMAT_OFFSET1
Definition: Paso.h:63
SparseMatrix.h
paso::SystemMatrix::finishCollect
double * finishCollect() const
Definition: SystemMatrix.h:170
paso::SystemMatrix::startCollect
void startCollect(const double *in) const
Definition: SystemMatrix.h:165
MPI_INT
#define MPI_INT
Definition: EsysMPI.h:44
Options.h
paso::SystemMatrix::applyBalance
void applyBalance(double *x_out, const double *x, bool RHS) const
Definition: SystemMatrix.cpp:473
MPI_MAX
#define MPI_MAX
Definition: EsysMPI.h:52
paso::SystemMatrix::solver_package
index_t solver_package
package code controlling the solver pointer
Definition: SystemMatrix.h:359
Solver.h
paso::SystemMatrix::balance_vector
double * balance_vector
Definition: SystemMatrix.h:353
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:62
escript::AbstractSystemMatrix::getPtr
ASM_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractSystemMatrix.cpp:52
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:87
paso::SystemMatrix::mergeSystemMatrix
SparseMatrix_ptr mergeSystemMatrix() const
Definition: SystemMatrix.cpp:577
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:70
paso::SystemMatrix::type
SystemMatrixType type
Definition: SystemMatrix.h:320
paso::SystemMatrix::getGlobalNumRows
dim_t getGlobalNumRows() const
Definition: SystemMatrix.h:225
escript::AbstractSystemMatrix
Base class for escript system matrices.
Definition: AbstractSystemMatrix.h:53
paso::SystemMatrix::col_coupler
Coupler_ptr< real_t > col_coupler
Definition: SystemMatrix.h:334
paso::SystemMatrix::borrowMainDiagonalPointer
index_t * borrowMainDiagonalPointer() const
Definition: SystemMatrix.cpp:198
paso::SystemMatrix::solver_p
void * solver_p
pointer to data needed by a solver
Definition: SystemMatrix.h:362
paso::SystemMatrix::balance
void balance()
Definition: SystemMatrix.cpp:492
paso::SystemMatrix::mainBlock
SparseMatrix_ptr mainBlock
main block
Definition: SystemMatrix.h:338
paso::Coupler_ptr
boost::shared_ptr< Coupler< T > > Coupler_ptr
Definition: Coupler.h:53
SystemMatrixPattern.h
paso::SystemMatrix::copyMain_CSC_OFFSET1
void copyMain_CSC_OFFSET1(index_t **p_ptr, index_t **p_idx, double **p_val)
paso::SystemMatrix::global_id
index_t * global_id
stores the global ids for all cols in col_coupleBlock
Definition: SystemMatrix.h:356
SystemMatrix.h
paso::SystemMatrix::ypAx
virtual void ypAx(escript::Data &y, escript::Data &x) const
performs y+=this*x
Definition: SystemMatrix.cpp:352
paso::SystemMatrix::row_coupler
Coupler_ptr< real_t > row_coupler
Definition: SystemMatrix.h:335
paso::SystemMatrix::row_coupleBlock
SparseMatrix_ptr row_coupleBlock
coupling to neighbouring processors (col - row)
Definition: SystemMatrix.h:342
paso::const_SystemMatrix_ptr
boost::shared_ptr< const SystemMatrix > const_SystemMatrix_ptr
Definition: SystemMatrix.h:53
paso::SystemMatrix::col_block_size
dim_t col_block_size
Definition: SystemMatrix.h:327
PASO_PASO
#define PASO_PASO
Definition: Options.h:54
PASO_UMFPACK
#define PASO_UMFPACK
Definition: Options.h:49
paso::SystemMatrix::extendedRowsForST
void extendedRowsForST(dim_t *degree_ST, index_t *offset_ST, index_t *ST)
Definition: SystemMatrix_extendedRows.cpp:52
paso::SystemMatrix::getRowOverlap
dim_t getRowOverlap() const
Definition: SystemMatrix.h:215
paso::SystemMatrix::copyToMainDiagonal
void copyToMainDiagonal(const double *in)
Definition: SystemMatrix.h:277
paso::SystemMatrix::getTotalNumCols
dim_t getTotalNumCols() const
Definition: SystemMatrix.h:210
paso::SystemMatrix::row_block_size
dim_t row_block_size
Definition: SystemMatrix.h:326
paso::SparseMatrix_ptr
boost::shared_ptr< SparseMatrix > SparseMatrix_ptr
Definition: SparseMatrix.h:46
paso::SystemMatrix::pattern
SystemMatrixPattern_ptr pattern
Definition: SystemMatrix.h:321
MPI_DOUBLE
#define MPI_DOUBLE
Definition: EsysMPI.h:45
paso::SystemMatrix::fillWithGlobalCoordinates
void fillWithGlobalCoordinates(double f1)
Definition: SystemMatrix_debug.cpp:54
paso::Preconditioner
Definition: Preconditioner.h:46
paso::SystemMatrix::getTotalNumRows
dim_t getTotalNumRows() const
Definition: SystemMatrix.h:205
paso::SystemMatrix::solvePreconditioner
void solvePreconditioner(double *x, double *b)
Definition: SystemMatrix.cpp:168
paso::PasoException
PasoException exception class.
Definition: PasoException.h:43
paso::SystemMatrix::getNumCols
dim_t getNumCols() const
Definition: SystemMatrix.h:200
paso::SystemMatrix::remote_coupleBlock
SparseMatrix_ptr remote_coupleBlock
coupling of rows-cols on neighbouring processors (may not be valid)
Definition: SystemMatrix.h:344
paso::SystemMatrix::startColCollect
void startColCollect(const double *in) const
Definition: SystemMatrix.h:175
paso::SystemMatrixType
int SystemMatrixType
Definition: SystemMatrix.h:55
paso::SystemMatrix::getNumOutput
dim_t getNumOutput() const
Definition: SystemMatrix.h:257
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
paso::SystemMatrix::logical_row_block_size
dim_t logical_row_block_size
Definition: SystemMatrix.h:323
paso::SystemMatrix::finishRowCollect
double * finishRowCollect()
Definition: SystemMatrix.h:190
escript
Definition: AbstractContinuousDomain.cpp:22
paso::SystemMatrix::solve
void solve(double *out, double *in, Options *options) const
Definition: solve.cpp:51
paso::SystemMatrix::mergeMainAndCouple
void mergeMainAndCouple(index_t **p_ptr, index_t **p_idx, double **p_val) const
Definition: SystemMatrix_mergeMainAndCouple.cpp:60
paso::SystemMatrix::getNumRows
dim_t getNumRows() const
Definition: SystemMatrix.h:195
paso::Preconditioner_alloc
Preconditioner * Preconditioner_alloc(SystemMatrix_ptr A, Options *options)
Definition: Preconditioner.cpp:59
Preconditioner.h
paso::SystemMatrix::setValues
void setValues(double value)
Definition: SystemMatrix.h:282
escript::AbstractSystemMatrix::getRowFunctionSpace
FunctionSpace getRowFunctionSpace() const
returns the row function space
Definition: AbstractSystemMatrix.h:113
PasoException.h
paso::Pattern_ptr
boost::shared_ptr< Pattern > Pattern_ptr
Definition: Pattern.h:48
paso::SystemMatrix::SystemMatrix
SystemMatrix()
default constructor - throws exception.
Definition: SystemMatrix.cpp:52
paso::SystemMatrix::finishColCollect
double * finishColCollect() const
Definition: SystemMatrix.h:180
paso::SystemMatrix::MatrixVector
void MatrixVector(double alpha, const double *in, double beta, double *out) const
Definition: SystemMatrix_MatrixVector.cpp:45
paso::SystemMatrix::makeZeroRowSums
void makeZeroRowSums(double *left_over)
Definition: SystemMatrix.cpp:212
paso::SystemMatrix::getSystemMatrixTypeId
static int getSystemMatrixTypeId(int solver, int preconditioner, int package, bool symmetry, const escript::JMPI &mpi_info)
Definition: SystemMatrix.cpp:543
paso::SystemMatrix::startRowCollect
void startRowCollect(const double *in)
Definition: SystemMatrix.h:185
paso::SystemMatrix::loadMM_toCSR
static SystemMatrix_ptr loadMM_toCSR(const char *filename)
Definition: SystemMatrix_loadMM.cpp:111
escript::Data::getExpandedVectorReference
DataTypes::RealVectorType & getExpandedVectorReference(DataTypes::real_t dummy=0)
Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive writ...
Definition: Data.cpp:5844
paso::SystemMatrix::block_size
dim_t block_size
Definition: SystemMatrix.h:328
paso
Definition: BiCGStab.cpp:25
paso::SystemMatrix::MatrixVector_CSR_OFFSET0
void MatrixVector_CSR_OFFSET0(double alpha, const double *in, double beta, double *out) const
Definition: SystemMatrix_MatrixVector.cpp:74
paso::Preconditioner_free
void Preconditioner_free(Preconditioner *in)
Definition: Preconditioner.cpp:48
escript::AbstractSystemMatrix::getRowBlockSize
int getRowBlockSize() const
returns the row block size
Definition: AbstractSystemMatrix.h:124
escript::Data::expand
void expand()
Whatever the current Data type make this into a DataExpanded.
Definition: Data.cpp:1183
escript::AbstractSystemMatrix::getColumnBlockSize
int getColumnBlockSize() const
returns the column block size
Definition: AbstractSystemMatrix.h:135
paso::SystemMatrix::setToSolution
virtual void setToSolution(escript::Data &out, escript::Data &in, boost::python::object &options) const
solves the linear system this*out=in
Definition: SystemMatrix.cpp:324
paso::Preconditioner_solve
void Preconditioner_solve(Preconditioner *prec, SystemMatrix_ptr A, double *x, double *b)
Definition: Preconditioner.cpp:124
paso::SparseMatrix
Definition: SparseMatrix.h:53
paso::Options
Definition: Options.h:76
MATRIX_FORMAT_DEFAULT
#define MATRIX_FORMAT_DEFAULT
Definition: Paso.h:60
MATRIX_FORMAT_DIAGONAL_BLOCK
#define MATRIX_FORMAT_DIAGONAL_BLOCK
Definition: Paso.h:64
paso::SystemMatrix::row_distribution
escript::Distribution_ptr row_distribution
Definition: SystemMatrix.h:330
paso::SystemMatrix::logical_col_block_size
dim_t logical_col_block_size
Definition: SystemMatrix.h:324
paso::SystemMatrix::saveMM
virtual void saveMM(const std::string &filename) const
writes the matrix to a file using the Matrix Market file format
Definition: SystemMatrix.h:79
paso::SystemMatrix::~SystemMatrix
~SystemMatrix()
Definition: SystemMatrix.cpp:153
paso::SystemMatrix::col_coupleBlock
SparseMatrix_ptr col_coupleBlock
coupling to neighbouring processors (row - col)
Definition: SystemMatrix.h:340