8.0
general documentation
Loading...
Searching...
No Matches
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-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 "cs_base.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/*============================================================================
45 * type definitions
46 *============================================================================*/
47
48/* Parameter check behavior when an error is detected */
49
57
58/*============================================================================
59 * Public function prototypes
60 *============================================================================*/
61
62/*----------------------------------------------------------------------------*/
72/*----------------------------------------------------------------------------*/
73
74#if defined(__GNUC__)
75
76void
78 const char *section_desc,
79 const char *format,
80 ...)
81 __attribute__((format(printf, 3, 4)));
82
83#else
84
85void
87 const char *section_desc,
88 const char *format,
89 ...);
90
91#endif
92
93/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104
105void
107 const char *section_desc,
108 const char *format,
109 ...);
110
111/*----------------------------------------------------------------------------*/
119/*----------------------------------------------------------------------------*/
120
121void
123 const char *section_desc);
124
125/*----------------------------------------------------------------------------*/
131/*----------------------------------------------------------------------------*/
132
133void
135
136/*----------------------------------------------------------------------------*/
148/*----------------------------------------------------------------------------*/
149
150void
152 const char *section_desc,
153 const char *param_name,
154 int param_value,
155 int range_l,
156 int range_u);
157
158/*----------------------------------------------------------------------------*/
171/*----------------------------------------------------------------------------*/
172
173void
175 const char *section_desc,
176 const char *param_name,
177 int param_value,
178 int range_l,
179 int range_u);
180
181/*----------------------------------------------------------------------------*/
195/*----------------------------------------------------------------------------*/
196
197void
199 const char *section_desc,
200 const char *param_name,
201 int param_value,
202 int enum_size,
203 const int *enum_values,
204 const char *enum_names[]);
205
206/*----------------------------------------------------------------------------*/
221/*----------------------------------------------------------------------------*/
222
223void
225 const char *section_desc,
226 const char *param_name,
227 int param_value,
228 int enum_size,
229 const int *enum_values,
230 const char *enum_names[]);
231
232/*----------------------------------------------------------------------------*/
243/*----------------------------------------------------------------------------*/
244
245void
247 const char *section_desc,
248 const char *param_name,
249 int param_value,
250 int std_value);
251
252/*----------------------------------------------------------------------------*/
263/*----------------------------------------------------------------------------*/
264
265void
267 const char *section_desc,
268 const char *param_name,
269 int param_value,
270 int fbd_value);
271
272/*----------------------------------------------------------------------------*/
282/*----------------------------------------------------------------------------*/
283
284void
286 const char *section_desc,
287 const char *param_name,
288 int param_value);
289
290/*----------------------------------------------------------------------------*/
301/*----------------------------------------------------------------------------*/
302
303void
305 const char *section_desc,
306 const char *param_name,
307 int param_value,
308 int ib_value);
309
310/*----------------------------------------------------------------------------*/
322/*----------------------------------------------------------------------------*/
323
324void
326 const char *section_desc,
327 const char *param_name,
328 double param_value,
329 double range_l,
330 double range_u);
331
332/*----------------------------------------------------------------------------*/
345/*----------------------------------------------------------------------------*/
346
347void
349 const char *section_desc,
350 const char *param_name,
351 double param_value,
352 int enum_size,
353 const double *enum_values,
354 const char *enum_names[]);
355
356/*----------------------------------------------------------------------------*/
367/*----------------------------------------------------------------------------*/
368
369void
371 const char *section_desc,
372 const char *param_name,
373 double param_value,
374 double std_value);
375
376/*----------------------------------------------------------------------------*/
387/*----------------------------------------------------------------------------*/
388
389void
391 const char *section_desc,
392 const char *param_name,
393 double param_value,
394 double ib_value);
395
396/*----------------------------------------------------------------------------*/
400/*----------------------------------------------------------------------------*/
401
402void
404
405/*----------------------------------------------------------------------------
406!
407 * \brief Check data settings
408 */
409/*----------------------------------------------------------------------------*/
410
411void
413
414/*----------------------------------------------------------------------------*/
415
417
418#endif /* __CS_PARAMETERS_CHECK_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:509
#define END_C_DECLS
Definition cs_defs.h:510
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.c:517
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.c:236
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.c:475
void cs_parameters_error_barrier(void)
Abort if the the parameter errors count is nonzero.
Definition cs_parameters_check.c:786
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.c:259
cs_parameter_error_behavior_t
Definition cs_parameters_check.h:50
@ CS_ABORT_DELAYED
Definition cs_parameters_check.h:53
@ CS_WARNING
Definition cs_parameters_check.h:52
@ CS_ABORT_IMMEDIATE
Definition cs_parameters_check.h:54
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.c:551
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.c:336
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.c:169
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.c:659
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.c:405
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.c:716
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.c:758
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.c:297
void cs_parameters_check(void)
Check computation parameters after user modification.
Definition cs_parameters_check.c:810
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.c:621
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.c:585
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.c:199