Go to the documentation of this file.
7 #ifndef INCLUDE_JET_FDM_LINEAR_SYSTEM2_H_
8 #define INCLUDE_JET_FDM_LINEAR_SYSTEM2_H_
152 #endif // INCLUDE_JET_FDM_LINEAR_SYSTEM2_H_
static double dot(const VectorType &a, const VectorType &b)
Performs dot product with vector a and b.
Compressed linear system (Ax=b) for 2-D finite differencing.
Definition: fdm_linear_system2.h:54
MatrixCsrD MatrixType
Definition: fdm_linear_system2.h:113
Linear system (Ax=b) for 2-D finite differencing.
Definition: fdm_linear_system2.h:36
static ScalarType l2Norm(const VectorType &v)
Returns L2-norm of the given vector v.
static void mvm(const MatrixType &m, const VectorType &v, VectorType *result)
Performs matrix-vector multiplication.
static ScalarType lInfNorm(const VectorType &v)
Returns Linf-norm of the given vector v.
void clear()
Clears all the data.
void clear()
Clears all the data.
FdmMatrix2 MatrixType
Definition: fdm_linear_system2.h:72
Array2< FdmMatrixRow2 > FdmMatrix2
Matrix type for 2-D finite differencing.
Definition: fdm_linear_system2.h:33
static void set(ScalarType s, MatrixType *result)
Sets entire element of given matrix result with scalar s.
VectorND b
RHS vector.
Definition: fdm_linear_system2.h:62
FdmVector2 x
Solution vector.
Definition: fdm_linear_system2.h:41
static ScalarType l2Norm(const VectorType &v)
Returns L2-norm of the given vector v.
double up
Off-diagonal element where column refers to (i, j+1) grid point.
Definition: fdm_linear_system2.h:26
2-D array class.
Definition: array2.h:42
static void axpy(double a, const VectorType &x, const VectorType &y, VectorType *result)
static void set(const VectorType &v, VectorType *result)
Copies entire element of given vector result with other vector v.
static void set(const MatrixType &m, MatrixType *result)
Copies entire element of given matrix result with other matrix v.
double center
Diagonal component of the matrix (row, row).
Definition: fdm_linear_system2.h:20
Definition: advection_solver2.h:18
BLAS operator wrapper for compressed 2-D finite differencing.
Definition: fdm_linear_system2.h:110
MatrixCsrD A
System matrix.
Definition: fdm_linear_system2.h:56
VectorND VectorType
Definition: fdm_linear_system2.h:112
static void mvm(const MatrixType &m, const VectorType &v, VectorType *result)
Performs matrix-vector multiplication.
The row of FdmMatrix2 where row corresponds to (i, j) grid point.
Definition: fdm_linear_system2.h:18
static void residual(const MatrixType &a, const VectorType &x, const VectorType &b, VectorType *result)
Computes residual vector (b - ax).
static ScalarType lInfNorm(const VectorType &v)
Returns Linf-norm of the given vector v.
VectorND x
Solution vector.
Definition: fdm_linear_system2.h:59
void resize(const Size2 &size)
Resizes the arrays with given grid size.
FdmVector2 b
RHS vector.
Definition: fdm_linear_system2.h:44
static void residual(const MatrixType &a, const VectorType &x, const VectorType &b, VectorType *result)
Computes residual vector (b - ax).
BLAS operator wrapper for 2-D finite differencing.
Definition: fdm_linear_system2.h:69
FdmMatrix2 A
System matrix.
Definition: fdm_linear_system2.h:38
static double dot(const VectorType &a, const VectorType &b)
Performs dot product with vector a and b.
2-D size class.
Definition: size2.h:19
static void set(ScalarType s, VectorType *result)
Sets entire element of given vector result with scalar s.
FdmVector2 VectorType
Definition: fdm_linear_system2.h:71
static void set(ScalarType s, VectorType *result)
Sets entire element of given vector result with scalar s.
double ScalarType
Definition: fdm_linear_system2.h:70
static void set(const MatrixType &m, MatrixType *result)
Copies entire element of given matrix result with other matrix v.
static void set(const VectorType &v, VectorType *result)
Copies entire element of given vector result with other vector v.
static void set(ScalarType s, MatrixType *result)
Sets entire element of given matrix result with scalar s.
double ScalarType
Definition: fdm_linear_system2.h:111
Array2< double > FdmVector2
Vector type for 2-D finite differencing.
Definition: fdm_linear_system2.h:30
double right
Off-diagonal element where colum refers to (i+1, j) grid point.
Definition: fdm_linear_system2.h:23
static void axpy(double a, const VectorType &x, const VectorType &y, VectorType *result)