|
SU2
|
Main class for defining sparse matrices-by-blocks with compressed row format. More...
#include <matrix_structure.hpp>
Public Member Functions | |
| CSysMatrix (void) | |
| Constructor of the class. | |
| ~CSysMatrix (void) | |
| Destructor of the class. | |
| void | Initialize (unsigned long nPoint, unsigned long nPointDomain, unsigned short nVar, unsigned short nEqn, bool EdgeConnect, CGeometry *geometry, CConfig *config) |
| Initializes space matrix system. More... | |
| void | SetIndexes (unsigned long val_nPoint, unsigned long val_nPointDomain, unsigned short val_nVar, unsigned short val_nEq, unsigned long *val_row_ptr, unsigned long *val_col_ind, unsigned long val_nnz, CConfig *config) |
| Assigns values to the sparse-matrix structure. More... | |
| void | SetValZero (void) |
| Sets to zero all the entries of the sparse matrix. | |
| su2double * | GetBlock (unsigned long block_i, unsigned long block_j) |
| Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block. More... | |
| su2double | GetBlock (unsigned long block_i, unsigned long block_j, unsigned short iVar, unsigned short jVar) |
| Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block. More... | |
| void | SetBlock (unsigned long block_i, unsigned long block_j, su2double **val_block) |
| Set the value of a block in the sparse matrix. More... | |
| void | SetBlock (unsigned long block_i, unsigned long block_j, su2double *val_block) |
| Set the value of a block in the sparse matrix. More... | |
| void | AddBlock (unsigned long block_i, unsigned long block_j, su2double **val_block) |
| Adds the specified block to the sparse matrix. More... | |
| void | SubtractBlock (unsigned long block_i, unsigned long block_j, su2double **val_block) |
| Subtracts the specified block to the sparse matrix. More... | |
| su2double * | GetBlock_ILUMatrix (unsigned long block_i, unsigned long block_j) |
| Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block. More... | |
| void | SetBlock_ILUMatrix (unsigned long block_i, unsigned long block_j, su2double *val_block) |
| Set the value of a block in the sparse matrix. More... | |
| void | SetBlockTransposed_ILUMatrix (unsigned long block_i, unsigned long block_j, su2double *val_block) |
| Set the transposed value of a block in the sparse matrix. More... | |
| void | SubtractBlock_ILUMatrix (unsigned long block_i, unsigned long block_j, su2double *val_block) |
| Subtracts the specified block to the sparse matrix. More... | |
| void | AddVal2Diag (unsigned long block_i, su2double val_matrix) |
| Adds the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure. More... | |
| void | SetVal2Diag (unsigned long block_i, su2double val_matrix) |
| Sets the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure. More... | |
| void | MatrixVectorProduct (su2double *matrix, su2double *vector, su2double *product) |
| Calculates the matrix-vector product. More... | |
| void | MatrixMatrixProduct (su2double *matrix_a, su2double *matrix_b, su2double *product) |
| Calculates the matrix-matrix product. More... | |
| void | DeleteValsRowi (unsigned long i) |
| Deletes the values of the row i of the sparse matrix. More... | |
| su2double | MatrixDeterminant (su2double **a, unsigned long n) |
| Recursive definition of determinate using expansion by minors. Written by Paul Bourke. More... | |
| void | MatrixCoFactor (su2double **a, unsigned long n, su2double **b) |
| Find the cofactor matrix of a square matrix. Written by Paul Bourke. More... | |
| void | MatrixTranspose (su2double **a, unsigned long n) |
| Transpose of a square matrix, do it in place. Written by Paul Bourke. More... | |
| void | Gauss_Elimination (unsigned long block_i, su2double *rhs, bool transposed=false) |
| Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs. More... | |
| void | Gauss_Elimination (su2double *Block, su2double *rhs) |
| Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs. More... | |
| void | Gauss_Elimination_ILUMatrix (unsigned long block_i, su2double *rhs) |
| Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs. More... | |
| void | ProdBlockVector (unsigned long block_i, unsigned long block_j, const CSysVector &vec) |
| Performs the product of the block (i, j) by vector vec. More... | |
| void | UpperProduct (CSysVector &vec, unsigned long row_i) |
| Performs the product of i-th row of the upper part of a sparse matrix by a vector. More... | |
| void | LowerProduct (CSysVector &vec, unsigned long row_i) |
| Performs the product of i-th row of the lower part of a sparse matrix by a vector. More... | |
| void | DiagonalProduct (CSysVector &vec, unsigned long row_i) |
| Performs the product of i-th row of the diagonal part of a sparse matrix by a vector. More... | |
| void | SendReceive_Solution (CSysVector &x, CGeometry *geometry, CConfig *config) |
| Send receive the solution using MPI. More... | |
| void | SendReceive_SolutionTransposed (CSysVector &x, CGeometry *geometry, CConfig *config) |
| Send receive the solution using MPI and the transposed structure of the matrix. More... | |
| void | RowProduct (const CSysVector &vec, unsigned long row_i) |
| Performs the product of i-th row of a sparse matrix by a vector. More... | |
| void | MatrixVectorProduct (const CSysVector &vec, CSysVector &prod) |
| Performs the product of a sparse matrix by a vector. More... | |
| void | MatrixVectorProduct (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Performs the product of a sparse matrix by a CSysVector. More... | |
| void | MatrixVectorProductTransposed (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Performs the product of a sparse matrix by a CSysVector. More... | |
| void | GetMultBlockBlock (su2double *c, su2double *a, su2double *b) |
| Performs the product of two block matrices. | |
| void | GetMultBlockVector (su2double *c, su2double *a, su2double *b) |
| Performs the product of a block matrices by a vector. | |
| void | GetSubsBlock (su2double *c, su2double *a, su2double *b) |
| Performs the subtraction of two matrices. | |
| void | GetSubsVector (su2double *c, su2double *a, su2double *b) |
| Performs the subtraction of two vectors. | |
| void | InverseDiagonalBlock (unsigned long block_i, su2double *invBlock, bool transpose=false) |
| Inverse diagonal block. More... | |
| void | InverseDiagonalBlock_ILUMatrix (unsigned long block_i, su2double *invBlock) |
| Inverse diagonal block. More... | |
| void | InverseBlock (su2double *Block, su2double *invBlock) |
| Inverse a block. More... | |
| void | BuildJacobiPreconditioner (bool transpose=false) |
| Build the Jacobi preconditioner. | |
| void | ComputeJacobiPreconditioner (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Multiply CSysVector by the preconditioner. More... | |
| unsigned long | Jacobi_Smoother (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, su2double tol, unsigned long m, su2double *residual, bool monitoring, CGeometry *geometry, CConfig *config) |
| Apply Jacobi as a classical iterative smoother. More... | |
| void | BuildILUPreconditioner (bool transposed=false) |
| Build the ILU0 preconditioner. More... | |
| void | ComputeILUPreconditioner (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Multiply CSysVector by the preconditioner. More... | |
| unsigned long | ILU0_Smoother (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, su2double tol, unsigned long m, su2double *residual, bool monitoring, CGeometry *geometry, CConfig *config) |
| Apply ILU0 as a classical iterative smoother. More... | |
| void | ComputeLU_SGSPreconditioner (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Multiply CSysVector by the preconditioner. More... | |
| unsigned long | LU_SGS_Smoother (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, su2double tol, unsigned long m, su2double *residual, bool monitoring, CGeometry *geometry, CConfig *config) |
| Apply LU_SGS as a classical iterative smoother. More... | |
| unsigned short | BuildLineletPreconditioner (CGeometry *geometry, CConfig *config) |
| Build the Linelet preconditioner. More... | |
| void | ComputeLineletPreconditioner (const CSysVector &vec, CSysVector &prod, CGeometry *geometry, CConfig *config) |
| Multiply CSysVector by the preconditioner. More... | |
| void | ComputeResidual (const CSysVector &sol, const CSysVector &f, CSysVector &res) |
| Compute the residual Ax-b. More... | |
Main class for defining sparse matrices-by-blocks with compressed row format.
| void CSysMatrix::AddBlock | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double ** | val_block | ||
| ) |
Adds the specified block to the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to add to A(i, j). |
| void CSysMatrix::AddVal2Diag | ( | unsigned long | block_i, |
| su2double | val_matrix | ||
| ) |
Adds the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
| [in] | block_i | - Index of the block in the matrix-by-blocks structure. |
| [in] | val_matrix | - Value to add to the diagonal elements of A(i, i). |
| void CSysMatrix::BuildILUPreconditioner | ( | bool | transposed = false | ) |
Build the ILU0 preconditioner.
| [in] | transposed | - Flag to use the transposed matrix to construct the preconditioner. |
Build the Linelet preconditioner.
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::ComputeILUPreconditioner | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Multiply CSysVector by the preconditioner.
| [in] | vec | - CSysVector to be multiplied by the preconditioner. |
| [out] | prod | - Result of the product A*vec. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::ComputeJacobiPreconditioner | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Multiply CSysVector by the preconditioner.
| [in] | vec | - CSysVector to be multiplied by the preconditioner. |
| [out] | prod | - Result of the product A*vec. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::ComputeLineletPreconditioner | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Multiply CSysVector by the preconditioner.
| [in] | vec | - CSysVector to be multiplied by the preconditioner. |
| [out] | prod | - Result of the product A*vec. |
| void CSysMatrix::ComputeLU_SGSPreconditioner | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Multiply CSysVector by the preconditioner.
| [in] | vec | - CSysVector to be multiplied by the preconditioner. |
| [out] | prod | - Result of the product A*vec. |
| void CSysMatrix::ComputeResidual | ( | const CSysVector & | sol, |
| const CSysVector & | f, | ||
| CSysVector & | res | ||
| ) |
Compute the residual Ax-b.
| [in] | sol | - CSysVector to be multiplied by the preconditioner. |
| [in] | f | - Result of the product A*vec. |
| [out] | res | - Result of the product A*vec. |
| void CSysMatrix::DeleteValsRowi | ( | unsigned long | i | ) |
Deletes the values of the row i of the sparse matrix.
| [in] | i | - Index of the row. |
| void CSysMatrix::DiagonalProduct | ( | CSysVector & | vec, |
| unsigned long | row_i | ||
| ) |
Performs the product of i-th row of the diagonal part of a sparse matrix by a vector.
| [in] | vec | - Vector to be multiplied by the diagonal part of the sparse matrix A. |
| [in] | row_i | - Row of the matrix to be multiplied by vector vec. |
| void CSysMatrix::Gauss_Elimination | ( | unsigned long | block_i, |
| su2double * | rhs, | ||
| bool | transposed = false |
||
| ) |
Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs.
| [in] | block_i | - Index of the (i, i) subblock in the matrix-by-blocks structure. |
| [in] | rhs | - Right-hand-side of the linear system. |
| [in] | transposed | - If true the transposed of the block is used (default = false). |
| void CSysMatrix::Gauss_Elimination | ( | su2double * | Block, |
| su2double * | rhs | ||
| ) |
Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs.
| [in] | Block | - matrix-by-blocks structure. |
| [in] | rhs | - Right-hand-side of the linear system. |
| void CSysMatrix::Gauss_Elimination_ILUMatrix | ( | unsigned long | block_i, |
| su2double * | rhs | ||
| ) |
Performs the Gauss Elimination algorithm to solve the linear subsystem of the (i, i) subblock and rhs.
| [in] | block_i | - Index of the (i, i) subblock in the matrix-by-blocks structure. |
| [in] | rhs | - Right-hand-side of the linear system. |
| su2double * CSysMatrix::GetBlock | ( | unsigned long | block_i, |
| unsigned long | block_j | ||
| ) |
Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| su2double CSysMatrix::GetBlock | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| unsigned short | iVar, | ||
| unsigned short | jVar | ||
| ) |
Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| su2double * CSysMatrix::GetBlock_ILUMatrix | ( | unsigned long | block_i, |
| unsigned long | block_j | ||
| ) |
Copies the block (i, j) of the matrix-by-blocks structure in the internal variable *block.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| unsigned long CSysMatrix::ILU0_Smoother | ( | const CSysVector & | b, |
| CSysVector & | x, | ||
| CMatrixVectorProduct & | mat_vec, | ||
| su2double | tol, | ||
| unsigned long | m, | ||
| su2double * | residual, | ||
| bool | monitoring, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Apply ILU0 as a classical iterative smoother.
| [in] | b | - CSysVector containing the residual (b) |
| [in] | x | - CSysVector containing the solution (x^k) |
| [in] | mat_vec | - object that defines matrix-vector product |
| [in] | tol | - tolerance with which to solve the system |
| [in] | m | - maximum size of the search subspace |
| [in] | residual | |
| [in] | monitoring | - turn on priting residuals from solver to screen. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| [out] | x | - CSysVector containing the result of the smoothing (x^k+1 = x^k + M^-1*(b - A*x^k). |
| void CSysMatrix::Initialize | ( | unsigned long | nPoint, |
| unsigned long | nPointDomain, | ||
| unsigned short | nVar, | ||
| unsigned short | nEqn, | ||
| bool | EdgeConnect, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Initializes space matrix system.
| [in] | nVar | - Number of variables. |
| [in] | nEqn | - Number of equations. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::InverseBlock | ( | su2double * | Block, |
| su2double * | invBlock | ||
| ) |
Inverse a block.
| [in] | Block | - block matrix. |
| [out] | invBlock | - Inverse block. |
| void CSysMatrix::InverseDiagonalBlock | ( | unsigned long | block_i, |
| su2double * | invBlock, | ||
| bool | transpose = false |
||
| ) |
Inverse diagonal block.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [out] | invBlock | - Inverse block. |
| void CSysMatrix::InverseDiagonalBlock_ILUMatrix | ( | unsigned long | block_i, |
| su2double * | invBlock | ||
| ) |
Inverse diagonal block.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [out] | invBlock | - Inverse block. |
| unsigned long CSysMatrix::Jacobi_Smoother | ( | const CSysVector & | b, |
| CSysVector & | x, | ||
| CMatrixVectorProduct & | mat_vec, | ||
| su2double | tol, | ||
| unsigned long | m, | ||
| su2double * | residual, | ||
| bool | monitoring, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Apply Jacobi as a classical iterative smoother.
| [in] | b | - CSysVector containing the residual (b) |
| [in] | x | - CSysVector containing the solution (x^k) |
| [in] | mat_vec | - object that defines matrix-vector product |
| [in] | tol | - tolerance with which to solve the system |
| [in] | m | - maximum size of the search subspace |
| [in] | residual | |
| [in] | monitoring | - turn on priting residuals from solver to screen. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| [out] | x | - CSysVector containing the result of the smoothing (x^k+1 = x^k + M^-1*(b - A*x^k). |
| void CSysMatrix::LowerProduct | ( | CSysVector & | vec, |
| unsigned long | row_i | ||
| ) |
Performs the product of i-th row of the lower part of a sparse matrix by a vector.
| [in] | vec | - Vector to be multiplied by the lower part of the sparse matrix A. |
| [in] | row_i | - Row of the matrix to be multiplied by vector vec. |
| unsigned long CSysMatrix::LU_SGS_Smoother | ( | const CSysVector & | b, |
| CSysVector & | x, | ||
| CMatrixVectorProduct & | mat_vec, | ||
| su2double | tol, | ||
| unsigned long | m, | ||
| su2double * | residual, | ||
| bool | monitoring, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Apply LU_SGS as a classical iterative smoother.
| [in] | b | - CSysVector containing the residual (b) |
| [in] | x | - CSysVector containing the solution (x^k) |
| [in] | mat_vec | - object that defines matrix-vector product |
| [in] | tol | - tolerance with which to solve the system |
| [in] | m | - maximum size of the search subspace |
| [in] | residual | |
| [in] | monitoring | - turn on priting residuals from solver to screen. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| [out] | x | - CSysVector containing the result of the smoothing (x^k+1 = x^k + M^-1*(b - A*x^k). |
| void CSysMatrix::MatrixCoFactor | ( | su2double ** | a, |
| unsigned long | n, | ||
| su2double ** | b | ||
| ) |
Find the cofactor matrix of a square matrix. Written by Paul Bourke.
| [in] | a | - Matrix to compute the determinant. |
| [in] | n | - Size of the quare matrix. |
| [out] | b | - cofactor matrix |
| su2double CSysMatrix::MatrixDeterminant | ( | su2double ** | a, |
| unsigned long | n | ||
| ) |
Recursive definition of determinate using expansion by minors. Written by Paul Bourke.
| [in] | a | - Matrix to compute the determinant. |
| [in] | n | - Size of the quare matrix. |
| void CSysMatrix::MatrixMatrixProduct | ( | su2double * | matrix_a, |
| su2double * | matrix_b, | ||
| su2double * | product | ||
| ) |
Calculates the matrix-matrix product.
| [in] | matrix_a | |
| [in] | matrix_b | |
| [out] | product |
| void CSysMatrix::MatrixTranspose | ( | su2double ** | a, |
| unsigned long | n | ||
| ) |
Transpose of a square matrix, do it in place. Written by Paul Bourke.
| [in] | a | - Matrix to compute the determinant. |
| [in] | n | - Size of the quare matrix. |
| void CSysMatrix::MatrixVectorProduct | ( | su2double * | matrix, |
| su2double * | vector, | ||
| su2double * | product | ||
| ) |
Calculates the matrix-vector product.
| [in] | matrix | |
| [in] | vector | |
| [out] | product |
| void CSysMatrix::MatrixVectorProduct | ( | const CSysVector & | vec, |
| CSysVector & | prod | ||
| ) |
Performs the product of a sparse matrix by a vector.
| [in] | vec | - Vector to be multiplied by the sparse matrix A. |
| [out] | prod | - Result of the product. |
| void CSysMatrix::MatrixVectorProduct | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Performs the product of a sparse matrix by a CSysVector.
| [in] | vec | - CSysVector to be multiplied by the sparse matrix A. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| [out] | prod | - Result of the product. |
| void CSysMatrix::MatrixVectorProductTransposed | ( | const CSysVector & | vec, |
| CSysVector & | prod, | ||
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Performs the product of a sparse matrix by a CSysVector.
| [in] | vec | - CSysVector to be multiplied by the sparse matrix A. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| [out] | prod | - Result of the product. |
| void CSysMatrix::ProdBlockVector | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| const CSysVector & | vec | ||
| ) |
Performs the product of the block (i, j) by vector vec.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | vec | - Vector to be multiplied by the block (i, j) of the sparse matrix A. |
| void CSysMatrix::RowProduct | ( | const CSysVector & | vec, |
| unsigned long | row_i | ||
| ) |
Performs the product of i-th row of a sparse matrix by a vector.
| [in] | vec | - Vector to be multiplied by the row of the sparse matrix A. |
| [in] | row_i | - Row of the matrix to be multiplied by vector vec. |
| void CSysMatrix::SendReceive_Solution | ( | CSysVector & | x, |
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Send receive the solution using MPI.
| [in] | x | - Solution.. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::SendReceive_SolutionTransposed | ( | CSysVector & | x, |
| CGeometry * | geometry, | ||
| CConfig * | config | ||
| ) |
Send receive the solution using MPI and the transposed structure of the matrix.
| [in] | x | - Solution.. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::SetBlock | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double ** | val_block | ||
| ) |
Set the value of a block in the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to set to A(i, j). |
| void CSysMatrix::SetBlock | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double * | val_block | ||
| ) |
Set the value of a block in the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to set to A(i, j). |
| void CSysMatrix::SetBlock_ILUMatrix | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double * | val_block | ||
| ) |
Set the value of a block in the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to set to A(i, j). |
| void CSysMatrix::SetBlockTransposed_ILUMatrix | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double * | val_block | ||
| ) |
Set the transposed value of a block in the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to set to A(i, j). |
| void CSysMatrix::SetIndexes | ( | unsigned long | val_nPoint, |
| unsigned long | val_nPointDomain, | ||
| unsigned short | val_nVar, | ||
| unsigned short | val_nEq, | ||
| unsigned long * | val_row_ptr, | ||
| unsigned long * | val_col_ind, | ||
| unsigned long | val_nnz, | ||
| CConfig * | config | ||
| ) |
Assigns values to the sparse-matrix structure.
| [in] | val_nPoint | - Number of points in the nPoint x nPoint block structure |
| [in] | val_nVar | - Number of nVar x nVar variables in each subblock of the matrix-by-block structure. |
| [in] | val_nEq | - Number of nEqn x nVar variables in each subblock of the matrix-by-block structure. |
| [in] | val_row_ptr | - Pointers to the first element in each row. |
| [in] | val_col_ind | - Column index for each of the elements in val(). |
| [in] | val_nnz | - Number of possible nonzero entries in the matrix. |
| [in] | config | - Definition of the particular problem. |
| void CSysMatrix::SetVal2Diag | ( | unsigned long | block_i, |
| su2double | val_matrix | ||
| ) |
Sets the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
| [in] | block_i | - Index of the block in the matrix-by-blocks structure. |
| [in] | val_matrix | - Value to add to the diagonal elements of A(i, i). |
| void CSysMatrix::SubtractBlock | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double ** | val_block | ||
| ) |
Subtracts the specified block to the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to subtract to A(i, j). |
| void CSysMatrix::SubtractBlock_ILUMatrix | ( | unsigned long | block_i, |
| unsigned long | block_j, | ||
| su2double * | val_block | ||
| ) |
Subtracts the specified block to the sparse matrix.
| [in] | block_i | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | block_j | - Indexes of the block in the matrix-by-blocks structure. |
| [in] | **val_block | - Block to subtract to A(i, j). |
| void CSysMatrix::UpperProduct | ( | CSysVector & | vec, |
| unsigned long | row_i | ||
| ) |
Performs the product of i-th row of the upper part of a sparse matrix by a vector.
| [in] | vec | - Vector to be multiplied by the upper part of the sparse matrix A. |
| [in] | row_i | - Row of the matrix to be multiplied by vector vec. |
1.8.12