8.3
general documentation
cs_parameters_check.h
Go to the documentation of this file.
1#ifndef __CS_PARAMETERS_CHECK_H__
2#define __CS_PARAMETERS_CHECK_H__
3
4/*============================================================================
5 * Log field and other array statistics at relevant time steps.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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
40/*----------------------------------------------------------------------------*/
41
43
44/*============================================================================
45 * type definitions
46 *============================================================================*/
47
48/*----------------------------------------------------------------------------*/
49
52typedef enum {
53
60
61/*============================================================================
62 * Public function prototypes
63 *============================================================================*/
64
65/*----------------------------------------------------------------------------*/
75/*----------------------------------------------------------------------------*/
76
77#if defined(__GNUC__)
78
79void
81 const char *section_desc,
82 const char *format,
83 ...)
84 __attribute__((format(printf, 3, 4)));
85
86#else
87
88void
90 const char *section_desc,
91 const char *format,
92 ...);
93
94#endif
95
96/*----------------------------------------------------------------------------*/
104/*----------------------------------------------------------------------------*/
105
106void
108 const char *section_desc);
109
110/*----------------------------------------------------------------------------*/
116/*----------------------------------------------------------------------------*/
117
118void
120
121/*----------------------------------------------------------------------------*/
133/*----------------------------------------------------------------------------*/
134
135void
137 const char *section_desc,
138 const char *param_name,
139 int param_value,
140 int range_l,
141 int range_u);
142
143/*----------------------------------------------------------------------------*/
156/*----------------------------------------------------------------------------*/
157
158void
160 const char *section_desc,
161 const char *param_name,
162 int param_value,
163 int range_l,
164 int range_u);
165
166/*----------------------------------------------------------------------------*/
180/*----------------------------------------------------------------------------*/
181
182void
184 const char *section_desc,
185 const char *param_name,
186 int param_value,
187 int enum_size,
188 const int *enum_values,
189 const char *enum_names[]);
190
191/*----------------------------------------------------------------------------*/
206/*----------------------------------------------------------------------------*/
207
208void
210 const char *section_desc,
211 const char *param_name,
212 int param_value,
213 int enum_size,
214 const int *enum_values,
215 const char *enum_names[]);
216
217/*----------------------------------------------------------------------------*/
228/*----------------------------------------------------------------------------*/
229
230void
232 const char *section_desc,
233 const char *param_name,
234 int param_value,
235 int std_value);
236
237/*----------------------------------------------------------------------------*/
248/*----------------------------------------------------------------------------*/
249
250void
252 const char *section_desc,
253 const char *param_name,
254 int param_value,
255 int fbd_value);
256
257/*----------------------------------------------------------------------------*/
267/*----------------------------------------------------------------------------*/
268
269void
271 const char *section_desc,
272 const char *param_name,
273 int param_value);
274
275/*----------------------------------------------------------------------------*/
286/*----------------------------------------------------------------------------*/
287
288void
290 const char *section_desc,
291 const char *param_name,
292 int param_value,
293 int ib_value);
294
295/*----------------------------------------------------------------------------*/
307/*----------------------------------------------------------------------------*/
308
309void
311 const char *section_desc,
312 const char *param_name,
313 double param_value,
314 double range_l,
315 double range_u);
316
317/*----------------------------------------------------------------------------*/
330/*----------------------------------------------------------------------------*/
331
332void
334 const char *section_desc,
335 const char *param_name,
336 double param_value,
337 int enum_size,
338 const double *enum_values,
339 const char *enum_names[]);
340
341/*----------------------------------------------------------------------------*/
352/*----------------------------------------------------------------------------*/
353
354void
356 const char *section_desc,
357 const char *param_name,
358 double param_value,
359 double std_value);
360
361/*----------------------------------------------------------------------------*/
372/*----------------------------------------------------------------------------*/
373
374void
376 const char *section_desc,
377 const char *param_name,
378 double param_value,
379 double ib_value);
380
381/*----------------------------------------------------------------------------*/
385/*----------------------------------------------------------------------------*/
386
387void
389
390/*----------------------------------------------------------------------------
391!
392 * \brief Check data settings
393 */
394/*----------------------------------------------------------------------------*/
395
396void
398
399/*----------------------------------------------------------------------------*/
400
402
403#endif /* __CS_PARAMETERS_CHECK_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
void cs_parameters_is_not_equal_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int fbd_value)
Check that a given integer keyword is not equal to a specified value.
Definition: cs_parameters_check.cpp:539
void cs_parameters_error_footer(cs_parameter_error_behavior_t err_behavior)
Print footer for a given parameters error message type.
Definition: cs_parameters_check.cpp:257
void cs_parameters_is_equal_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int std_value)
Check that a given integer keyword is equal to a specified value.
Definition: cs_parameters_check.cpp:496
void cs_parameters_error_barrier(void)
Abort if the the parameter errors count is nonzero.
Definition: cs_parameters_check.cpp:809
void cs_parameters_is_in_range_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int range_l, int range_u)
Check that a given integer keyword has values in a specified range.
Definition: cs_parameters_check.cpp:280
cs_parameter_error_behavior_t
Definition: cs_parameters_check.h:52
@ CS_WARNING
Definition: cs_parameters_check.h:54
@ CS_ABORT_DELAYED
Definition: cs_parameters_check.h:55
@ CS_ABORT_IMMEDIATE
Definition: cs_parameters_check.h:57
void cs_parameters_is_positive_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value)
Check that a given integer keyword is strictly positive.
Definition: cs_parameters_check.cpp:573
void cs_parameters_is_in_list_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int enum_size, const int *enum_values, const char *enum_names[])
Check that a given integer keyword has values in a specified range.
Definition: cs_parameters_check.cpp:357
void cs_parameters_error(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *format,...)
Print general parameters error or warning info.
Definition: cs_parameters_check.cpp:190
void cs_parameters_is_in_list_double(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, int enum_size, const double *enum_values, const char *enum_names[])
Check that a given double keyword has values in a specified list.
Definition: cs_parameters_check.cpp:681
void cs_parameters_is_not_in_list_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int enum_size, const int *enum_values, const char *enum_names[])
Check that a given integer keyword does not have values in a specified list.
Definition: cs_parameters_check.cpp:426
void cs_parameters_is_equal_double(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double std_value)
Check that a given double keyword is equal to a specified value.
Definition: cs_parameters_check.cpp:738
void cs_parameters_is_greater_double(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double ib_value)
Check that a given double keyword is greater than a specified value.
Definition: cs_parameters_check.cpp:781
void cs_parameters_is_not_in_range_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int range_l, int range_u)
Check that a given integer keyword has not values in a specified range.
Definition: cs_parameters_check.cpp:318
void cs_parameters_check(void)
Check computation parameters after user modification.
Definition: cs_parameters_check.cpp:833
void cs_parameters_is_in_range_double(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double range_l, double range_u)
Check that a given double keyword has values in a specified range.
Definition: cs_parameters_check.cpp:643
void cs_parameters_is_greater_int(cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int ib_value)
Check that a given int keyword is greater than a specified value.
Definition: cs_parameters_check.cpp:607
void cs_parameters_error_header(cs_parameter_error_behavior_t err_behavior, const char *section_desc)
Print header for a given parameters error message type.
Definition: cs_parameters_check.cpp:220