8.1
general documentation
cs_notebook.h
Go to the documentation of this file.
1 #ifndef __CS_NOTEBOOK_H__
2 #define __CS_NOTEBOOK_H__
3 
4 /*============================================================================
5  * Notebook management.
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  * Local headers
30  *----------------------------------------------------------------------------*/
31 
32 #include "cs_defs.h"
33 
34 /*----------------------------------------------------------------------------*/
35 
37 
38 /*----------------------------------------------------------------------------*/
42 /*----------------------------------------------------------------------------*/
43 
44 void
46 
47 /*----------------------------------------------------------------------------*/
56 /*----------------------------------------------------------------------------*/
57 
58 int
59 cs_notebook_parameter_is_present(const char *name,
60  int *editable);
61 
62 /*----------------------------------------------------------------------------*/
72 /*----------------------------------------------------------------------------*/
73 
75 cs_notebook_parameter_value_by_name(const char *name);
76 
77 /*----------------------------------------------------------------------------*/
86 /*----------------------------------------------------------------------------*/
87 
88 void
89 cs_notebook_parameter_set_value(const char *name,
90  cs_real_t val);
91 
92 /*----------------------------------------------------------------------------*/
106 /*----------------------------------------------------------------------------*/
107 
108 int
110 
111 /*----------------------------------------------------------------------------*/
119 /*----------------------------------------------------------------------------*/
120 
121 const char *
123 
124 /*----------------------------------------------------------------------------*/
132 /*----------------------------------------------------------------------------*/
133 
134 int
135 cs_notebook_parameter_get_id(const char *name);
136 
137 /*----------------------------------------------------------------------------*/
146 /*----------------------------------------------------------------------------*/
147 
148 void
150  const int ids[],
151  double values[]);
152 
153 /*----------------------------------------------------------------------------*/
162 /*----------------------------------------------------------------------------*/
163 
164 void
166  const int ids[],
167  const double values[]);
168 
169 /*----------------------------------------------------------------------------*/
175 /*----------------------------------------------------------------------------*/
176 
177 void
179 
180 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 void
188 
189 /*----------------------------------------------------------------------------*/
195 /*----------------------------------------------------------------------------*/
196 
197 int
198 cs_notebook_nb_var(void);
199 
200 /*----------------------------------------------------------------------------*/
210 /*----------------------------------------------------------------------------*/
211 
212 bool
213 cs_notebook_var_is_editable(const int ind);
214 
215 /*----------------------------------------------------------------------------*/
225 /*----------------------------------------------------------------------------*/
226 
227 bool
229 
230 /*----------------------------------------------------------------------------*/
237 /*----------------------------------------------------------------------------*/
238 
239 void
240 cs_notebook_var_change_editable(const int ind, const bool val);
241 
242 /*----------------------------------------------------------------------------*/
251 /*----------------------------------------------------------------------------*/
252 
253 char *
254 cs_notebook_name_by_id(const int ind);
255 
256 /*----------------------------------------------------------------------------*/
264 /*----------------------------------------------------------------------------*/
265 
266 void
268 
269 /*----------------------------------------------------------------------------*/
270 
272 
273 #endif /* __CS_NOTEBOOK_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_notebook_parameter_is_present(const char *name, int *editable)
Check if a parameter value is present.
Definition: cs_notebook.c:361
void cs_notebook_var_change_editable(const int ind, const bool val)
Change the editable property of the notebook parameter.
Definition: cs_notebook.c:672
void cs_notebook_uncertain_output(void)
Write uncertain values to output file.
Definition: cs_notebook.c:711
cs_real_t cs_notebook_parameter_value_by_name(const char *name)
Return a parameter value (real).
Definition: cs_notebook.c:393
void cs_notebook_get_values(int n, const int ids[], double values[])
Get a group of notebook variable values.
Definition: cs_notebook.c:494
void cs_notebook_log_setup(void)
Output the notebook info to the setup log.
Definition: cs_notebook.c:576
int cs_notebook_parameter_get_id(const char *name)
Get id associated with a notebook parameter.
Definition: cs_notebook.c:475
int cs_notebook_nb_var(void)
Number of notebook variables.
Definition: cs_notebook.c:615
void cs_notebook_parameter_set_value(const char *name, cs_real_t val)
Set a parameter value (real) for an editable parameter.
Definition: cs_notebook.c:411
bool cs_notebook_var_is_read_from_checkpoint(const int ind)
Indicate if the notebook parameter is read at restart.
Definition: cs_notebook.c:654
void cs_notebook_load_from_file(void)
Initialize the notebook object (based on cs_tree_node_t).
Definition: cs_notebook.c:282
int cs_notebook_parameter_get_openturns_status(char *name)
Indicate whether the parameter is used for a study with openturns.
Definition: cs_notebook.c:441
bool cs_notebook_var_is_editable(const int ind)
Indicate if the notebook parameter is editable.
Definition: cs_notebook.c:633
void cs_notebook_set_values(int n, const int ids[], const double values[])
Set a group of notebook variable values.
Definition: cs_notebook.c:519
void cs_notebook_destroy_all(void)
Destroy the notebook structure.
Definition: cs_notebook.c:546
char * cs_notebook_name_by_id(const int ind)
Get name of a notebook parameter based on its id.
Definition: cs_notebook.c:692
const char * cs_notebook_parameter_get_description(char *name)
Returns the description of the parameter (GUI defined).
Definition: cs_notebook.c:458