|
My Project
programmer's documentation
|
Go to the documentation of this file. 1 #ifndef __CS_MATRIX_ASSEMBLER_H__
2 #define __CS_MATRIX_ASSEMBLER_H__
51 #define CS_MATRIX_DISTANT_ROW_USE_COL_IDX (1 << 0)
52 #define CS_MATRIX_DISTANT_ROW_USE_COL_G_ID (1 << 1)
53 #define CS_MATRIX_EXTERNAL_HALO (1 << 2)
381 #if defined(HAVE_MPI)
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.
Definition: cs_matrix_assembler.c:2871
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.
Definition: cs_matrix_assembler.c:2821
void cs_matrix_assembler_values_add_g(cs_matrix_assembler_values_t *mav, cs_lnum_t n, const cs_gnum_t g_row_id[], const cs_gnum_t g_col_id[], const cs_real_t val[])
Add values to a matrix assembler values structure using global row and column ids.
Definition: cs_matrix_assembler.c:3298
void cs_matrix_assembler_compute(cs_matrix_assembler_t *ma)
Compute internal structures required by a matrix assembler.
Definition: cs_matrix_assembler.c:2765
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.
Definition: cs_matrix_assembler.h:116
struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t
Definition: cs_matrix_assembler.h:65
#define END_C_DECLS
Definition: cs_defs.h:468
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
void cs_matrix_assembler_add_g_ids(cs_matrix_assembler_t *ma, cs_lnum_t n, const cs_gnum_t g_row_id[], const cs_gnum_t g_col_id[])
Add entries to a matrix assembler structure.
Definition: cs_matrix_assembler.c:2704
cs_matrix_assembler_t * cs_matrix_assembler_create(const cs_gnum_t l_range[2], bool separate_diag)
Create a matrix assembler structure.
Definition: cs_matrix_assembler.c:2397
cs_matrix_assembler_values_t * cs_matrix_assembler_values_create(const cs_matrix_assembler_t *ma, bool sep_diag, const cs_lnum_t *db_size, const 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.
Definition: cs_matrix_assembler.c:3068
void const cs_int_t const cs_int_t const cs_int_t const cs_int_t * stride
Definition: cs_sat_coupling.h:325
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.
Definition: cs_matrix_assembler.c:2991
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.
Definition: cs_matrix_assembler.c:2887
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
void() cs_matrix_assembler_values_init_t(void *matrix, const cs_lnum_t *db_size, const cs_lnum_t *eb_size)
Function pointer for initialization of matrix coefficients using local row ids and column indexes.
Definition: cs_matrix_assembler.h:84
bool cs_matrix_assembler_get_separate_diag(const cs_matrix_assembler_t *ma)
Indicate if the matrix assembler is based on a separate diagonal.
Definition: cs_matrix_assembler.c:2855
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.
Definition: cs_matrix_assembler.c:2838
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.
Definition: cs_matrix_assembler.c:3188
void() cs_matrix_assembler_values_end_t(void *matrix)
Function pointer to complete the final assembly of matrix coefficients.
Definition: cs_matrix_assembler.h:226
void cs_matrix_assembler_destroy(cs_matrix_assembler_t **ma)
Destroy a matrix assembler structure.
Definition: cs_matrix_assembler.c:2586
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
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.
Definition: cs_matrix_assembler.c:2963
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.
Definition: cs_matrix_assembler.c:2941
void const cs_int_t *const init
Definition: cs_convection_diffusion.h:5386
int cs_matrix_assembler_get_options(const cs_matrix_assembler_t *ma)
Return the option flags for a given matrix assembler structure.
Definition: cs_matrix_assembler.c:2685
void() cs_matrix_assembler_values_begin_t(void *matrix)
Function pointer to start the final assembly of matrix coefficients.
Definition: cs_matrix_assembler.h:209
cs_log_t
Definition: cs_log.h:48
struct _cs_matrix_assembler_t cs_matrix_assembler_t
Definition: cs_matrix_assembler.h:61
void() cs_matrix_assembler_values_cdo_add_t(void *matrix, cs_lnum_t row_id, cs_lnum_t stride, cs_lnum_t n_cols, const cs_real_t diag_val[], 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 in case o...
Definition: cs_matrix_assembler.h:155
void cs_matrix_assembler_values_done(cs_matrix_assembler_values_t *mav)
Start assembly of matrix values structure.
Definition: cs_matrix_assembler.c:3532
void cs_matrix_assembler_values_finalize(cs_matrix_assembler_values_t **mav)
Finalize matrix assembler values structure.
Definition: cs_matrix_assembler.c:3143
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.
Definition: cs_matrix_assembler.h:188
void cs_matrix_assembler_set_options(cs_matrix_assembler_t *ma, int flags)
Set option flags for a given matrix assembler structure.
Definition: cs_matrix_assembler.c:2659
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.
Definition: cs_matrix_assembler.c:2484
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.
Definition: cs_matrix_assembler.c:2915