#include <cs_sdm.h>
Collaboration diagram for cs_sdm_t:Public Member Functions | |
| ~_cs_sdm_t () | |
| Destructor. More... | |
| _cs_sdm_t (const int n_max_rows_) | |
| Constructor for a square matrix. More... | |
| _cs_sdm_t (const cs_flag_t flag_, const int n_max_rows_, const int n_max_cols_) | |
| Constructor for a matrix. More... | |
| _cs_sdm_t (const _cs_sdm_t &other) | |
| Constructor by copy. More... | |
| int | size () const |
| Return the size of the matrix. More... | |
| cs_real_t * | row (const int row_i) const |
| Return a pointer on row. More... | |
| _cs_sdm_t & | operator= (const _cs_sdm_t &)=delete |
| cs_real_t & | operator() (const int i, const int j) |
| Modifiy the value (i,j) of the matric. More... | |
| const cs_real_t & | operator() (const int i, const int j) const |
| Get the value (i,j) of the matric. More... | |
| void | init (const int nrows, const int ncols) |
| Initialize matrix. More... | |
| void | init (const int nrows) |
| Initialize square matrix. More... | |
| cs_real_t * | data () const |
| Return a pointer on the values. More... | |
| _cs_sdm_t | transpose () const |
| Transpose a matrix. More... | |
| void | symmetrize_ur () |
| Set the lower left according to the upper right part in order to get a symmetric matrix. More... | |
| cs_sdm_t * | get_block (const int row_block_id, const int col_block_id) const |
| Get a specific block in a cs_sdm_t structure defined by block. More... | |
| _cs_sdm_t & | operator*= (const cs_real_t &scaling) |
| Multiply a matrix with the scaling factor given as parameter. More... | |
| _cs_sdm_t & | operator+= (const _cs_sdm_t &add) |
| Add two small dense matrices: loc += add. More... | |
| void | dot (const cs_real_t vec[], cs_real_t mv[]) const |
| Compute a dense matrix-vector product for a small square matrix mv has been previously allocated. More... | |
| void | dump () const |
| Dump a small dense matrix. More... | |
| void | dump (cs_lnum_t parent_id) const |
| Dump a small dense matrix. More... | |
| void | dump (cs_lnum_t parent_id, const cs_lnum_t *row_ids, const cs_lnum_t *col_ids) const |
| Dump a small dense matrix. More... | |
| void | dump (FILE *fp, const char *fname, cs_real_t thd) const |
| Print a cs_sdm_t structure not defined by block Print into the file f if given otherwise open a new file named fname if given otherwise print into the standard output The usage of threshold allows one to compare more easier matrices without taking into account numerical roundoff. More... | |
| void | map_array (int n_max_rows_, int n_max_cols_, cs_real_t *array) |
| Map an array into a predefined cs_sdm_t structure. This array is shared and the lifecycle of this array is not managed by the cs_sdm_t structure. More... | |
Public Attributes | |
| cs_flag_t | flag |
| int | n_max_rows |
| int | n_rows |
| int | n_max_cols |
| int | n_cols |
| cs_real_t * | val |
| cs_sdm_block_t * | block_desc |
| ~_cs_sdm_t | ( | ) |
Destructor.
| _cs_sdm_t | ( | const int | n_max_rows_ | ) |
Constructor for a square matrix.
| [in] | n_max_rows | max number of rows |
Constructor for a matrix.
Constructor for a square matrix.
| [in] | flag | metadata related to a cs_sdm_t structure |
| [in] | n_max_rows | max number of rows |
| [in] | n_max_cols | max number of columns |
|
inline |
Return a pointer on the values.
Compute a dense matrix-vector product for a small square matrix mv has been previously allocated.
| [in] | vec | local vector to use |
| [in,out] | mv | result of the local matrix-vector product |
| void dump | ( | ) | const |
Dump a small dense matrix.
| void dump | ( | cs_lnum_t | parent_id | ) | const |
Dump a small dense matrix.
| [in] | parent_id | id of the related parent entity |
Dump a small dense matrix.
| [in] | parent_id | id of the related parent entity |
| [in] | row_ids | list of ids related to associated entities (or nullptr) |
| [in] | col_ids | list of ids related to associated entities |
| void dump | ( | FILE * | fp, |
| const char * | fname, | ||
| cs_real_t | thd | ||
| ) | const |
Print a cs_sdm_t structure not defined by block Print into the file f if given otherwise open a new file named fname if given otherwise print into the standard output The usage of threshold allows one to compare more easier matrices without taking into account numerical roundoff.
| [in] | fp | pointer to a file structure or null |
| [in] | fname | filename or null |
| [in] | thd | threshold (below this value --> set 0) |
|
inline |
Get a specific block in a cs_sdm_t structure defined by block.
| [in] | row_block_id | id of the block row, zero-based. |
| [in] | col_block_id | id of the block column, zero-based. |
| void init | ( | const int | nrows | ) |
Initialize square matrix.
| [in] | nrows | number of rows |
| void init | ( | const int | nrows, |
| const int | ncols | ||
| ) |
Initialize matrix.
| [in] | nrows | number of rows |
| [in] | ncols | number of columns |
| void map_array | ( | int | n_max_rows_, |
| int | n_max_cols_, | ||
| cs_real_t * | array | ||
| ) |
Map an array into a predefined cs_sdm_t structure. This array is shared and the lifecycle of this array is not managed by the cs_sdm_t structure.
| [in] | n_max_rows_ | max. number of rows |
| [in] | n_max_cols_ | max. number of columns |
| [in,out] | array | pointer to an array of values of size equal to n_max_rows x n_max_cols |
| cs_real_t & operator() | ( | const int | i, |
| const int | j | ||
| ) |
Modifiy the value (i,j) of the matric.
| [in] | i | index of the row |
| [in] | j | index of the column |
| const cs_real_t & operator() | ( | const int | i, |
| const int | j | ||
| ) | const |
Get the value (i,j) of the matric.
| [in] | i | index of the row |
| [in] | j | index of the column |
Multiply a matrix with the scaling factor given as parameter.
| [in] | scaling |
Add two small dense matrices: loc += add.
| [in] | add | values to add to mat |
|
inline |
Return a pointer on row.
| [in] | row_i | index of the row |
|
inline |
Return the size of the matrix.
| void symmetrize_ur | ( | ) |
Set the lower left according to the upper right part in order to get a symmetric matrix.
| _cs_sdm_t transpose | ( | ) | const |
Transpose a matrix.
| cs_sdm_block_t* block_desc |
| cs_flag_t flag |
| int n_cols |
| int n_max_cols |
| int n_max_rows |
| int n_rows |
| cs_real_t* val |