programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_cdo_connect.h
Go to the documentation of this file.
1 #ifndef __CS_CDO_CONNECT_H__
2 #define __CS_CDO_CONNECT_H__
3 
4 /*============================================================================
5  * Manage connectivity (Topological features of the mesh)
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_base.h"
35 #include "cs_cdo.h"
36 #include "cs_mesh.h"
37 #include "cs_mesh_adjacencies.h"
38 #include "cs_range_set.h"
39 
40 #include "fvm_defs.h"
41 
42 /*----------------------------------------------------------------------------*/
43 
45 
46 /*============================================================================
47  * Macro definitions
48  *============================================================================*/
49 
50 /*============================================================================
51  * Type definitions
52  *============================================================================*/
53 
54 /* Connectivity structure */
55 typedef struct {
56 
59  cs_lnum_t n_faces[3]; // 0: all, 1: border, 2: interior
61 
62  /* Edge-related members */
63  cs_adjacency_t *e2v; // edge --> vertices connectivity
64 
65  /* Face-related members */
66  cs_adjacency_t *f2c; // face --> cells connectivity
67  cs_adjacency_t *f2e; // face --> edges connectivity
68 
69  /* Cell-related members */
70  fvm_element_t *cell_type; // type of cell
71  cs_flag_t *cell_flag; // Flag (Border)
72  cs_adjacency_t *c2f; // cell --> faces connectivity
73  cs_adjacency_t *c2e; // cell --> edges connectivity
74  cs_adjacency_t *c2v; // cell --> vertices connectivity
75 
76  /* Delta of ids between the min./max. values of entities related to a cell
77  Useful to store compactly the link between mesh ids and cell mesh ids
78  needed during the cell mesh definition */
81 
82  /* Max. connectitivy size for cells */
83  int n_max_vbyc; // max. number of vertices in a cell
84  int n_max_ebyc; // max. number of edges in a cell
85  int n_max_fbyc; // max. number of faces in a cell
86  int n_max_vbyf; // max. number of vertices in a face
87  int n_max_v2fc; // max. number of faces connected to a vertex in a cell
88  int n_max_v2ec; // max. number of edges connected to a vertex in a cell
89 
90  /* Structures to handle parallelism */
91  const cs_range_set_t *v_rs; // range set related to vertices
92 
93  cs_range_set_t *f_rs; // range set related to faces
94  cs_interface_set_t *f_ifs; // interface set for faces
95 
96  cs_range_set_t *hho1_rs; // range for HHO k=1 schemes
97  cs_interface_set_t *hho1_ifs; // interface set HHO k=1 schemes
98  cs_range_set_t *hho2_rs; // range for HHO k=2 schemes
99  cs_interface_set_t *hho2_ifs; // interface set HHO k=2 schemes
100 
102 
103 /*============================================================================
104  * Global variables
105  *============================================================================*/
106 
107 /*============================================================================
108  * Public function prototypes
109  *============================================================================*/
110 
111 /*----------------------------------------------------------------------------*/
122 /*----------------------------------------------------------------------------*/
123 
126  cs_flag_t scheme_flag);
127 
128 /*----------------------------------------------------------------------------*/
136 /*----------------------------------------------------------------------------*/
137 
140 
141 /*----------------------------------------------------------------------------*/
147 /*----------------------------------------------------------------------------*/
148 
149 void
151 
152 /*----------------------------------------------------------------------------*/
159 /*----------------------------------------------------------------------------*/
160 
161 void
162 cs_cdo_connect_dump(const cs_cdo_connect_t *connect);
163 
164 /*----------------------------------------------------------------------------*/
165 
167 
168 #endif /* __CS_CDO_CONNECT_H__ */
const cs_range_set_t * v_rs
Definition: cs_cdo_connect.h:91
cs_lnum_t v_max_cell_range
Definition: cs_cdo_connect.h:80
cs_adjacency_t * c2v
Definition: cs_cdo_connect.h:74
cs_adjacency_t * e2v
Definition: cs_cdo_connect.h:63
Definition: cs_mesh_adjacencies.h:89
int n_max_vbyc
Definition: cs_cdo_connect.h:83
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
cs_adjacency_t * f2c
Definition: cs_cdo_connect.h:66
void cs_cdo_connect_dump(const cs_cdo_connect_t *connect)
Dump a cs_cdo_connect_t structure.
Definition: cs_cdo_connect.c:1110
fvm_element_t * cell_type
Definition: cs_cdo_connect.h:70
Definition: cs_cdo_connect.h:55
int n_max_vbyf
Definition: cs_cdo_connect.h:86
cs_lnum_t n_cells
Definition: cs_cdo_connect.h:60
int n_max_ebyc
Definition: cs_cdo_connect.h:84
cs_adjacency_t * f2e
Definition: cs_cdo_connect.h:67
Definition: cs_mesh.h:63
cs_range_set_t * hho1_rs
Definition: cs_cdo_connect.h:96
cs_lnum_t n_edges
Definition: cs_cdo_connect.h:58
cs_lnum_t n_vertices
Definition: cs_cdo_connect.h:57
cs_interface_set_t * hho2_ifs
Definition: cs_cdo_connect.h:99
cs_cdo_connect_t * cs_cdo_connect_free(cs_cdo_connect_t *connect)
Destroy a cs_cdo_connect_t structure.
Definition: cs_cdo_connect.c:1001
fvm_element_t
Definition: fvm_defs.h:48
cs_interface_set_t * hho1_ifs
Definition: cs_cdo_connect.h:97
cs_adjacency_t * c2e
Definition: cs_cdo_connect.h:73
cs_flag_t * cell_flag
Definition: cs_cdo_connect.h:71
cs_interface_set_t * f_ifs
Definition: cs_cdo_connect.h:94
int n_max_v2fc
Definition: cs_cdo_connect.h:87
Definition: cs_range_set.h:57
cs_range_set_t * f_rs
Definition: cs_cdo_connect.h:93
int n_max_v2ec
Definition: cs_cdo_connect.h:88
cs_cdo_connect_t * cs_cdo_connect_init(cs_mesh_t *mesh, cs_flag_t scheme_flag)
Allocate and define a new cs_cdo_connect_t structure Range sets related to vertices and faces are com...
Definition: cs_cdo_connect.c:879
struct _cs_interface_set_t cs_interface_set_t
Definition: cs_interface.h:61
cs_lnum_t e_max_cell_range
Definition: cs_cdo_connect.h:79
cs_range_set_t * hho2_rs
Definition: cs_cdo_connect.h:98
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
void cs_cdo_connect_summary(const cs_cdo_connect_t *connect)
Summary of connectivity information.
Definition: cs_cdo_connect.c:1040
#define END_C_DECLS
Definition: cs_defs.h:454
int n_max_fbyc
Definition: cs_cdo_connect.h:85
unsigned short int cs_flag_t
Definition: cs_defs.h:299
cs_adjacency_t * c2f
Definition: cs_cdo_connect.h:72