FDMLinearSystem2.h
Go to the documentation of this file.
102 static void Residual(const MatrixType& a, const VectorType& x, const VectorType& b, VectorType* result);
140 static void Residual(const MatrixType& a, const VectorType& x, const VectorType& b, VectorType* result);
Linear system (Ax=b) for 2-D finite differencing.
Definition: FDMLinearSystem2.h:39
static double Dot(const VectorType &a, const VectorType &b)
Performs dot product with vector a and b.
BLAS operator wrapper for 2-D finite differencing.
Definition: FDMLinearSystem2.h:74
MatrixCSR< double > MatrixCSRD
Double-type CSR matrix.
Definition: MatrixCSR.h:475
Array2< double > FDMVector2
Vector type for 2-D finite differencing.
Definition: FDMLinearSystem2.h:33
static void Set(ScalarType s, VectorType *result)
Sets entire element of given vector result with scalar s.
double center
Diagonal component of the matrix (row, row).
Definition: FDMLinearSystem2.h:23
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.
void Resize(const Size2 &size)
Resizes the arrays with given grid size.
MatrixCSRD A
System matrix.
Definition: FDMLinearSystem2.h:61
Definition: pybind11Utils.h:24
static void Set(ScalarType s, VectorType *result)
Sets entire element of given vector result with scalar s.
static void AXPlusY(double a, const VectorType &x, const VectorType &y, VectorType *result)
Performs ax + y operation where a is a matrix and x and y are vectors.
The row of FDMMatrix2 where row corresponds to (i, j) grid point.
Definition: FDMLinearSystem2.h:20
static ScalarType LInfNorm(const VectorType &v)
Returns Linf-norm of the given vector v.
Compressed linear system (Ax=b) for 2-D finite differencing.
Definition: FDMLinearSystem2.h:58
static void Residual(const MatrixType &a, const VectorType &x, const VectorType &b, VectorType *result)
Computes residual vector (b - ax).
static void AXPlusY(double a, const VectorType &x, const VectorType &y, VectorType *result)
Performs ax + y operation where a is a matrix and x and y are vectors.
static double Dot(const VectorType &a, const VectorType &b)
Performs dot product with vector a and b.
static void Residual(const MatrixType &a, const VectorType &x, const VectorType &b, VectorType *result)
Computes residual vector (b - ax).
VectorND x
Solution vector.
Definition: FDMLinearSystem2.h:64
double right
Off-diagonal element where column refers to (i+1, j) grid point.
Definition: FDMLinearSystem2.h:26
double up
Off-diagonal element where column refers to (i, j+1) grid point.
Definition: FDMLinearSystem2.h:29
static void MVM(const MatrixType &m, const VectorType &v, VectorType *result)
Performs matrix-vector multiplication.
Array2< FDMMatrixRow2 > FDMMatrix2
Matrix type for 2-D finite differencing.
Definition: FDMLinearSystem2.h:36
BLAS operator wrapper for compressed 2-D finite differencing.
Definition: FDMLinearSystem2.h:112
static ScalarType L2Norm(const VectorType &v)
Returns L2-norm of the given vector v.
static ScalarType LInfNorm(const VectorType &v)
Returns Linf-norm of the given vector v.