8.1
general documentation
cs_preprocessor_data.h
Go to the documentation of this file.
1 #ifndef __CS_PRE_PROCESSOR_DATA_H__
2 #define __CS_PRE_PROCESSOR_DATA_H__
3 
4 /*============================================================================
5  * Exchange of data between code_saturne Kernel and Preprocessor
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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 "fvm_io_num.h"
39 
40 #include "cs_base.h"
41 #include "cs_mesh.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
53 typedef enum {
54 
66 
67 /*============================================================================
68  * Public function prototypes for Fortran API
69  *============================================================================*/
70 
71 /*----------------------------------------------------------------------------
72  * Pass information relative to mesh metadata to the Fortran API
73  *
74  * Fortran Interface:
75  *
76  * subroutine ledevi(iperio, iperot)
77  * *****************
78  *
79  * integer iperio : <-- : Periodicity indicator
80  * integer iperot : <-- : Number of rotation periodicities
81  *----------------------------------------------------------------------------*/
82 
83 void
84 CS_PROCF(ledevi, LEDEVI)(int *iperio,
85  int *iperot);
86 
87 /*============================================================================
88  * Public function prototypes
89  *============================================================================*/
90 
91 /*----------------------------------------------------------------------------
92  * Define input mesh file to read.
93  *
94  * If this function is never called, the default file is read.
95  * The first time this function is called, this default is overriden by the
96  * defined file, and all subsequent calls define additional meshes to read.
97  *
98  * parameters:
99  * file_name <-- name of file to read
100  * n_group_renames <-- number of groups to rename
101  * group_rename <-- old (group_rename[i*2]) to new (group_rename[i*2 + 1])
102  * group names array (size: n_group_renames*2)
103  * transf_matrix <-- coordinate transformation matrix (or NULL)
104  *----------------------------------------------------------------------------*/
105 
106 void
107 cs_preprocessor_data_add_file(const char *file_name,
108  size_t n_group_renames,
109  const char **group_rename,
110  const double transf_matrix[3][4]);
111 
112 /*----------------------------------------------------------------------------
113  * Check for periodicity information in mesh meta-data.
114  *
115  * returns:
116  * 0 if no periodicity is present in mesh input,
117  * 1 for translation periodicity only,
118  * 2 for rotation or mixed periodicity
119  *----------------------------------------------------------------------------*/
120 
121 int
123 
124 /*----------------------------------------------------------------------------*/
130 /*----------------------------------------------------------------------------*/
131 
134 
135 /*----------------------------------------------------------------------------*/
144 /*----------------------------------------------------------------------------*/
145 
146 void
148 
149 /*----------------------------------------------------------------------------
150  * Read mesh meta-data.
151  *
152  * parameters:
153  * mesh <-- pointer to mesh structure
154  * mesh_builder <-- pointer to mesh builder structure
155  * ignore_cartesian <-- option to ignore cartesian blocks
156  *----------------------------------------------------------------------------*/
157 
158 void
160  cs_mesh_builder_t *mesh_builder,
161  bool ignore_cartesian);
162 
163 /*----------------------------------------------------------------------------
164  * Read pre-processor mesh data and finalize input.
165  *
166  * At this stage, ghost cells are not generated yet, so the interior
167  * face connectivity is not complete near parallel domain or periodic
168  * boundaries. Also, isolated faces, if present, are considered to be
169  * boundary faces, as they may participate in future mesh joining
170  * operations. Their matching cell number will be set to -1.
171  * Remaining isolated faces should be removed before completing
172  * the mesh structure.
173  *
174  * parameters:
175  * mesh <-- pointer to mesh structure
176  * mesh_builder <-- pointer to mesh builder structure
177  * ignore_cartesian <-- option to ignore cartesian blocks
178  *----------------------------------------------------------------------------*/
179 
180 void
182  cs_mesh_builder_t *mesh_builder,
183  bool ignore_cartesian);
184 
185 /*----------------------------------------------------------------------------*/
186 
188 
189 #endif /* __CS_PRE_PROCESSOR_DATA_H__ */
190 
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
#define CS_PROCF(x, y)
Definition: cs_defs.h:528
#define END_C_DECLS
Definition: cs_defs.h:515
cs_preprocessor_data_restart_mode_t
Definition: cs_preprocessor_data.h:53
@ CS_PREPROCESSOR_DATA_RESTART_NONE
Definition: cs_preprocessor_data.h:55
@ CS_PREPROCESSOR_DATA_RESTART_ONLY
Definition: cs_preprocessor_data.h:60
@ CS_PREPROCESSOR_DATA_RESTART_AND_MODIFY
Definition: cs_preprocessor_data.h:58
void cs_preprocessor_data_add_file(const char *file_name, size_t n_group_renames, const char **group_rename, const double transf_matrix[3][4])
Definition: cs_preprocessor_data.c:2245
void cs_preprocessor_data_read_headers(cs_mesh_t *mesh, cs_mesh_builder_t *mesh_builder, bool ignore_cartesian)
Definition: cs_preprocessor_data.c:2396
cs_preprocessor_data_restart_mode_t cs_preprocessor_data_get_restart_mode(void)
Return restart behavior for preprocessing.
Definition: cs_preprocessor_data.c:2198
void cs_preprocessor_data_read_mesh(cs_mesh_t *mesh, cs_mesh_builder_t *mesh_builder, bool ignore_cartesian)
Definition: cs_preprocessor_data.c:2468
int cs_preprocessor_check_perio(void)
Definition: cs_preprocessor_data.c:2355
void cs_preprocessor_data_set_restart_mode(cs_preprocessor_data_restart_mode_t mode)
Define restart behavior in case of restart.
Definition: cs_preprocessor_data.c:2218
void ledevi(int *iperio, int *iperot)
Definition: cs_preprocessor_data.c:2162
integer, save iperot
number of rotation periodicities. automaticly evaluated. default value is 0
Definition: period.f90:44
integer, save iperio
presence of periodicity.
Definition: period.f90:40
Definition: mesh.f90:26
Definition: cs_mesh_builder.h:57
Definition: cs_mesh.h:85