1 #ifndef __CS_ZONE_H__
2 #define __CS_ZONE_H__
3 
4 /*============================================================================
5  * Base zones handling.
6  *============================================================================*/
7 
8 /*
9   This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11   Copyright (C) 1998-2021 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  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * Local headers
36  *----------------------------------------------------------------------------*/
37 
38 #include "cs_base.h"
39 #include "cs_mesh_location.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
43 BEGIN_C_DECLS
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /*============================================================================
50  * Type definitions
51  *============================================================================*/
52 
53 /*! Zone description */
54 
55 typedef struct {
56 
57   const char       *name;                /*!< zone name */
58 
59   int               id;                  /*!< boundary zone id */
60   int               type;                /*!< boundary zone type flag */
61 
62   int               location_id;         /*!< associated mesh location id */
63 
64   cs_lnum_t         n_elts;              /*!< local number of elements */
65   const cs_lnum_t  *elt_ids;             /*!< associated element ids */
66 
67   bool              time_varying;        /*!< does the selected zone change
68                                            with time ? */
69 
70   bool              allow_overlay;       /*!< allow overlaying of this zone ? */
71 
72   cs_gnum_t         n_g_elts;            /*!< global number of elements */
73 
74   cs_real_t         measure;             /*!< Geometrical measure of the zone */
75   cs_real_t         f_measure;           /*!< Fluid measure of the zone */
76 
77   cs_real_t         boundary_measure;    /*!< Boundary geometrical measure of
78                                            the zone */
79   cs_real_t         f_boundary_measure;  /*!< Fluid boundary measure
80                                            of the zone */
81   cs_real_t         cog[3];              /*!< Center of gravity of the zone */
82 
83 } cs_zone_t;
84 
85 /*! Boundary zone description
86   *
87   * \deprecated  use cs_zone_t instead.
88   */
89 
90 typedef struct {
91 
92   const char       *name;           /*!< zone name */
93 
94   int               id;             /*!< boundary zone id */
95   int               type;           /*!< boundary zone type flag */
96 
97   int               location_id;    /*!< associated mesh location id */
98 
99   cs_lnum_t         n_faces;        /*!< local number of associated faces */
100   const cs_lnum_t  *face_ids;       /*!< associated face ids */
101 
102 
103   bool              time_varying;   /*!< does the selected zone change
104                                       with time ? */
105   bool              allow_overlay;  /*!< allow overlaying of this zone ? */
106 
107 } cs_boundary_zone_t;
108 
109 /*! Volume zone description
110   *
111   * \deprecated  use cs_zone_t instead.
112   */
113 
114 typedef struct {
115 
116   const char       *name;           /*!< zone name */
117 
118   int               id;             /*!< volume zone id */
119   int               type;           /*!< volume zone type flag */
120 
121   int               location_id;    /*!< associated mesh location id */
122 
123   cs_lnum_t         n_cells;        /*!< local number of associated cells */
124   const cs_lnum_t  *cell_ids;       /*!< associated cell ids */
125 
126 
127   bool              time_varying;   /*!< does the selected zone change
128                                       with time ? */
129   bool              allow_overlay;  /*!< allow overlaying of this zone ? */
130 
131 } cs_volume_zone_t;
132 
133 /*============================================================================
134  * Public function prototypes
135  *============================================================================*/
136 
137 /*----------------------------------------------------------------------------*/
138 
139 END_C_DECLS
140 
141 #endif /* __CS_ZONE_H__ */
142