#include "cs_matrix.h"
#include "cs_matrix_assembler.h"
#include "cs_param_types.h"
#include "cs_range_set.h"
#include "cs_sdm.h"
Go to the source code of this file.
Data Structures | |
struct | cs_cdo_assembly_row_t |
struct | cs_cdo_assembly_t |
Macros | |
#define | CS_CDO_ASSEMBLY_BUFSIZE 200 |
Typedefs | |
typedef void() | cs_cdo_assembly_func_t(const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *eqa, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix Block or no block versions are handled. More... | |
Functions | |
void | cs_cdo_assembly_setup_log (void) |
Print information for the setup.log file. More... | |
cs_cdo_assembly_t * | cs_cdo_assembly_get (int t_id) |
Get a pointer to a cs_cdo_assembly_t structure related to a given thread. More... | |
void | cs_cdo_assembly_init (int ddim, int edim, int n_cw_dofs) |
Allocate cs_cdo_assembly_t structure (shared among schemes). Each thread has its own copy this structure to enable a multithreaded assembly process. More... | |
void | cs_cdo_assembly_finalize (void) |
Free matrix-related structures used during the simulation. Display overall statistic about the assembly stage for CDO schemes. More... | |
void | cs_cdo_assembly_set_shift (cs_cdo_assembly_t *asb, cs_lnum_t l_row_shift, cs_lnum_t l_col_shift) |
Set the current shift values to consider during the assembly stage. More... | |
void | cs_cdo_assembly_matrix_scal_generic (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Rely on the generic cs_matrix_assembler_values_add_g() function. Case of scalar-valued matrices. More... | |
void | cs_cdo_assembly_matrix_e33_generic (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Rely on the generic cs_matrix_assembler_values_add_g() function. Case of vector-valued matrices with an expanded 3x3 block. More... | |
void | cs_cdo_assembly_matrix_seqt (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Scalar-valued case. Sequential and with openMP threading. More... | |
void | cs_cdo_assembly_matrix_seqs (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix Scalar-valued case. Sequential and without openMP (single thread). More... | |
void | cs_cdo_assembly_matrix_sys_seqs (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise (no-block) matrix into the global matrix corresponding to a system of coupled equations. Scalar-valued case. Sequential and without openMP. Block matrices assembled from cellwise scalar-valued matrices. More... | |
void | cs_cdo_assembly_matrix_sys_seqt (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise (no-block) matrix into the global matrix corresponding to a system of coupled equations. Scalar-valued case. Sequential and with openMP. Block matrices assembled from cellwise scalar-valued matrices. More... | |
void | cs_cdo_assembly_eblock33_matrix_seqs (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix Case of a block 3x3 entries. Expand each row. Sequential run without openMP threading. More... | |
void | cs_cdo_assembly_eblock33_matrix_seqt (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run with openMP threading. More... | |
void | cs_cdo_assembly_block33_matrix_seqs (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run without openMP threading. More... | |
void | cs_cdo_assembly_block33_matrix_seqt (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run with openMP threading. More... | |
void | cs_cdo_assembly_eblock_matrix_seqs (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix Case of a block NxN entries. Expand each row. Sequential run without openMP threading. More... | |
void | cs_cdo_assembly_eblock_matrix_seqt (const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *asb, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise system into the global algebraic system. Case of a block NxN entries. Expand each row. Sequential run with openMP threading. More... | |
#define CS_CDO_ASSEMBLY_BUFSIZE 200 |
typedef void() cs_cdo_assembly_func_t(const cs_sdm_t *m, const cs_lnum_t *dof_ids, const cs_range_set_t *rset, cs_cdo_assembly_t *eqa, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise matrix into the global matrix Block or no block versions are handled.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | eqa | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_block33_matrix_seqs | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run without openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_block33_matrix_seqt | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run with openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_eblock33_matrix_seqs | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix Case of a block 3x3 entries. Expand each row. Sequential run without openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
Assemble a cellwise matrix into the global matrix Case of a block 3x3 entries. Expand each row. Sequential run without openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_eblock33_matrix_seqt | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Case of a block 3x3 entries. Expand each row. Sequential run with openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_eblock_matrix_seqs | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix Case of a block NxN entries. Expand each row. Sequential run without openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_eblock_matrix_seqt | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise system into the global algebraic system. Case of a block NxN entries. Expand each row. Sequential run with openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to an equation assembly structure |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_finalize | ( | void | ) |
Free matrix-related structures used during the simulation. Display overall statistic about the assembly stage for CDO schemes.
cs_cdo_assembly_t* cs_cdo_assembly_get | ( | int | t_id | ) |
Get a pointer to a cs_cdo_assembly_t structure related to a given thread.
[in] | t_id | id in the array of pointer |
void cs_cdo_assembly_init | ( | int | ddim, |
int | edim, | ||
int | n_cw_dofs | ||
) |
Allocate cs_cdo_assembly_t structure (shared among schemes). Each thread has its own copy this structure to enable a multithreaded assembly process.
[in] | ddim | max number of dof values on the diagonal part |
[in] | edim | max number of dof values on the extra-diag. part |
[in] | n_cw_dofs | max number of DoFs in a cell |
Allocate cs_cdo_assembly_t structure (shared among schemes). Each thread has its own copy this structure to enable a multithreaded assembly process.
[in] | ddim | max number of dof values on the diagonal part |
[in] | edim | max number of dof values on the extra-diag. part |
[in] | n_cw_dofs | max number of DoFs in a cell |
void cs_cdo_assembly_matrix_e33_generic | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Rely on the generic cs_matrix_assembler_values_add_g() function. Case of vector-valued matrices with an expanded 3x3 block.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_matrix_scal_generic | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Rely on the generic cs_matrix_assembler_values_add_g() function. Case of scalar-valued matrices.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_matrix_seqs | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix Scalar-valued case. Sequential and without openMP (single thread).
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_matrix_seqt | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise matrix into the global matrix. Scalar-valued case. Sequential and with openMP threading.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_matrix_sys_seqs | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise (no-block) matrix into the global matrix corresponding to a system of coupled equations. Scalar-valued case. Sequential and without openMP. Block matrices assembled from cellwise scalar-valued matrices.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_matrix_sys_seqt | ( | const cs_sdm_t * | m, |
const cs_lnum_t * | dof_ids, | ||
const cs_range_set_t * | rset, | ||
cs_cdo_assembly_t * | asb, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise (no-block) matrix into the global matrix corresponding to a system of coupled equations. Scalar-valued case. Sequential and with openMP. Block matrices assembled from cellwise scalar-valued matrices.
[in] | m | cellwise view of the algebraic system |
[in] | dof_ids | local DoF numbering |
[in] | rset | pointer to a cs_range_set_t structure |
[in,out] | asb | pointer to a matrix assembler buffers |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_cdo_assembly_set_shift | ( | cs_cdo_assembly_t * | asb, |
cs_lnum_t | l_row_shift, | ||
cs_lnum_t | l_col_shift | ||
) |
Set the current shift values to consider during the assembly stage.
[in,out] | asb | pointer to a cs_cdo_assembly_t to update |
[in] | l_row_shift | shift to apply to local row ids |
[in] | l_col_shift | shift to apply to local col ids |
void cs_cdo_assembly_setup_log | ( | void | ) |
Print information for the setup.log file.