MFEM v2.0
Classes | Functions
sparsemat.hpp File Reference
#include "../general/mem_alloc.hpp"
#include "../general/table.hpp"
#include "densemat.hpp"
Include dependency graph for sparsemat.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RowNode
class  SparseMatrix
 Data type sparse matrix. More...

Functions

void SparseMatrixFunction (SparseMatrix &S, double(*f)(double))
 Applies f() to each element of the matrix (after it is finalized).
SparseMatrixTranspose (SparseMatrix &A)
 Transpose of a sparse matrix. A must be finalized.
SparseMatrixMult (SparseMatrix &A, SparseMatrix &B, SparseMatrix *OAB=NULL)
SparseMatrixRAP (SparseMatrix &A, SparseMatrix &R, SparseMatrix *ORAP=NULL)
SparseMatrixMult_AtDA (SparseMatrix &A, Vector &D, SparseMatrix *OAtDA=NULL)

Function Documentation

SparseMatrix* Mult ( SparseMatrix A,
SparseMatrix B,
SparseMatrix OAB = NULL 
)

Matrix product A.B. If OAB is not NULL, we assume it has the structure of A.B and store the result in OAB. If OAB is NULL, we create a new SparseMatrix to store the result and return a pointer to it. All matrices must be finalized.

Definition at line 1430 of file sparsemat.cpp.

References SparseMatrix::GetData(), SparseMatrix::GetI(), SparseMatrix::GetJ(), mfem_error(), Operator::Size(), and SparseMatrix::Width().

SparseMatrix* Mult_AtDA ( SparseMatrix A,
Vector D,
SparseMatrix OAtDA = NULL 
)

Matrix multiplication A^t D A. All matrices must be finalized.

Definition at line 1550 of file sparsemat.cpp.

References Mult(), and Transpose().

SparseMatrix* RAP ( SparseMatrix A,
SparseMatrix R,
SparseMatrix ORAP = NULL 
)

RAP matrix product. ORAP is like OAB above. All matrices must be finalized.

Definition at line 1539 of file sparsemat.cpp.

References Mult(), and Transpose().

void SparseMatrixFunction ( SparseMatrix S,
double(*)(double)  f 
)

Applies f() to each element of the matrix (after it is finalized).

Definition at line 1379 of file sparsemat.cpp.

References SparseMatrix::GetData(), and SparseMatrix::NumNonZeroElems().

SparseMatrix* Transpose ( SparseMatrix A)

Transpose of a sparse matrix. A must be finalized.

Definition at line 1388 of file sparsemat.cpp.

References SparseMatrix::GetData(), SparseMatrix::GetI(), SparseMatrix::GetJ(), SparseMatrix::NumNonZeroElems(), Operator::Size(), and SparseMatrix::Width().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines