|
typedef struct _cs_matrix_assembler_t | cs_matrix_assembler_t |
|
typedef struct _cs_matrix_assembler_values_t | cs_matrix_assembler_values_t |
|
typedef void() | cs_matrix_assembler_values_init_t(void *matrix, cs_lnum_t db_size, cs_lnum_t eb_size) |
| Function pointer for initialization of matrix coefficients using local row ids and column indexes. More...
|
|
typedef void() | cs_matrix_assembler_values_add_t(void *matrix, cs_lnum_t n, cs_lnum_t stride, const cs_lnum_t row_id[], const cs_lnum_t col_idx[], const cs_real_t vals[]) |
| Function pointer for addition to matrix coefficients using local row ids and column indexes. More...
|
|
typedef void() | cs_matrix_assembler_values_add_g_t(void *matrix, cs_lnum_t n, cs_lnum_t stride, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[], const cs_real_t vals[]) |
| Function pointer for addition to matrix coefficients using global row ids and column indexes. More...
|
|
typedef void() | cs_matrix_assembler_values_begin_t(void *matrix) |
| Function pointer to start the final assembly of matrix coefficients. More...
|
|
typedef void() | cs_matrix_assembler_values_end_t(void *matrix) |
| Function pointer to complete the final assembly of matrix coefficients. More...
|
|
|
cs_matrix_assembler_t * | cs_matrix_assembler_create (const cs_gnum_t l_range[2], bool separate_diag) |
| Create a matrix assembler structure. More...
|
|
cs_matrix_assembler_t * | cs_matrix_assembler_create_from_shared (cs_lnum_t n_rows, bool separate_diag, const cs_lnum_t row_idx[], const cs_lnum_t col_id[], const cs_halo_t *halo) |
| Create a matrix assembler structure based on a given connectivity and associated halo structure. More...
|
|
void | cs_matrix_assembler_destroy (cs_matrix_assembler_t **ma) |
| Destroy a matrix assembler structure. More...
|
|
void | cs_matrix_assembler_add_g_ids (cs_matrix_assembler_t *ma, cs_lnum_t n, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[]) |
| Add entries to a matrix assembler structure. More...
|
|
void | cs_matrix_assembler_compute (cs_matrix_assembler_t *ma) |
| Compute internal structures required by a matrix assembler. More...
|
|
void | cs_matrix_assembler_set_options (cs_matrix_assembler_t *ma, int flags) |
| Set option flags for a given matrix assembler structure. More...
|
|
int | cs_matrix_assembler_get_options (const cs_matrix_assembler_t *ma) |
| Return the option flags for a given matrix assembler structure. More...
|
|
const cs_gnum_t * | cs_matrix_assembler_get_l_range (const cs_matrix_assembler_t *ma) |
| Return a pointer to local global row range associated with a matrix assembler. More...
|
|
const cs_halo_t * | cs_matrix_assembler_get_halo (const cs_matrix_assembler_t *ma) |
| Return a pointer to the halo structure associated with a matrix assembler. More...
|
|
bool | cs_matrix_assembler_get_separate_diag (const cs_matrix_assembler_t *ma) |
| Indicate if the matrix assembler is based on a separate diagonal. More...
|
|
cs_lnum_t | cs_matrix_assembler_get_n_rows (const cs_matrix_assembler_t *ma) |
| Return the number of rows associated with a matrix assembler. More...
|
|
cs_gnum_t | cs_matrix_assembler_get_n_g_rows (const cs_matrix_assembler_t *ma) |
| Return the global number of rows associated with a matrix assembler. More...
|
|
cs_lnum_t | cs_matrix_assembler_get_n_columns (const cs_matrix_assembler_t *ma) |
| Return the number of columns associated with a matrix assembler. More...
|
|
const cs_lnum_t * | cs_matrix_assembler_get_row_index (const cs_matrix_assembler_t *ma) |
| Return a row index associated with a matrix assembler. More...
|
|
const cs_lnum_t * | cs_matrix_assembler_get_col_ids (const cs_matrix_assembler_t *ma) |
| Return a column ids associated with a matrix assembler. More...
|
|
void | cs_matrix_assembler_get_rank_counts (const cs_matrix_assembler_t *ma, int rc[4]) |
| Return info on the number of neighbor ranks a matrix assembler may communicate with. More...
|
|
void | cs_matrix_assembler_log_rank_counts (const cs_matrix_assembler_t *ma, cs_log_t log_id, const char *name) |
| Log rank counts for a given matrix assembler. More...
|
|
cs_matrix_assembler_values_t * | cs_matrix_assembler_values_create (const cs_matrix_assembler_t *ma, bool sep_diag, cs_lnum_t db_size, cs_lnum_t eb_size, void *matrix, cs_matrix_assembler_values_init_t *init, cs_matrix_assembler_values_add_t *add, cs_matrix_assembler_values_add_g_t *add_g, cs_matrix_assembler_values_begin_t *begin, cs_matrix_assembler_values_end_t *end) |
| Create and initialize a matrix assembler values structure. More...
|
|
void | cs_matrix_assembler_values_finalize (cs_matrix_assembler_values_t **mav) |
| Finalize matrix assembler values structure. More...
|
|
void | cs_matrix_assembler_values_add (cs_matrix_assembler_values_t *mav, cs_lnum_t n, const cs_lnum_t row_id[], const cs_lnum_t col_id[], const cs_real_t val[]) |
| Add values to a matrix assembler values structure using local row and column ids. More...
|
|
void | cs_matrix_assembler_values_add_g (cs_matrix_assembler_values_t *mav, cs_lnum_t n, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[], const cs_real_t val[]) |
| Add values to a matrix assembler values structure using global row and column ids. More...
|
|
void | cs_matrix_assembler_values_done (cs_matrix_assembler_values_t *mav) |
| Start assembly of matrix values structure. More...
|
|
Add values to a matrix assembler values structure using local row and column ids.
If the matching matrix coefficients use a block structure, the values passed to this function should use the same block size.
Note also that if the matrix has different diagonal and extradiagonal block sizes, separate calls to this function should be used for both types of coefficients; in addition, in this case, diagonal coefficients should only be provided by the owning rank (this also impacts how the associated matrix assembler structure is defined).
This function may be called by different threads, as long those threads do not add contributions to the same rows (assuming caution is taken in the case of external libraries so that their builder functions have the same property).
- Parameters
-
[in,out] | mav | pointer to matrix assembler values structure |
[in] | n | number of entries |
[in] | col_id | local column ids associated with entries |
[in] | row_id | local row ids associated with entries |
[in] | val | values associated with entries |
Add values to a matrix assembler values structure using global row and column ids.
If the matching matrix coefficients use a block structure, the values passed to this function should use the same block size.
Note also that if the matrix has different diagonal and extradiagonal block sizes, separate calls to this function should be used for both types of coefficients; in addition, in this case, diagonal coefficients should only be provided by the owning rank (this also impacts how the associated matrix assembler structure is defined).
This function may be called by different threads, as long those threads do not add contributions to the same rows (assuming caution is taken in the case of external libraries so that their builder functions have the same property).
- Parameters
-
[in,out] | mav | pointer to matrix assembler values structure |
[in] | n | number of entries |
[in] | col_g_id | global column ids associated with entries |
[in] | row_g_id | global row ids associated with entries |
[in] | val | values associated with entries |
Create and initialize a matrix assembler values structure.
The associated values will initially be set to zero.
This is a low-level function, which should be called by a simpler function (cs_matrix_assembler_values_init) which provides the necessary function pointers.
- Warning
- The matrix pointer must point to valid data when the selection function is called, so the life cycle of the data pointed to should be at least as long as that of the assembler values structure. In a similar manner, the life cycle of the associated matrix assembler must also be at least as long as that of the assembler values structure.
- Parameters
-
[in] | ma | associated matrix assembly structure |
[in] | sep_diag | true if diagonal terms are stored separately |
[in] | db_size | optional diagonal block sizes |
[in] | eb_size | optional extra-diagonal block sizes |
[in,out] | matrix | untyped pointer to matrix description structure |
[in] | init | pointer to matrix coefficients initialization function |
[in] | add | pointer to matrix coefficients addition from local ids function |
[in] | add_g | pointer to matrix coefficients addition from global ids function |
[in] | begin | pointer to matrix coefficients assembly start function (optional) |
[in] | end | pointer to matrix coefficients assembly end function (optional) |
- Returns
- pointer to initialized matrix assembler structure;
The associated values will initially be set to zero.
This is a low-level function, which should be called by a simpler function (cs_matrix_assembler_values_init) which provides the necessary function pointers.
- Warning
- The matrix pointer must point to valid data when the selection function is called, so the life cycle of the data pointed to should be at least as long as that of the assembler values structure. In a similar manner, the life cycle of the associated matrix assembler must also be at least as long as that of the assembler values structure.
- Parameters
-
[in] | ma | associated matrix assembly structure |
[in] | sep_diag | true if diagonal terms are stored separately |
[in] | db_size | diagonal block sizes |
[in] | eb_size | extra-diagonal block sizes |
[in,out] | matrix | untyped pointer to matrix description structure |
[in] | init | pointer to matrix coefficients initialization function |
[in] | add | pointer to matrix coefficients addition from local ids function |
[in] | add_g | pointer to matrix coefficients addition from global ids function |
[in] | begin | pointer to matrix coefficients assembly start function (optional) |
[in] | end | pointer to matrix coefficients assembly end function (optional) |
- Returns
- pointer to initialized matrix assembler structure;