SU2
Public Member Functions | List of all members
CSysMatrix Class Reference

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...
 

Detailed Description

Main class for defining sparse matrices-by-blocks with compressed row format.

Author
A. Bueno, F. Palacios
Version
5.0.0 "Raven"

Member Function Documentation

§ AddBlock()

void CSysMatrix::AddBlock ( unsigned long  block_i,
unsigned long  block_j,
su2double **  val_block 
)

Adds the specified block to the sparse matrix.

Parameters
[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).

§ AddVal2Diag()

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.

Parameters
[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).

§ BuildILUPreconditioner()

void CSysMatrix::BuildILUPreconditioner ( bool  transposed = false)

Build the ILU0 preconditioner.

Parameters
[in]transposed- Flag to use the transposed matrix to construct the preconditioner.

§ BuildLineletPreconditioner()

unsigned short CSysMatrix::BuildLineletPreconditioner ( CGeometry geometry,
CConfig config 
)

Build the Linelet preconditioner.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ ComputeILUPreconditioner()

void CSysMatrix::ComputeILUPreconditioner ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Multiply CSysVector by the preconditioner.

Parameters
[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.

§ ComputeJacobiPreconditioner()

void CSysMatrix::ComputeJacobiPreconditioner ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Multiply CSysVector by the preconditioner.

Parameters
[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.

§ ComputeLineletPreconditioner()

void CSysMatrix::ComputeLineletPreconditioner ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Multiply CSysVector by the preconditioner.

Parameters
[in]vec- CSysVector to be multiplied by the preconditioner.
[out]prod- Result of the product A*vec.

§ ComputeLU_SGSPreconditioner()

void CSysMatrix::ComputeLU_SGSPreconditioner ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Multiply CSysVector by the preconditioner.

Parameters
[in]vec- CSysVector to be multiplied by the preconditioner.
[out]prod- Result of the product A*vec.

§ ComputeResidual()

void CSysMatrix::ComputeResidual ( const CSysVector sol,
const CSysVector f,
CSysVector res 
)

Compute the residual Ax-b.

Parameters
[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.

§ DeleteValsRowi()

void CSysMatrix::DeleteValsRowi ( unsigned long  i)

Deletes the values of the row i of the sparse matrix.

Parameters
[in]i- Index of the row.

§ DiagonalProduct()

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.

Parameters
[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.
Returns
prod Result of the product D(A)*vec (stored at *prod_row_vector).

§ Gauss_Elimination() [1/2]

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.

Parameters
[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).
Returns
Solution of the linear system (overwritten on rhs).

§ Gauss_Elimination() [2/2]

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.

Parameters
[in]Block- matrix-by-blocks structure.
[in]rhs- Right-hand-side of the linear system.
Returns
Solution of the linear system (overwritten on rhs).

§ Gauss_Elimination_ILUMatrix()

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.

Parameters
[in]block_i- Index of the (i, i) subblock in the matrix-by-blocks structure.
[in]rhs- Right-hand-side of the linear system.
Returns
Solution of the linear system (overwritten on rhs).

§ GetBlock() [1/2]

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.

Parameters
[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.

§ GetBlock() [2/2]

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.

Parameters
[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.

§ GetBlock_ILUMatrix()

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.

Parameters
[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.

§ ILU0_Smoother()

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.

Parameters
[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).

§ Initialize()

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.

Parameters
[in]nVar- Number of variables.
[in]nEqn- Number of equations.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ InverseBlock()

void CSysMatrix::InverseBlock ( su2double *  Block,
su2double *  invBlock 
)

Inverse a block.

Parameters
[in]Block- block matrix.
[out]invBlock- Inverse block.

§ InverseDiagonalBlock()

void CSysMatrix::InverseDiagonalBlock ( unsigned long  block_i,
su2double *  invBlock,
bool  transpose = false 
)

Inverse diagonal block.

Parameters
[in]block_i- Indexes of the block in the matrix-by-blocks structure.
[out]invBlock- Inverse block.

§ InverseDiagonalBlock_ILUMatrix()

void CSysMatrix::InverseDiagonalBlock_ILUMatrix ( unsigned long  block_i,
su2double *  invBlock 
)

Inverse diagonal block.

Parameters
[in]block_i- Indexes of the block in the matrix-by-blocks structure.
[out]invBlock- Inverse block.

§ Jacobi_Smoother()

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.

Parameters
[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).

§ LowerProduct()

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.

Parameters
[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.
Returns
prod Result of the product L(A)*vec (stored at *prod_row_vector).

§ LU_SGS_Smoother()

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.

Parameters
[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).

§ MatrixCoFactor()

void CSysMatrix::MatrixCoFactor ( su2double **  a,
unsigned long  n,
su2double **  b 
)

Find the cofactor matrix of a square matrix. Written by Paul Bourke.

Parameters
[in]a- Matrix to compute the determinant.
[in]n- Size of the quare matrix.
[out]b- cofactor matrix

§ MatrixDeterminant()

su2double CSysMatrix::MatrixDeterminant ( su2double **  a,
unsigned long  n 
)

Recursive definition of determinate using expansion by minors. Written by Paul Bourke.

Parameters
[in]a- Matrix to compute the determinant.
[in]n- Size of the quare matrix.
Returns
Value of the determinant.

§ MatrixMatrixProduct()

void CSysMatrix::MatrixMatrixProduct ( su2double *  matrix_a,
su2double *  matrix_b,
su2double *  product 
)

Calculates the matrix-matrix product.

Parameters
[in]matrix_a
[in]matrix_b
[out]product

§ MatrixTranspose()

void CSysMatrix::MatrixTranspose ( su2double **  a,
unsigned long  n 
)

Transpose of a square matrix, do it in place. Written by Paul Bourke.

Parameters
[in]a- Matrix to compute the determinant.
[in]n- Size of the quare matrix.

§ MatrixVectorProduct() [1/3]

void CSysMatrix::MatrixVectorProduct ( su2double *  matrix,
su2double *  vector,
su2double *  product 
)

Calculates the matrix-vector product.

Parameters
[in]matrix
[in]vector
[out]product

§ MatrixVectorProduct() [2/3]

void CSysMatrix::MatrixVectorProduct ( const CSysVector vec,
CSysVector prod 
)

Performs the product of a sparse matrix by a vector.

Parameters
[in]vec- Vector to be multiplied by the sparse matrix A.
[out]prod- Result of the product.
Returns
Result of the product A*vec.

§ MatrixVectorProduct() [3/3]

void CSysMatrix::MatrixVectorProduct ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Performs the product of a sparse matrix by a CSysVector.

Parameters
[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.

§ MatrixVectorProductTransposed()

void CSysMatrix::MatrixVectorProductTransposed ( const CSysVector vec,
CSysVector prod,
CGeometry geometry,
CConfig config 
)

Performs the product of a sparse matrix by a CSysVector.

Parameters
[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.

§ ProdBlockVector()

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.

Parameters
[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.
Returns
Product of A(i, j) by vector *vec (stored at *prod_block_vector).

§ RowProduct()

void CSysMatrix::RowProduct ( const CSysVector vec,
unsigned long  row_i 
)

Performs the product of i-th row of a sparse matrix by a vector.

Parameters
[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.
Returns
Result of the product (stored at *prod_row_vector).

§ SendReceive_Solution()

void CSysMatrix::SendReceive_Solution ( CSysVector x,
CGeometry geometry,
CConfig config 
)

Send receive the solution using MPI.

Parameters
[in]x- Solution..
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ SendReceive_SolutionTransposed()

void CSysMatrix::SendReceive_SolutionTransposed ( CSysVector x,
CGeometry geometry,
CConfig config 
)

Send receive the solution using MPI and the transposed structure of the matrix.

Parameters
[in]x- Solution..
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ SetBlock() [1/2]

void CSysMatrix::SetBlock ( unsigned long  block_i,
unsigned long  block_j,
su2double **  val_block 
)

Set the value of a block in the sparse matrix.

Parameters
[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).

§ SetBlock() [2/2]

void CSysMatrix::SetBlock ( unsigned long  block_i,
unsigned long  block_j,
su2double *  val_block 
)

Set the value of a block in the sparse matrix.

Parameters
[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).

§ SetBlock_ILUMatrix()

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.

Parameters
[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).

§ SetBlockTransposed_ILUMatrix()

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.

Parameters
[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).

§ SetIndexes()

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.

Parameters
[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.

§ SetVal2Diag()

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.

Parameters
[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).

§ SubtractBlock()

void CSysMatrix::SubtractBlock ( unsigned long  block_i,
unsigned long  block_j,
su2double **  val_block 
)

Subtracts the specified block to the sparse matrix.

Parameters
[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).

§ SubtractBlock_ILUMatrix()

void CSysMatrix::SubtractBlock_ILUMatrix ( unsigned long  block_i,
unsigned long  block_j,
su2double *  val_block 
)

Subtracts the specified block to the sparse matrix.

Parameters
[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).

§ UpperProduct()

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.

Parameters
[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.
Returns
prod Result of the product U(A)*vec (stored at *prod_row_vector).

The documentation for this class was generated from the following files: