8.0
general documentation
cs_cdo_assembly.c File Reference

Assembly of local cellwise system 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:

Functions

cs_cdo_assembly_tcs_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...
 

Detailed Description

Assembly of local cellwise system 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 optimzed version of the standard assembly process.

Function Documentation

◆ cs_cdo_assembly_block33_matrix_seqs()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_block33_matrix_seqt()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_eblock33_matrix_seqs()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_eblock33_matrix_seqt()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_eblock_matrix_seqs()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_eblock_matrix_seqt()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to an equation assembly structure
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_finalize()

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_get()

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.

Parameters
[in]t_idid in the array of pointer
Returns
a pointer to a cs_cdo_assembly_t structure

◆ cs_cdo_assembly_init()

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.

Parameters
[in]ddimmax number of dof values on the diagonal part
[in]edimmax number of dof values on the extra-diag. part
[in]n_cw_dofsmax number of DoFs in a cell

◆ cs_cdo_assembly_matrix_e33_generic()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_matrix_scal_generic()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_matrix_seqs()

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).

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_matrix_seqt()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_matrix_sys_seqs()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_matrix_sys_seqt()

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.

Parameters
[in]mcellwise view of the algebraic system
[in]dof_idslocal DoF numbering
[in]rsetpointer to a cs_range_set_t structure
[in,out]asbpointer to a matrix assembler buffers
[in,out]mavpointer to a matrix assembler structure

◆ cs_cdo_assembly_set_shift()

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.

Parameters
[in,out]asbpointer to a cs_cdo_assembly_t to update
[in]l_row_shiftshift to apply to local row ids
[in]l_col_shiftshift to apply to local col ids
Returns
a function pointer cs_cdo_assembly_func_t