9.2
general documentation
cs_macfb_builder.h
Go to the documentation of this file.
1#ifndef CS_MACFB_BUILDER_H
2#define CS_MACFB_BUILDER_H
3
4/*============================================================================
5 * Low-level functions and structures used to build the algebraic system with
6 * a cellwise process when MAC-fb schemes are set for the space
7 * discretization
8 *============================================================================*/
9
10/*
11 This file is part of code_saturne, a general-purpose CFD tool.
12
13 Copyright (C) 1998-2026 EDF S.A.
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23 details.
24
25 You should have received a copy of the GNU General Public License along with
26 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27 Street, Fifth Floor, Boston, MA 02110-1301, USA.
28*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "base/cs_base.h"
35#include "cdo/cs_cdo_connect.h"
36#include "cdo/cs_cdo_local.h"
37#include "cdo/cs_property.h"
38#include "cdo/cs_sdm.h"
39#include "cdo/cs_xdef.h"
40
41/*============================================================================
42 * Macro definitions
43 *============================================================================*/
44
45/*============================================================================
46 * Type definitions
47 *============================================================================*/
48
49/* Cellwise builder for MAC-fb discretization */
50typedef struct {
51 /* Cell informations */
52
55 short int n_dofs;
57 short int n_max_dofs;
59 cs_lnum_t dof_ids[30];
61 /* Face informations */
62
63 short int n_fc;
65 cs_lnum_t f_ids[30];
68 short int f_sgn_axis[6];
70 cs_real_t f_vol_cv[6];
71 cs_real_t f_h_cv[6];
72 short int f_opp_idx[6];
75 short int f2f_idx[6][4];
80 cs_lnum_t f2f_ids[6][4];
85 short int f2fo_idx[6][4][2];
90 cs_real_t f2f_h[6][4];
92 cs_real_t f2f_surf_cv_c[6][4];
95 cs_lnum_t f2e_ids[6][4];
97 cs_real_t dir_values[6][4];
100
101/*============================================================================
102 * Global variables
103 *============================================================================*/
104
105/* Pointer of pointers to global structures */
106
108
109/*============================================================================
110 * Public function prototypes
111 *============================================================================*/
112
113/*----------------------------------------------------------------------------*/
117/*----------------------------------------------------------------------------*/
118
119void
121
122/*----------------------------------------------------------------------------*/
126/*----------------------------------------------------------------------------*/
127
128void
130
131/*----------------------------------------------------------------------------*/
139/*----------------------------------------------------------------------------*/
140
143
144/*----------------------------------------------------------------------------*/
150/*----------------------------------------------------------------------------*/
151
154
155/*----------------------------------------------------------------------------*/
161/*----------------------------------------------------------------------------*/
162
163void
165
166/*----------------------------------------------------------------------------*/
172/*----------------------------------------------------------------------------*/
173
174void
176
177/*----------------------------------------------------------------------------*/
186/*----------------------------------------------------------------------------*/
187
188void
190 const cs_cdo_connect_t *connect,
191 const cs_cdo_quantities_t *quant,
192 cs_macfb_builder_t *macb);
193
194/*----------------------------------------------------------------------------*/
200/*----------------------------------------------------------------------------*/
201
202void
204
205#endif /* CS_MACFB_BUILDER_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
cs_flag_cartesian_axis_t
Definition: cs_flag.h:305
void cs_macfb_builder_free(cs_macfb_builder_t **p_builder)
Free a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:203
void cs_macfb_builder_dump(const cs_macfb_builder_t *macb)
Dump a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:522
void cs_macfb_builder_finalize(void)
Free global structures related to cs_macfb_builder_t.
Definition: cs_macfb_builder.cpp:150
void cs_macfb_builder_initialize(void)
Allocate global structures used for MAC builder.
Definition: cs_macfb_builder.cpp:100
void cs_macfb_builder_reset(cs_macfb_builder_t *macb)
Initialize to invalid values a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:225
cs_macfb_builder_t * cs_macfb_builder_create(void)
Allocate a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:183
cs_macfb_builder_t ** cs_mac_builders
Definition: cs_macfb_builder.cpp:73
void cs_macfb_builder_cellwise_setup(const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_macfb_builder_t *macb)
Set-up face informations needed to build operators.
Definition: cs_macfb_builder.cpp:290
cs_macfb_builder_t * cs_macfb_get_builder(int id)
Get a pointer to a cs_macfb_builder_t structure corresponding to id.
Definition: cs_macfb_builder.cpp:268
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:242
Definition: cs_macfb_builder.h:50
short int n_dofs
Definition: cs_macfb_builder.h:55
cs_lnum_t c_id
Definition: cs_macfb_builder.h:53
short int n_fc
Definition: cs_macfb_builder.h:63
short int n_max_dofs
Definition: cs_macfb_builder.h:57