Set of functions and structures to handle the assembly of cellwise local CDO systems into a cs_matrix_t structure through the cs_matrix_assembler_t and its related structures. More...
#include "cs_defs.h"#include <assert.h>#include "bft_error.h"#include "bft_mem.h"#include "cs_log.h"#include "cs_matrix_priv.h"#include "cs_matrix_assembler_priv.h"#include "cs_matrix_assembler.h"#include "cs_param_cdo.h"#include "cs_parall.h"#include "cs_sort.h"#include "cs_cdo_assembly.h" Include dependency graph for cs_cdo_assembly.c:
 Include dependency graph for cs_cdo_assembly.c:| 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 of 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... | |
Set of functions and structures to handle the assembly of cellwise local CDO systems into a cs_matrix_t structure through the cs_matrix_assembler_t and its related structures.
This function are specific to CDO schemes. Thus one can assume a more specific behavior in order to get a more optimized version of the standard assembly process.
| 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.
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 of this structure to enable a multithreaded assembly process.
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.