8.0
general documentation
Loading...
Searching...
No Matches
cs_cdo_assembly.h
Go to the documentation of this file.
1#ifndef __CS_CDO_ASSEMBLY_H__
2#define __CS_CDO_ASSEMBLY_H__
3
4/*============================================================================
5 * Functions to handle the assembly process of equatino discretized with CDO
6 * schemes
7 *============================================================================*/
8
9/*
10 This file is part of code_saturne, a general-purpose CFD tool.
11
12 Copyright (C) 1998-2023 EDF S.A.
13
14 This program is free software; you can redistribute it and/or modify it under
15 the terms of the GNU General Public License as published by the Free Software
16 Foundation; either version 2 of the License, or (at your option) any later
17 version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26 Street, Fifth Floor, Boston, MA 02110-1301, USA.
27*/
28
29/*----------------------------------------------------------------------------
30 * Local headers
31 *----------------------------------------------------------------------------*/
32
33#include "cs_matrix.h"
34#include "cs_matrix_assembler.h"
35#include "cs_param_cdo.h"
36#include "cs_param_types.h"
37#include "cs_range_set.h"
38#include "cs_sdm.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/*============================================================================
45 * Macro definitions
46 *============================================================================*/
47
48/*============================================================================
49 * Type definitions
50 *============================================================================*/
51
52typedef struct _cs_cdo_assembly_t cs_cdo_assembly_t;
53
54/*============================================================================
55 * Function pointer type definitions
56 *============================================================================*/
57
58/*----------------------------------------------------------------------------*/
69/*----------------------------------------------------------------------------*/
70
71typedef void
72(cs_cdo_assembly_func_t)(const cs_sdm_t *m,
73 const cs_lnum_t *dof_ids,
74 const cs_range_set_t *rset,
77
78/*============================================================================
79 * Public function prototypes
80 *============================================================================*/
81
82/*----------------------------------------------------------------------------*/
91/*----------------------------------------------------------------------------*/
92
94cs_cdo_assembly_get(int t_id);
95
96/*----------------------------------------------------------------------------*/
106/*----------------------------------------------------------------------------*/
107
108void
109cs_cdo_assembly_init(int ddim,
110 int edim,
111 int n_cw_dofs);
112
113/*----------------------------------------------------------------------------*/
118/*----------------------------------------------------------------------------*/
119
120void
122
123/*----------------------------------------------------------------------------*/
133/*----------------------------------------------------------------------------*/
134
135void
137 cs_lnum_t l_row_shift,
138 cs_lnum_t l_col_shift);
139
140/*----------------------------------------------------------------------------*/
152/*----------------------------------------------------------------------------*/
153
154void
156 const cs_lnum_t *dof_ids,
157 const cs_range_set_t *rset,
160
161/*----------------------------------------------------------------------------*/
173/*----------------------------------------------------------------------------*/
174
175void
176cs_cdo_assembly_matrix_e33_generic(const cs_sdm_t *m,
177 const cs_lnum_t *dof_ids,
178 const cs_range_set_t *rset,
181
182#if defined(HAVE_MPI)
183/*----------------------------------------------------------------------------*/
194/*----------------------------------------------------------------------------*/
195
196void
197cs_cdo_assembly_matrix_mpit(const cs_sdm_t *m,
198 const cs_lnum_t *dof_ids,
199 const cs_range_set_t *rset,
202
203/*----------------------------------------------------------------------------*/
214/*----------------------------------------------------------------------------*/
215
216void
217cs_cdo_assembly_matrix_mpis(const cs_sdm_t *m,
218 const cs_lnum_t *dof_ids,
219 const cs_range_set_t *rset,
222#endif /* defined(HAVE_MPI) */
223
224/*----------------------------------------------------------------------------*/
235/*----------------------------------------------------------------------------*/
236
237void
238cs_cdo_assembly_matrix_seqt(const cs_sdm_t *m,
239 const cs_lnum_t *dof_ids,
240 const cs_range_set_t *rset,
243
244/*----------------------------------------------------------------------------*/
256/*----------------------------------------------------------------------------*/
257
258void
259cs_cdo_assembly_matrix_seqs(const cs_sdm_t *m,
260 const cs_lnum_t *dof_ids,
261 const cs_range_set_t *rset,
264
265/*----------------------------------------------------------------------------*/
278/*----------------------------------------------------------------------------*/
279
280void
281cs_cdo_assembly_matrix_sys_seqs(const cs_sdm_t *m,
282 const cs_lnum_t *dof_ids,
283 const cs_range_set_t *rset,
286
287/*----------------------------------------------------------------------------*/
300/*----------------------------------------------------------------------------*/
301
302void
303cs_cdo_assembly_matrix_sys_seqt(const cs_sdm_t *m,
304 const cs_lnum_t *dof_ids,
305 const cs_range_set_t *rset,
308
309#if defined(HAVE_MPI)
310/*----------------------------------------------------------------------------*/
321/*----------------------------------------------------------------------------*/
322
323void
324cs_cdo_assembly_matrix_sys_mpis(const cs_sdm_t *m,
325 const cs_lnum_t *dof_ids,
326 const cs_range_set_t *rset,
329#endif /* HAVE_MPI */
330
331/*----------------------------------------------------------------------------*/
343/*----------------------------------------------------------------------------*/
344
345void
347 const cs_lnum_t *dof_ids,
348 const cs_range_set_t *rset,
351
352/*----------------------------------------------------------------------------*/
364/*----------------------------------------------------------------------------*/
365
366void
368 const cs_lnum_t *dof_ids,
369 const cs_range_set_t *rset,
372
373#if defined(HAVE_MPI)
374/*----------------------------------------------------------------------------*/
386/*----------------------------------------------------------------------------*/
387
388void
389cs_cdo_assembly_eblock33_matrix_mpis(const cs_sdm_t *m,
390 const cs_lnum_t *dof_ids,
391 const cs_range_set_t *rset,
394
395/*----------------------------------------------------------------------------*/
407/*----------------------------------------------------------------------------*/
408
409void
410cs_cdo_assembly_eblock33_matrix_mpit(const cs_sdm_t *m,
411 const cs_lnum_t *dof_ids,
412 const cs_range_set_t *rset,
415#endif /* defined(HAVE_MPI) */
416
417/*----------------------------------------------------------------------------*/
429/*----------------------------------------------------------------------------*/
430
431void
433 const cs_lnum_t *dof_ids,
434 const cs_range_set_t *rset,
437
438/*----------------------------------------------------------------------------*/
450/*----------------------------------------------------------------------------*/
451
452void
454 const cs_lnum_t *dof_ids,
455 const cs_range_set_t *rset,
458
459#if defined(HAVE_MPI)
460/*----------------------------------------------------------------------------*/
472/*----------------------------------------------------------------------------*/
473
474void
475cs_cdo_assembly_block33_matrix_mpis(const cs_sdm_t *m,
476 const cs_lnum_t *dof_ids,
477 const cs_range_set_t *rset,
480
481/*----------------------------------------------------------------------------*/
493/*----------------------------------------------------------------------------*/
494
495void
496cs_cdo_assembly_block33_matrix_mpit(const cs_sdm_t *m,
497 const cs_lnum_t *dof_ids,
498 const cs_range_set_t *rset,
501#endif /* defined(HAVE_MPI) */
502
503/*----------------------------------------------------------------------------*/
515/*----------------------------------------------------------------------------*/
516
517void
518cs_cdo_assembly_eblock_matrix_seqs(const cs_sdm_t *m,
519 const cs_lnum_t *dof_ids,
520 const cs_range_set_t *rset,
523
524/*----------------------------------------------------------------------------*/
536/*----------------------------------------------------------------------------*/
537
538void
539cs_cdo_assembly_eblock_matrix_seqt(const cs_sdm_t *m,
540 const cs_lnum_t *dof_ids,
541 const cs_range_set_t *rset,
544
545#if defined(HAVE_MPI)
546/*----------------------------------------------------------------------------*/
558/*----------------------------------------------------------------------------*/
559
560void
561cs_cdo_assembly_eblock_matrix_mpis(const cs_sdm_t *m,
562 const cs_lnum_t *dof_ids,
563 const cs_range_set_t *rset,
566
567/*----------------------------------------------------------------------------*/
579/*----------------------------------------------------------------------------*/
580
581void
582cs_cdo_assembly_eblock_matrix_mpit(const cs_sdm_t *m,
583 const cs_lnum_t *dof_ids,
584 const cs_range_set_t *rset,
587#endif /* defined(HAVE_MPI) */
588
589/*----------------------------------------------------------------------------*/
590
592
593#endif /* __CS_CDO_ASSEMBLY_H__ */
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.
Definition cs_cdo_assembly.c:1221
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...
Definition cs_cdo_assembly.c:1515
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.
Definition cs_cdo_assembly.c:1301
struct _cs_cdo_assembly_t cs_cdo_assembly_t
Definition cs_cdo_assembly.h:52
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 (...
Definition cs_cdo_assembly.c:1751
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.
Definition cs_cdo_assembly.h:72
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 equ...
Definition cs_cdo_assembly.c:1867
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 equ...
Definition cs_cdo_assembly.c:1799
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....
Definition cs_cdo_assembly.c:2098
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....
Definition cs_cdo_assembly.c:2409
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....
Definition cs_cdo_assembly.c:2663
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 struct...
Definition cs_cdo_assembly.c:1242
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....
Definition cs_cdo_assembly.c:2333
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 thr...
Definition cs_cdo_assembly.c:1699
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....
Definition cs_cdo_assembly.c:2028
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....
Definition cs_cdo_assembly.c:2746
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...
Definition cs_cdo_assembly.c:1329
void cs_cdo_assembly_finalize(void)
Free matrix-related structures used during the simulation. Display overall statistic about the assemb...
Definition cs_cdo_assembly.c:1278
#define BEGIN_C_DECLS
Definition cs_defs.h:509
#define END_C_DECLS
Definition cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:313
struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t
Definition cs_matrix_assembler.h:65
Definition cs_range_set.h:57