To handle matrices in sparse storage format. More...


Public Member Functions | |
SpMatrix () | |
Default constructor. More... | |
SpMatrix (size_t nr, size_t nc) | |
Constructor that initializes current instance as a dense matrix. More... | |
SpMatrix (size_t size, int is_diagonal=false) | |
Constructor that initializes current instance as a dense matrix. More... | |
SpMatrix (class Mesh &mesh, size_t dof=0, int is_diagonal=false) | |
Constructor using a Mesh instance. More... | |
SpMatrix (const class vector< std::pair< size_t, size_t > > &I, int opt=1) | |
Constructor for a square matrix using non zero row and column indices. More... | |
SpMatrix (const class vector< std::pair< size_t, size_t > > &I, const class vector< T_ > &a, int opt=1) | |
Constructor for a square matrix using non zero row and column indices. More... | |
SpMatrix (size_t nr, size_t nc, const vector< size_t > &row_ptr, const vector< size_t > &col_ind) | |
Constructor for a rectangle matrix. More... | |
SpMatrix (size_t nr, size_t nc, const vector< size_t > &row_ptr, const vector< size_t > &col_ind, const vector< T_ > &a) | |
Constructor for a rectangle matrix. More... | |
SpMatrix (const vector< size_t > &row_ptr, const vector< size_t > &col_ind) | |
Constructor for a rectangle matrix. More... | |
SpMatrix (const vector< size_t > &row_ptr, const vector< size_t > &col_ind, const vector< T_ > &a) | |
Constructor for a rectangle matrix. More... | |
SpMatrix (const SpMatrix &m) | |
Copy constructor. | |
~SpMatrix (void) | |
Destructor. | |
void | setMesh (class Mesh &mesh, size_t dof=0) |
Determine mesh graph and initialize matrix. More... | |
void | setOneDOF () |
Activate 1-DOF per node option. | |
void | setSides () |
Activate Sides option. | |
void | setDiag () |
Store diagonal entries in a separate internal vector. | |
Vect< T_ > | getColumn (size_t j) const |
Get j -th column vector. | |
void | DiagPrescribe (class Mesh &mesh, Vect< T_ > &b, const Vect< T_ > &u) |
Impose by a diagonal method an essential boundary condition. More... | |
void | DiagPrescribe (Vect< T_ > &b, const class Vect< T_ > &u) |
Impose by a diagonal method an essential boundary condition using the Mesh instance provided by the constructor. More... | |
void | setSize (size_t size) |
Set size of matrix (case where it's a square matrix). More... | |
void | setSize (size_t nr, size_t nc) |
Set size (number of rows) of matrix. More... | |
void | setGraph (const vector< std::pair< size_t, size_t > > &I, int opt=1) |
Set graph of matrix by giving a vector of its nonzero entries. More... | |
Vect< T_ > | getRow (size_t i) const |
Get i -th row vector. | |
T_ & | operator() (size_t i, size_t j) |
Operator () (Non constant version) More... | |
T_ | operator() (size_t i, size_t j) const |
Operator () (Constant version) More... | |
const T_ | operator() (size_t i) const |
Operator () with one argument (Constant version) More... | |
const T_ | operator[] (size_t i) const |
Operator [] (Constant version). More... | |
void | getMesh (class Mesh &mesh) |
Get mesh instance whose reference will be stored in current instance of SpMatrix. | |
void | Mult (const Vect< T_ > &v, Vect< T_ > &w) const |
Multiply matrix by vector and save in another one. More... | |
void | MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and add to y . More... | |
void | MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add to y . More... | |
void | TMult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply transpose of matrix by vector x and save in y . More... | |
void | Axpy (T_ a, const SpMatrix< T_ > &m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | Axpy (T_ a, const Matrix< T_ > *m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | set (size_t i, size_t j, const T_ &val) |
Assign a value to an entry of the matrix. More... | |
void | add (size_t i, size_t j, const T_ &val) |
Add a value to an entry of the matrix. More... | |
void | operator= (const T_ &x) |
Operator =. More... | |
size_t | getColInd (size_t i) const |
Return storage information. More... | |
size_t | getRowPtr (size_t i) const |
Return Row pointer at position i . | |
int | Solve (class Vect< T_ > &b) |
Solve the linear system of equations. More... | |
int | Solve (const Vect< T_ > &b, Vect< T_ > &x) |
Solve the linear system of equations. More... | |
void | setSolver (Iteration solver=CG_SOLVER, Preconditioner prec=DIAG_PREC, int max_it=1000, real_t toler=1.e-8) |
Choose solver and preconditioner for an iterative procedure. More... | |
T_ * | get () const |
Return C-Array. More... | |
T_ | get (size_t i, size_t j) const |
Return entry (i,j) of matrix if this one is stored, 0 otherwise. More... | |
size_t | getNbRows () const |
Return number of rows. | |
size_t | getNbColumns () const |
Return number of columns. | |
void | setPenal (real_t p) |
Set Penalty Parameter (For boundary condition prescription). | |
void | setDiagonal () |
Set the matrix as diagonal. | |
void | setDiagonal (const class Mesh &mesh) |
Initialize matrix storage in the case where only diagonal terms are stored. More... | |
T_ | getDiag (size_t k) const |
Return k -th diagonal entry of matrix. More... | |
size_t | size () const |
Return matrix dimension (Number of rows and columns). | |
void | Assembly (const class Element *el, T_ *a) |
Assembly of element matrix into global matrix. More... | |
void | Assembly (const class Element *el, const DMatrix< T_ > &a) |
Assembly of element matrix into global matrix. More... | |
void | Assembly (const class Side *sd, T_ *a) |
Assembly of side matrix into global matrix. More... | |
void | Assembly (const class Side *sd, const DMatrix< T_ > &a) |
Assembly of side matrix into global matrix. More... | |
void | Prescribe (const class Mesh &mesh, Vect< T_ > &b, const Vect< T_ > &u, int flag=0) |
Impose by a penalty method an essential boundary condition. More... | |
void | Prescribe (int dof, int code, const class Mesh &mesh, Vect< T_ > &b, const Vect< T_ > &u, int flag=0) |
Impose by a penalty method an essential boundary condition to a given degree of freedom for a given code. More... | |
void | Prescribe (Vect< T_ > &b, const Vect< T_ > &u, int flag=0) |
Impose by a penalty method an essential boundary condition, using the Mesh instance provided by the constructor. More... | |
void | Prescribe (const class Mesh &mesh, Vect< T_ > &b, int flag=0) |
Impose by a penalty method a homegeneous (=0) essential boundary condition. More... | |
void | Prescribe (Vect< T_ > &b, int flag=0) |
Impose by a penalty method a homegeneous (=0 ) essential boundary condition, using the Mesh instance provided by the constructor. More... | |
void | Prescribe (size_t dof, const class Mesh &mesh, Vect< T_ > &b, const Vect< T_ > &u, int flag=0) |
Impose by a penalty method an essential boundary condition when only one DOF is treated. More... | |
void | Prescribe (size_t dof, Vect< T_ > &b, const Vect< T_ > &u, int flag=0) |
Impose by a penalty method an essential boundary condition when only one DOF is treated. More... | |
void | PrescribeSide (const class Mesh &mesh) |
Impose by a penalty method an essential boundary condition when DOFs are supported by sides. More... | |
void | PrescribeSide () |
Impose by a penalty method an essential boundary condition when DOFs are supported by sides. More... | |
virtual int | Factor ()=0 |
Factorize matrix. Available only if the storage class enables it. | |
int | FactorAndSolve (Vect< T_ > &b) |
Factorize matrix and solve the linear system. More... | |
int | FactorAndSolve (const Vect< T_ > &b, Vect< T_ > &x) |
Factorize matrix and solve the linear system. More... | |
unsigned long | getLength () const |
Return number of stored terms in matrix. | |
int | isDiagonal () const |
Say if matrix is diagonal or not. | |
int | isFactorized () const |
Say if matrix is factorized or not. More... | |
T_ & | operator() (size_t i) |
Operator () with one argument (Non Constant version). More... | |
T_ & | operator[] (size_t k) |
Operator [] (Non constant version). More... | |
Matrix & | operator+= (const Matrix< T_ > &m) |
Operator +=. More... | |
Matrix & | operator+= (const T_ &x) |
Operator +=. More... | |
Matrix & | operator-= (const Matrix< T_ > &m) |
Operator -=. More... | |
Matrix & | operator-= (const T_ &x) |
Operator -=. More... | |
Matrix & | operator*= (const T_ &x) |
Operator *=. More... | |
void | setPrintView (size_t rmin, size_t rmax, size_t cmin, size_t cmax) |
Set a window for matrix printing. More... | |
void | getPrintView (size_t &rmin, size_t &rmax, size_t &cmin, size_t &cmax) const |
Return window data for matrix printing. More... | |
Detailed Description
template<class T_>
class OFELI::SpMatrix< T_ >
To handle matrices in sparse storage format.
This template class enables to store and manipulate a sparse matrix, i.e. only nonzero terms are stored. Internally, the matrix is stored as a vector instance and uses for the definition of its graph a Vect<size_t>
instance row_ptr and a Vect<size_t> instance col_ind
that contains respectively addresses of first element of each row and column indices.
To illustrate this, consider the matrix
1 2 0 3 4 0 0 5 0
Such a matrix is stored in the vector<real_t> instance {1,2,3,4,5}. The vectors row_ptr
and col_ind
are respectively: {1,3,5,6}
, {1,2,1,2,2}
- Template Parameters
-
<T_> Data type (real_t, float, complex<real_t>, ...)
Constructor & Destructor Documentation
SpMatrix | ( | ) |
Default constructor.
Initialize a zero-dimension matrix
SpMatrix | ( | size_t | nr, |
size_t | nc | ||
) |
Constructor that initializes current instance as a dense matrix.
Normally, for a dense matrix this is not the right class.
- Parameters
-
[in] nr Number of matrix rows. [in] nc Number of matrix columns.
SpMatrix | ( | size_t | size, |
int | is_diagonal = false |
||
) |
Constructor that initializes current instance as a dense matrix.
Normally, for a dense matrix this is not the right class.
- Parameters
-
[in] size Number of matrix rows (and columns). [in] is_diagonal Boolean argument to say is the matrix is actually a diagonal matrix or not.
Constructor using a Mesh instance.
- Parameters
-
[in] mesh Mesh instance from which matrix graph is extracted. [in] dof Option parameter, with default value 0
.
dof=1
means that only one degree of freedom for each node (or element or side) is taken to determine matrix structure. The valuedof=0
means that matrix structure is determined using all DOFs.[in] is_diagonal Boolean argument to say is the matrix is actually a diagonal matrix or not.
SpMatrix | ( | const class vector< std::pair< size_t, size_t > > & | I, |
int | opt = 1 |
||
) |
Constructor for a square matrix using non zero row and column indices.
- Parameters
-
[in] I Vector containing pairs of row and column indices [in] opt Flag indicating if vectors I is cleaned and ordered (opt=1) or not (opt=0). In the latter case, this vector can have the same contents more than once and are not necessarily ordered
SpMatrix | ( | const class vector< std::pair< size_t, size_t > > & | I, |
const class vector< T_ > & | a, | ||
int | opt = 1 |
||
) |
Constructor for a square matrix using non zero row and column indices.
- Parameters
-
[in] I Vector containing pairs of row and column indices [in] a Vector containing matrix entries in the same order than the one given by I
[in] opt Flag indicating if vector I
is cleaned and ordered (opt=1
: default) or not (opt=0
). In the latter case, this vector can have the same contents more than once and are not necessarily ordered
SpMatrix | ( | size_t | nr, |
size_t | nc, | ||
const vector< size_t > & | row_ptr, | ||
const vector< size_t > & | col_ind | ||
) |
Constructor for a rectangle matrix.
- Parameters
-
[in] nr Number of rows [in] nc Number of columns [in] row_ptr Vector of row pointers (See the above description of this class). [in] col_ind Vector of column indices (See the above description of this class).
SpMatrix | ( | size_t | nr, |
size_t | nc, | ||
const vector< size_t > & | row_ptr, | ||
const vector< size_t > & | col_ind, | ||
const vector< T_ > & | a | ||
) |
Constructor for a rectangle matrix.
- Parameters
-
[in] nr Number of rows [in] nc Number of columns [in] row_ptr Vector of row pointers (See the above description of this class). [in] col_ind Vector of column indices (See the above description of this class).
[in] a vector instance containing matrix entries stored columnwise
SpMatrix | ( | const vector< size_t > & | row_ptr, |
const vector< size_t > & | col_ind | ||
) |
Constructor for a rectangle matrix.
- Parameters
-
[in] row_ptr Vector of row pointers (See the above description of this class). [in] col_ind Vector of column indices (See the above description of this class).
SpMatrix | ( | const vector< size_t > & | row_ptr, |
const vector< size_t > & | col_ind, | ||
const vector< T_ > & | a | ||
) |
Constructor for a rectangle matrix.
- Parameters
-
[in] row_ptr Vector of row pointers (See the above description of this class). [in] col_ind Vector of column indices (See the above description of this class). [in] a vector instance that contain matrix entries stored row by row.
Number of rows is extracted from vectorrow_ptr
.
Member Function Documentation
void setMesh | ( | class Mesh & | mesh, |
size_t | dof = 0 |
||
) |
Determine mesh graph and initialize matrix.
This member function is called by constructor with the same arguments
- Parameters
-
[in] mesh Mesh instance for which matrix graph is determined. [in] dof Option parameter, with default value 0
.
dof=1
means that only one degree of freedom for each node (or element or side) is taken to determine matrix structure. The valuedof=0
means that matrix structure is determined using all DOFs.
Impose by a diagonal method an essential boundary condition.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
Impose by a diagonal method an essential boundary condition using the Mesh instance provided by the constructor.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
void setSize | ( | size_t | size | ) |
Set size of matrix (case where it's a square matrix).
- Parameters
-
[in] size Number of rows and columns.
void setSize | ( | size_t | nr, |
size_t | nc | ||
) |
Set size (number of rows) of matrix.
- Parameters
-
[in] nr Number of rows [in] nc Number of columns
void setGraph | ( | const vector< std::pair< size_t, size_t > > & | I, |
int | opt = 1 |
||
) |
Set graph of matrix by giving a vector of its nonzero entries.
- Parameters
-
[in] I Vector containing pairs of row and column indices [in] opt Flag indicating if vector I
is cleaned and ordered (opt=1
: default) or not (opt=0
). In the latter case, this vector can have the same contents more than once and are not necessarily ordered
|
virtual |
Operator () (Non constant version)
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
virtual |
const T_ operator() | ( | size_t | i | ) | const |
Operator ()
with one argument (Constant version)
Returns i
-th position in the array storing matrix entries. The first entry is at location 1
. Entries are stored row by row.
const T_ operator[] | ( | size_t | i | ) | const |
Operator []
(Constant version).
Returns i
-th position in the array storing matrix entries. The first entry is at location 0
. Entries are stored row by row.
Multiply matrix by vector and save in another one.
- Parameters
-
[in] v Vector to multiply by matrix [out] w Vector that contains on output the result.
Implements Matrix< T_ >.
Multiply matrix by vector x
and add to y
.
- Parameters
-
[in] x Vector to multiply by matrix [out] y Vector to add to the result. y
contains on output the result.
Implements Matrix< T_ >.
Multiply matrix by vector a*x
and add to y
.
- Parameters
-
[in] a Constant to multiply by matrix [in] x Vector to multiply by matrix [out] y Vector to add to the result. y
contains on output the result.
Implements Matrix< T_ >.
Multiply transpose of matrix by vector x
and save in y
.
- Parameters
-
[in] x Vector to multiply by matrix [out] y Vector that contains on output the result.
Implements Matrix< T_ >.
void Axpy | ( | T_ | a, |
const SpMatrix< T_ > & | m | ||
) |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
|
virtual |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Pointer to Matrix by which a
is multiplied. The result is added to current instance
Implements Matrix< T_ >.
|
virtual |
Assign a value to an entry of the matrix.
- Parameters
-
[in] i Row index [in] j Column index [in] val Value to assign to a(i,j)
Implements Matrix< T_ >.
|
virtual |
Add a value to an entry of the matrix.
- Parameters
-
[in] i Row index [in] j Column index [in] val Constant value to add to a(i,j)
Implements Matrix< T_ >.
void operator= | ( | const T_ & | x | ) |
Operator =.
Assign constant value x
to all matrix entries.
|
virtual |
Return storage information.
- Returns
- Column index of the
i
-th stored element in matrix
Reimplemented from Matrix< T_ >.
|
virtual |
Solve the linear system of equations.
The default parameters are:
-
CG_SOLVER
for solver -
DIAG_PREC
for preconditioner - Max. Number of iterations is 1000
- Tolerance is 1.e-8
To change these values, call function setSolver before this function
- Parameters
-
[in,out] b Vector that contains right-hand side on input and solution on output
- Returns
- Number of actual performed iterations
Implements Matrix< T_ >.
Solve the linear system of equations.
The default parameters are:
-
CG_SOLVER
for solver -
DIAG_PREC
for preconditioner -
Max. Number of iterations is
1000
-
Tolerance is
1.e-8
To change these values, call function setSolver before this function
- Parameters
-
[in] b Vector that contains right-hand side [out] x Vector that contains the obtained solution
- Returns
- Number of actual performed iterations
void setSolver | ( | Iteration | solver = CG_SOLVER , |
Preconditioner | prec = DIAG_PREC , |
||
int | max_it = 1000 , |
||
real_t | toler = 1.e-8 |
||
) |
Choose solver and preconditioner for an iterative procedure.
- Parameters
-
[in] solver Option to choose iterative solver in an enumerated variable -
CG_SOLVER
: Conjugate Gradient [default] -
CGS_SOLVER
: Squared conjugate gradient -
BICG_SOLVER
: Biconjugate gradient -
BICG_STAB_SOLVER
: Biconjugate gradient stabilized -
GMRES_SOLVER
: Generalized Minimal Residual -
QMR_SOLVER
: Quasi-Minimal Residual
CG_SOLVER
[in] prec Option to choose preconditioner in an enumerated variable -
IDENT_PREC
: Identity preconditioner (no preconditioning) -
DIAG_PREC
: Diagonal preconditioner [default] -
ILU_PREC
: ILU (Incomplete factorization) preconditioner
DIAG_PREC
[in] max_it Maximum number of allowed iterations. Default value is 1000
.[in] toler Tolerance for convergence. Default value is 1.e-8
-
T_* get | ( | ) | const |
Return C-Array.
Non zero terms of matrix is stored row by row.
|
virtual |
Return entry (i,j)
of matrix if this one is stored, 0
otherwise.
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
inherited |
Initialize matrix storage in the case where only diagonal terms are stored.
This member function is to be used for explicit time integration schemes
|
inherited |
Return k
-th diagonal entry of matrix.
First entry is given by getDiag(1).
|
inherited |
Assembly of element matrix into global matrix.
Case where element matrix is given by a C-array.
- Parameters
-
[in] el Pointer to element instance [in] a Element matrix as a C-array
|
inherited |
Assembly of side matrix into global matrix.
Case where side matrix is given by a C-array.
- Parameters
-
[in] sd Pointer to side instance [in] a Side matrix as a C-array instance
|
inherited |
Impose by a penalty method an essential boundary condition.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
- Parameters
-
[in] mesh Mesh instance from which information is extracted. [in,out] b Vect instance that contains right-hand side. [in] u Vect instance that contains imposed valued at DOFs where they are to be imposed. [in] flag Parameter to determine whether only the right-hand side is to be modified
(dof>0
) or both matrix and right-hand side (dof=0
, default value).
|
inherited |
Impose by a penalty method an essential boundary condition to a given degree of freedom for a given code.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
- Parameters
-
[in] dof Degree of freedom for which a boundary condition is to be enforced [in] code Code for which a boundary condition is to be enforced [in] mesh Mesh instance from which information is extracted. [in,out] b Vect instance that contains right-hand side. [in] u Vect instance that contains imposed valued at DOFs where they are to be imposed. [in] flag Parameter to determine whether only the right-hand side is to be modified
(dof>0
) or both matrix and right-hand side (dof=0
, default value).
Impose by a penalty method an essential boundary condition, using the Mesh instance provided by the constructor.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
Impose by a penalty method a homegeneous (=0) essential boundary condition.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
|
inherited |
Impose by a penalty method a homegeneous (=0
) essential boundary condition, using the Mesh instance provided by the constructor.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
- Parameters
-
[in,out] b Vect instance that contains right-hand side. [in] flag Parameter to determine whether only the right-hand side is to be modified ( dof>0
)
or both matrix and right-hand side (dof=0
, default value).
|
inherited |
Impose by a penalty method an essential boundary condition when only one DOF is treated.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. This gunction is to be used if only one DOF per node is treated in the linear system. The penalty parameter is by default equal to 1.e20. It can be modified by member function setPenal.
- Parameters
-
[in] dof Label of the concerned degree of freedom (DOF). [in] mesh Mesh instance from which information is extracted. [in,out] b Vect instance that contains right-hand side. [in] u Vect instance that conatins imposed valued at DOFs where they are to be imposed. [in] flag Parameter to determine whether only the right-hand side is to be modified ( dof>0
)
or both matrix and right-hand side (dof=0
, default value).
Impose by a penalty method an essential boundary condition when only one DOF is treated.
This member function uses the Mesh instance provided by the constructor.
It modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. This gunction is to be used if only one DOF per node is treated in the linear system. The penalty parameter is by default equal to 1.e20. It can be modified by member function setPenal.
- Parameters
-
[in] dof Label of the concerned degree of freedom (DOF). [in,out] b Vect instance that contains right-hand side. [in] u Vect instance that conatins imposed valued at DOFs where they are to be imposed. [in] flag Parameter to determine whether only the right-hand side is to be modified ( dof>0
)
or both matrix and right-hand side (dof=0
, default value).
|
inherited |
Impose by a penalty method an essential boundary condition when DOFs are supported by sides.
This member function uses the Mesh instance provided by the constructor
It modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
|
inherited |
Impose by a penalty method an essential boundary condition when DOFs are supported by sides.
This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).
|
inherited |
Factorize matrix and solve the linear system.
This is available only if the storage class enables it.
- Parameters
-
[in,out] b Vect instance that contains right-hand side on input and solution on output
|
inherited |
Say if matrix is factorized or not.
If the matrix was not factorized, the class does not allow solving by a direct solver.
|
inherited |
Operator () with one argument (Non Constant version).
Returns i
-th position in the array storing matrix entries. The first entry is at location 1. Entries are stored row by row.
- Parameters
-
[in] i entry index
|
inherited |
Operator [] (Non constant version).
Returns k
-th stored element in matrix Index k
starts at 0
.
Operator +=.
Add matrix m
to current matrix instance.
|
inherited |
Operator +=.
Add constant value x
to all matrix entries.
Operator -=.
Subtract matrix m
from current matrix instance.
|
inherited |
Operator -=.
Subtract constant value x
from all matrix entries.
|
inherited |
Operator *=.
Premultiply matrix entries by constant value x
|
inherited |
Set a window for matrix printing.
- Parameters
-
[in] rmin first row index to view [in] rmax last row index to view [in] cmin first column index to view [in] cmax last column index to view
|
inherited |
Return window data for matrix printing.
- Parameters
-
[out] rmin first row index to view [out] rmax last row index to view [out] cmin first column index to view [out] cmax last column index to view