8.3
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-2024 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 "cs_base.h"
35#include "cs_cdo_connect.h"
36#include "cs_cdo_local.h"
37#include "cs_property.h"
38#include "cs_sdm.h"
39#include "cs_xdef.h"
40
41/*----------------------------------------------------------------------------*/
42
44
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
49/*============================================================================
50 * Type definitions
51 *============================================================================*/
52
53/* Cellwise builder for MAC-fb discretization */
54typedef struct {
55
56 /* Cell informations */
57
60 short int n_dofs;
62 short int n_max_dofs;
64 cs_lnum_t dof_ids[30];
66 /* Face informations */
67
68 short int n_fc;
70 cs_lnum_t f_ids[30];
73 short int f_sgn_axis[6];
75 cs_real_t f_vol_cv[6];
76 cs_real_t f_h_cv[6];
77 short int f_opp_idx[6];
80 short int f2f_idx[24];
85 cs_lnum_t f2f_ids[24];
90 short int f2fo_idx[48];
95 cs_real_t f2f_h[24];
97 cs_real_t f2f_surf_cv_c[24];
100 cs_lnum_t f2e_ids[24];
102 cs_real_t dir_values[24];
105
106/*============================================================================
107 * Global variables
108 *============================================================================*/
109
110/* Pointer of pointers to global structures */
111
113
114/*============================================================================
115 * Public function prototypes
116 *============================================================================*/
117
118/*----------------------------------------------------------------------------*/
122/*----------------------------------------------------------------------------*/
123
125
126/*----------------------------------------------------------------------------*/
130/*----------------------------------------------------------------------------*/
131
133
134/*----------------------------------------------------------------------------*/
142/*----------------------------------------------------------------------------*/
143
145
146/*----------------------------------------------------------------------------*/
152/*----------------------------------------------------------------------------*/
153
155
156/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
165
166/*----------------------------------------------------------------------------*/
172/*----------------------------------------------------------------------------*/
173
175
176/*----------------------------------------------------------------------------*/
185/*----------------------------------------------------------------------------*/
186
188 const cs_cdo_connect_t *connect,
189 const cs_cdo_quantities_t *quant,
190 cs_macfb_builder_t *macb);
191
192/*----------------------------------------------------------------------------*/
198/*----------------------------------------------------------------------------*/
199
201
202/*----------------------------------------------------------------------------*/
203
205
206#endif /* __CS_MACFB_BUILDER_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
cs_flag_cartesian_axis_t
Definition: cs_flag.h:307
void cs_macfb_builder_free(cs_macfb_builder_t **p_builder)
Free a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:189
void cs_macfb_builder_dump(const cs_macfb_builder_t *macb)
Dump a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:493
void cs_macfb_builder_finalize(void)
Free global structures related to cs_macfb_builder_t.
Definition: cs_macfb_builder.cpp:136
void cs_macfb_builder_initialize(void)
Allocate global structures used for MAC builder.
Definition: cs_macfb_builder.cpp:103
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:211
cs_macfb_builder_t * cs_macfb_builder_create(void)
Allocate a cs_macfb_builder_t structure.
Definition: cs_macfb_builder.cpp:169
cs_macfb_builder_t ** cs_mac_builders
Definition: cs_macfb_builder.cpp:76
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:275
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:253
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
Definition: cs_macfb_builder.h:54
short int n_dofs
Definition: cs_macfb_builder.h:60
cs_lnum_t c_id
Definition: cs_macfb_builder.h:58
short int n_fc
Definition: cs_macfb_builder.h:68
short int n_max_dofs
Definition: cs_macfb_builder.h:62