openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
#include <SF_abstract_matrix.h>
Public Member Functions | |
virtual | ~abstract_matrix ()=default |
virtual void | init (T iNRows, T iNCols, T ilrows, T ilcols, T loc_offset, T mxent) |
void | init (const meshdata< mesh_int_t, mesh_real_t > &imesh, const T irow_dpn, const T icol_dpn, const T max_edges) |
const meshdata< mesh_int_t, mesh_real_t > * | mesh_ptr () const |
int | dpn_row () const |
int | dpn_col () const |
virtual void | zero ()=0 |
virtual void | mult (const abstract_vector< T, S > &x, abstract_vector< T, S > &b) const =0 |
virtual void | mult_LR (const abstract_vector< T, S > &L, const abstract_vector< T, S > &R)=0 |
virtual void | diag_add (const abstract_vector< T, S > &diag)=0 |
virtual void | get_diagonal (abstract_vector< T, S > &vec) const =0 |
virtual void | finish_assembly ()=0 |
virtual void | scale (S s)=0 |
virtual void | add_scaled_matrix (const abstract_matrix< T, S > &A, const S s, const bool same_nnz)=0 |
virtual void | duplicate (const abstract_matrix< T, S > &M)=0 |
virtual void | set_values (const vector< T > &row_idx, const vector< T > &col_idx, const vector< S > &vals, bool add)=0 |
virtual void | set_values (const vector< T > &row_idx, const vector< T > &col_idx, const S *vals, bool add)=0 |
virtual void | set_value (T row_idx, T col_idx, S val, bool add)=0 |
void | get_values (const vector< T > &row_idx, const vector< T > &col_idx, vector< S > &values) const |
virtual S | get_value (SF_int row_idx, SF_int col_idx) const =0 |
virtual void | write (const char *filename) const =0 |
bool | equals (const abstract_matrix< T, S > &rhs) const |
std::string | to_string () const |
Protected Member Functions | |
abstract_matrix () | |
Protected Attributes | |
const meshdata< mesh_int_t, mesh_real_t > * | mesh |
pointer to the associated mesh More... | |
int | NRows |
global number of rows More... | |
int | NCols |
global number of cols More... | |
int | row_dpn |
row dpn More... | |
int | col_dpn |
col dpn More... | |
int | lsize |
size of local matrix (#locally stored rows) More... | |
int | start |
start row index of local matrix portion More... | |
int | stop |
stio row index of local matrix portion More... | |
FEM matrix class.
It connects a mesh with a sparse matrix.
T | Integer type (indices). |
S | Floating point type (values). |
Definition at line 44 of file SF_abstract_matrix.h.
|
inlineprotected |
Default constructor.
Definition at line 48 of file SF_abstract_matrix.h.
|
virtualdefault |
Default destructor
|
pure virtual |
Compute M += sA
A | The matrix to scale and add into this matrix. |
s | The scalar to scale the matrix A with. |
same_nnz | Whether A and this matrix share the same nonzero pattern. |
|
pure virtual |
Add values to the diagonal of this matrix.
diag | The values to add to the diagonal. |
|
inline |
Get the number of col d.o.f per mesh node
Definition at line 153 of file SF_abstract_matrix.h.
|
inline |
Get the number of row d.o.f per mesh node
Definition at line 146 of file SF_abstract_matrix.h.
|
pure virtual |
Duplicate the matrix M into this matrix.
M | The duplicated matrix. |
|
inline |
Check equality between this matrix and another.
rhs | The other matrix. |
Definition at line 300 of file SF_abstract_matrix.h.
|
pure virtual |
Mark assembly as being finished.
|
pure virtual |
Store the diagonal values of this martix in a vector.
vec | The output vector containing the matrix's diagonal. |
|
pure virtual |
Get a single value of the matrix.
row_idx | The requested row index. |
col_idx | The requested column index. |
|
inline |
Extract values of the matrix at specified indices.
row_idx | The requested row indices. |
col_idx | The requested column indices. |
values | The returned values of the matrix. |
Definition at line 264 of file SF_abstract_matrix.h.
|
inlinevirtual |
Initialize a matrix with the requested sizes.
iNRows | global number of rows |
iNCols | global number of cols |
ilrows | local number of rows |
ilcols | local number of cols |
loc_offset | offset of local partition in parallel layout |
mxent | maximum expected number of entries per row |
Definition at line 86 of file SF_abstract_matrix.h.
|
inline |
Initialize a matrix dimensions based on a given mesh.
imesh | mesh we associated to matrix |
irow_dpn | row dpn |
icol_dpn | col dpn |
max_edges | max number of edges, if -1 max edges will be computed on the fly |
Definition at line 105 of file SF_abstract_matrix.h.
|
inline |
Get the associated mesh pointer.
Definition at line 136 of file SF_abstract_matrix.h.
|
pure virtual |
Multiply this matrix with x and store the result in b (compute b := M x).
x | vector x to multiply this matrix with |
b | output vector |
|
pure virtual |
Scales the matrix on the left and right using diagonal matrices stored as vectors (compute M := L M R).
L | left diagonal matrix used for scaling |
R | right diagonal matrix used for scaling |
|
pure virtual |
Scale the matrix with a scalar.
s | The scalar to scale the matrix with. |
|
pure virtual |
Overwrite or add one value into this matrix.
row_idx | The row index. |
col_idx | The column index. |
val | The value to set. |
add | Whether to add the value into this matrix or overwrite. |
|
pure virtual |
Overwrite or add the values into this matrix.
row_idx | The row indices. |
col_idx | The column indices. |
vals | The values to set. |
add | Whether to add the values into this matrix or overwrite. |
|
pure virtual |
Overwrite or add the values into this matrix.
row_idx | The row indices. |
col_idx | The column indices. |
vals | The values to set. |
add | Whether to add the values into this matrix or overwrite. |
|
inline |
A string format for the current matrix.
Definition at line 319 of file SF_abstract_matrix.h.
|
pure virtual |
Writes the matrix to a file.
filename | The file to write to. |
|
pure virtual |
Zero matrix values.
|
protected |
col dpn
Definition at line 65 of file SF_abstract_matrix.h.
|
protected |
size of local matrix (#locally stored rows)
Definition at line 67 of file SF_abstract_matrix.h.
|
protected |
pointer to the associated mesh
Definition at line 60 of file SF_abstract_matrix.h.
|
protected |
global number of cols
Definition at line 63 of file SF_abstract_matrix.h.
|
protected |
global number of rows
Definition at line 62 of file SF_abstract_matrix.h.
|
protected |
row dpn
Definition at line 64 of file SF_abstract_matrix.h.
|
protected |
start row index of local matrix portion
Definition at line 68 of file SF_abstract_matrix.h.
|
protected |
stio row index of local matrix portion
Definition at line 69 of file SF_abstract_matrix.h.