9.2
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-2026 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 "base/cs_base.h"
39
40/*============================================================================
41 * type definitions
42 *============================================================================*/
43
44/*----------------------------------------------------------------------------*/
45
47typedef enum {
48
55
56/*============================================================================
57 * Public function prototypes
58 *============================================================================*/
59
60/*----------------------------------------------------------------------------*/
70/*----------------------------------------------------------------------------*/
71
72#if defined(__GNUC__)
73
74void
76 const char *section_desc,
77 const char *format,
78 ...)
79 __attribute__((format(printf, 3, 4)));
80
81#else
82
83void
85 const char *section_desc,
86 const char *format,
87 ...);
88
89#endif
90
91/*----------------------------------------------------------------------------*/
99/*----------------------------------------------------------------------------*/
100
101void
103 const char *section_desc);
104
105/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115
116/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
130void
132 const char *section_desc,
133 const char *param_name,
134 int param_value,
135 int range_l,
136 int range_u);
137
138/*----------------------------------------------------------------------------*/
151/*----------------------------------------------------------------------------*/
152
153void
155 const char *section_desc,
156 const char *param_name,
157 int param_value,
158 int range_l,
159 int range_u);
160
161/*----------------------------------------------------------------------------*/
175/*----------------------------------------------------------------------------*/
176
177void
179 const char *section_desc,
180 const char *param_name,
181 int param_value,
182 int enum_size,
183 const int *enum_values,
184 const char *enum_names[]);
185
186/*----------------------------------------------------------------------------*/
201/*----------------------------------------------------------------------------*/
202
203void
205 const char *section_desc,
206 const char *param_name,
207 int param_value,
208 int enum_size,
209 const int *enum_values,
210 const char *enum_names[]);
211
212/*----------------------------------------------------------------------------*/
223/*----------------------------------------------------------------------------*/
224
225void
227 const char *section_desc,
228 const char *param_name,
229 int param_value,
230 int std_value);
231
232/*----------------------------------------------------------------------------*/
243/*----------------------------------------------------------------------------*/
244
245void
247 const char *section_desc,
248 const char *param_name,
249 int param_value,
250 int fbd_value);
251
252/*----------------------------------------------------------------------------*/
262/*----------------------------------------------------------------------------*/
263
264void
266 const char *section_desc,
267 const char *param_name,
268 int param_value);
269
270/*----------------------------------------------------------------------------*/
281/*----------------------------------------------------------------------------*/
282
283void
285 const char *section_desc,
286 const char *param_name,
287 int param_value,
288 int ib_value);
289
290/*----------------------------------------------------------------------------*/
302/*----------------------------------------------------------------------------*/
303
304void
306 const char *section_desc,
307 const char *param_name,
308 double param_value,
309 double range_l,
310 double range_u);
311
312/*----------------------------------------------------------------------------*/
325/*----------------------------------------------------------------------------*/
326
327void
329 const char *section_desc,
330 const char *param_name,
331 double param_value,
332 int enum_size,
333 const double *enum_values,
334 const char *enum_names[]);
335
336/*----------------------------------------------------------------------------*/
347/*----------------------------------------------------------------------------*/
348
349void
351 const char *section_desc,
352 const char *param_name,
353 double param_value,
354 double std_value);
355
356/*----------------------------------------------------------------------------*/
367/*----------------------------------------------------------------------------*/
368
369void
371 const char *section_desc,
372 const char *param_name,
373 double param_value,
374 double ib_value);
375
376/*----------------------------------------------------------------------------*/
380/*----------------------------------------------------------------------------*/
381
382void
384
385/*----------------------------------------------------------------------------
386!
387 * \brief Check data settings
388 */
389/*----------------------------------------------------------------------------*/
390
391void
393
394/*----------------------------------------------------------------------------*/
395
396#endif /* CS_PARAMETERS_CHECK_H */
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:524
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:242
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:481
void cs_parameters_error_barrier(void)
Abort if the the parameter errors count is nonzero.
Definition: cs_parameters_check.cpp:794
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:265
cs_parameter_error_behavior_t
Definition: cs_parameters_check.h:47
@ CS_ABORT_DELAYED
Definition: cs_parameters_check.h:50
@ CS_WARNING
Definition: cs_parameters_check.h:49
@ CS_ABORT_IMMEDIATE
Definition: cs_parameters_check.h:52
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:558
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:342
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:175
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:666
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:411
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:723
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:766
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:303
void cs_parameters_check(void)
Check computation parameters after user modification.
Definition: cs_parameters_check.cpp:818
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:628
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:592
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:205