programmer's documentation
cs_restart.h
Go to the documentation of this file.
1 #ifndef __CS_RESTART_H__
2 #define __CS_RESTART_H__
3 
4 /*============================================================================
5  * Manage checkpoint / restart files
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 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_defs.h"
39 #include "cs_time_step.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /* Error codes */
50 
51 #define CS_RESTART_SUCCESS 0 /* Success */
52 #define CS_RESTART_ERR_FILE_NUM -1 /* No restart file for the given number */
53 #define CS_RESTART_ERR_LOCATION -2 /* Undefined location / incorrect size */
54 #define CS_RESTART_ERR_VAL_TYPE -3 /* Unknown or unexpected value type */
55 #define CS_RESTART_ERR_N_VALS -4 /* Number of values does not match */
56 #define CS_RESTART_ERR_MODE -5 /* Incompatible access mode */
57 #define CS_RESTART_ERR_EXISTS -6 /* Section not available */
58 
59 /*============================================================================
60  * Local type definitions
61  *============================================================================*/
62 
63 /* Read or write mode */
64 
65 typedef enum {
66 
67  CS_RESTART_MODE_READ, /* Read mode */
68  CS_RESTART_MODE_WRITE /* Write mode */
69 
71 
72 /* Datatype enumeration to transmit a data's type to a function */
73 
74 typedef enum {
80 
81 /*
82  Pointer associated with a restart file structure. The structure itself
83  is defined in "cs_restart.c", and is opaque outside that unit.
84 */
85 
86 typedef struct _cs_restart_t cs_restart_t;
87 
88 /*=============================================================================
89  * Global variables
90  *============================================================================*/
91 
92 /*============================================================================
93  * Public Fortran function prototypes
94  *============================================================================*/
95 
96 /*----------------------------------------------------------------------------
97  * Indicate if a restart directory is present.
98  *
99  * Fortran interface
100  *
101  * subroutine dflsui (ntsuit, ttsuit, wtsuit)
102  * *****************
103  *
104  * integer ntsuit : <-- : > 0: checkpoint time step interval
105  * : : 0: default interval
106  * : : -1: checkpoint at end
107  * : : -2: no checkpoint
108  * double precision ttsuit : <-- : if> 0, checkpoint time interval
109  * double precision wtsuit : <-- : if> 0, checkpoint wall time interval
110  *----------------------------------------------------------------------------*/
111 
112 void CS_PROCF (dflsui, DFLSUI)
113 (
114  cs_int_t *ntsuit,
115  cs_real_t *ttsuit,
116  cs_real_t *wtsuit
117 );
118 
119 /*----------------------------------------------------------------------------
120  * Check if checkpointing is recommended at a given time.
121  *
122  * Fortran interface
123  *
124  * subroutine reqsui (iisuit)
125  * *****************
126  *
127  * integer iisuit : --> : 0 if no restart required, 1 otherwise
128  *----------------------------------------------------------------------------*/
129 
130 void CS_PROCF (reqsui, REQSUI)
131 (
132  cs_int_t *iisuit
133 );
134 
135 /*----------------------------------------------------------------------------
136  * Indicate checkpointing has been done at a given time.
137  *
138  * This updates the status for future checks to determine
139  * if checkpointing is recommended at a given time.
140  *
141  * Fortran interface
142  *
143  * subroutine stusui
144  * *****************
145  *----------------------------------------------------------------------------*/
146 
147 void CS_PROCF (stusui, STUSUI)
148 (
149  void
150 );
151 
152 /*----------------------------------------------------------------------------
153  * Save output mesh for turbomachinery if needed
154  *
155  * Fortran interface
156  *
157  * subroutine trbsui
158  * *****************
159  *----------------------------------------------------------------------------*/
160 
161 void CS_PROCF (trbsui, TRBSUI)
162 (
163  void
164 );
165 
166 /*----------------------------------------------------------------------------
167  * Indicate if a restart directory is present.
168  *
169  * Fortran interface
170  *
171  * subroutine indsui (isuite)
172  * *****************
173  *
174  * integer isuite : --> : 1 for restart, 0 otherwise
175  *----------------------------------------------------------------------------*/
176 
177 void CS_PROCF (indsui, INDSUI)
178 (
180 );
181 
182 /*============================================================================
183  * Public function prototypes
184  *============================================================================*/
185 
186 /*----------------------------------------------------------------------------
187  * Define default checkpoint interval.
188  *
189  * parameters
190  * nt_interval <-- if > 0 time step interval for checkpoint
191  * if 0, default of 4 checkpoints per run
192  * if -1, checkpoint at end
193  * if -2, no checkpointing
194  * t_interval <-- if > 0, time value interval for checkpoint
195  * wt_interval <-- if > 0, wall-clock interval for checkpoints
196  *----------------------------------------------------------------------------*/
197 
198 void
199 cs_restart_checkpoint_set_defaults(int nt_interval,
200  double t_interval,
201  double wt_interval);
202 
203 /*----------------------------------------------------------------------------
204  * Define last forced checkpoint time step
205  *
206  * parameters
207  * nt_last <-- last time step for forced checkpoint
208  *----------------------------------------------------------------------------*/
209 
210 void
212 
213 /*----------------------------------------------------------------------------
214  * Define next forced checkpoint time step
215  *
216  * parameters
217  * nt_next <-- next time step for forced checkpoint
218  *----------------------------------------------------------------------------*/
219 
220 void
222 
223 /*----------------------------------------------------------------------------
224  * Define next forced checkpoint time value
225  *
226  * parameters
227  * t_next <-- next time value for forced checkpoint
228  *----------------------------------------------------------------------------*/
229 
230 void
231 cs_restart_checkpoint_set_next_tv(double t_next);
232 
233 /*----------------------------------------------------------------------------
234  * Define next forced checkpoint wall-clock time value
235  *
236  * parameters
237  * wt_next <-- next wall-clock time value for forced checkpoint
238  *----------------------------------------------------------------------------*/
239 
240 void
241 cs_restart_checkpoint_set_next_wt(double wt_next);
242 
243 /*----------------------------------------------------------------------------
244  * Check if checkpointing is recommended at a given time.
245  *
246  * parameters
247  * ts <-- time step status structure
248  *
249  * returns:
250  * true if checkpointing is recommended, 0 otherwise
251  *----------------------------------------------------------------------------*/
252 
253 bool
255 
256 /*----------------------------------------------------------------------------
257  * Indicate checkpointing has been done at a given time.
258  *
259  * This updates the status for future checks to determine
260  * if checkpointing is recommended at a given time.
261  *
262  * parameters
263  * ts <-- time step status structure
264  *----------------------------------------------------------------------------*/
265 
266 void
268 
269 /*----------------------------------------------------------------------------
270  * Check if we have a restart directory.
271  *
272  * returns:
273  * 1 if a restart directory is present, 0 otherwise.
274  *----------------------------------------------------------------------------*/
275 
276 int
277 cs_restart_present(void);
278 
279 /*----------------------------------------------------------------------------
280  * Initialize a restart file
281  *
282  * parameters:
283  * name <-- file name
284  * path <-- optional directory name for output
285  * (directory automatically created if necessary)
286  * mode <-- read or write
287  *
288  * returns:
289  * pointer to initialized restart file structure
290  *----------------------------------------------------------------------------*/
291 
292 cs_restart_t *
293 cs_restart_create(const char *name,
294  const char *path,
295  cs_restart_mode_t mode);
296 
297 /*----------------------------------------------------------------------------
298  * Destroy structure associated with a restart file (and close the file).
299  *
300  * parameters:
301  * restart <-- pointer to restart file structure pointer
302  *----------------------------------------------------------------------------*/
303 
304 void
306 
307 /*----------------------------------------------------------------------------
308  * Check the locations associated with a restart file.
309  *
310  * For each type of entity, the corresponding flag is set to true if the
311  * associated number of entities matches the current value (and so that we
312  * consider the mesh locations are the same), false otherwise.
313  *
314  * parameters:
315  * restart <-- associated restart file pointer
316  * match_cell <-- matching cells flag
317  * match_i_face <-- matching interior faces flag
318  * match_b_face <-- matching boundary faces flag
319  * match_vertex <-- matching vertices flag
320  *----------------------------------------------------------------------------*/
321 
322 void
324  bool *match_cell,
325  bool *match_i_face,
326  bool *match_b_face,
327  bool *match_vertex);
328 
329 /*----------------------------------------------------------------------------
330  * Add a location definition.
331  *
332  * parameters:
333  * restart <-- associated restart file pointer
334  * location_name <-- name associated with the location
335  * n_glob_ents <-- global number of entities
336  * n_ents <-- local number of entities
337  * ent_global_num <-- global entity numbers, or NULL
338  *
339  * returns:
340  * the location id assigned, or -1 in case of error
341  *----------------------------------------------------------------------------*/
342 
343 int
345  const char *location_name,
346  cs_gnum_t n_glob_ents,
347  cs_lnum_t n_ents,
348  const cs_gnum_t *ent_global_num);
349 
350 /*----------------------------------------------------------------------------
351  * Return name of restart file
352  *
353  * parameters:
354  * restart <-- associated restart file pointer
355  *
356  * returns:
357  * base name of restart file
358  *----------------------------------------------------------------------------*/
359 
360 const char *
361 cs_restart_get_name(const cs_restart_t *restart);
362 
363 /*----------------------------------------------------------------------------
364  * Print the index associated with a restart file in read mode
365  *
366  * parameters:
367  * restart <-- associated restart file pointer
368  *----------------------------------------------------------------------------*/
369 
370 void
371 cs_restart_dump_index(const cs_restart_t *restart);
372 
373 /*----------------------------------------------------------------------------
374  * Check the presence of a given section in a restart file.
375  *
376  * parameters:
377  * restart <-- associated restart file pointer
378  * sec_name <-- section name
379  * location_id <-- id of corresponding location
380  * n_location_vals <-- number of values per location (interlaced)
381  * val_type <-- value type
382  *
383  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
384  * or error code (CS_RESTART_ERR_xxx) in case of error
385  *----------------------------------------------------------------------------*/
386 
387 int
389  const char *sec_name,
390  int location_id,
391  int n_location_vals,
392  cs_restart_val_type_t val_type);
393 
394 /*----------------------------------------------------------------------------
395  * Read a section from a restart file.
396  *
397  * parameters:
398  * restart <-- associated restart file pointer
399  * sec_name <-- section name
400  * location_id <-- id of corresponding location
401  * n_location_vals <-- number of values per location (interlaced)
402  * val_type <-- value type
403  * val --> array of values
404  *
405  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
406  * or error code (CS_RESTART_ERR_xxx) in case of error
407  *----------------------------------------------------------------------------*/
408 
409 int
411  const char *sec_name,
412  int location_id,
413  int n_location_vals,
414  cs_restart_val_type_t val_type,
415  void *val);
416 
417 /*----------------------------------------------------------------------------
418  * Write a section to a restart file.
419  *
420  * parameters:
421  * restart <-- associated restart file pointer
422  * sec_name <-- section name
423  * location_id <-- id of corresponding location
424  * n_location_vals <-- number of values per location (interlaced)
425  * val_type <-- value type
426  * val <-- array of values
427  *----------------------------------------------------------------------------*/
428 
429 void
431  const char *sec_name,
432  int location_id,
433  int n_location_vals,
434  cs_restart_val_type_t val_type,
435  const void *val);
436 
437 /*----------------------------------------------------------------------------
438  * Read basic particles information from a restart file.
439  *
440  * This includes building a matching location and associated global numbering.
441  *
442  * parameters:
443  * restart <-- associated restart file pointer
444  * name <-- name of particles set
445  * n_particles --> number of particles, or NULL
446  *
447  * returns:
448  * the location id assigned to the particles, or -1 in case of error
449  *----------------------------------------------------------------------------*/
450 
451 int
453  const char *name,
454  cs_lnum_t *n_particles);
455 
456 /*----------------------------------------------------------------------------
457  * Read basic particles information from a restart file.
458  *
459  * parameters:
460  * restart <-- associated restart file pointer
461  * particles_location_id <-- location id of particles set
462  * particle_cell_id --> local cell id to which particles belong
463  * particle_coords --> local particle coordinates (interleaved)
464  *
465  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
466  * or error code (CS_RESTART_ERR_xxx) in case of error
467  *----------------------------------------------------------------------------*/
468 
469 int
471  int particles_location_id,
472  cs_lnum_t *particle_cell_id,
473  cs_real_t *particle_coords);
474 
475 /*----------------------------------------------------------------------------
476  * Write basic particles information to a restart file.
477  *
478  * This includes defining a matching location and associated global numbering,
479  * then writing particle coordinates and cell ids.
480  *
481  * parameters:
482  * restart <-- associated restart file pointer
483  * name <-- name of particles set
484  * number_by_coords <-- if true, numbering is based on current coordinates;
485  * otherwise, it is simply based on local numbers,
486  * plus the sum of particles on lower MPI ranks
487  * n_particles <-- local number of particles
488  * particle_cell_num <-- local cell number (1 to n) to which particles
489  * belong; 0 for untracked particles
490  * particle_coords <-- local particle coordinates (interleaved)
491  *
492  * returns:
493  * the location id assigned to the particles
494  *----------------------------------------------------------------------------*/
495 
496 int
498  const char *name,
499  bool number_by_coords,
500  cs_lnum_t n_particles,
501  const cs_lnum_t *particle_cell_num,
502  const cs_real_t *particle_coords);
503 
504 /*----------------------------------------------------------------------------
505  * Read a referenced location id section from a restart file.
506  *
507  * The section read from file contains the global ids matching the local
508  * element ids of a given location. Global id's are transformed to local
509  * ids by this function.
510  *
511  * In case global referenced ids read do not match those of local elements,
512  * id_base - 1 is assigned to the corresponding local ids.
513  *
514  * parameters:
515  * restart <-- associated restart file pointer
516  * sec_name <-- section name
517  * location_id <-- id of location on which id_ref is defined
518  * ref_location_id <-- id of referenced location
519  * ref_id_base <-- base of location entity id numbers (usually 0 or 1)
520  * ref_id --> array of location entity ids
521  *
522  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
523  * or error code (CS_RESTART_ERR_xxx) in case of error
524  *----------------------------------------------------------------------------*/
525 
526 int
528  const char *sec_name,
529  int location_id,
530  int ref_location_id,
531  cs_lnum_t ref_id_base,
532  cs_lnum_t *ref_id);
533 
534 /*----------------------------------------------------------------------------
535  * Write a referenced location id section to a restart file.
536  *
537  * The section written to file contains the global ids matching the
538  * local element ids of a given location.
539  *
540  * parameters:
541  * restart <-- associated restart file pointer
542  * sec_name <-- section name
543  * location_id <-- id of location on which id_ref is defined
544  * ref_location_id <-- id of referenced location
545  * ref_id_base <-- base of location entity id numbers (usually 0 or 1)
546  * ref_id <-- array of location entity ids
547  *----------------------------------------------------------------------------*/
548 
549 void
551  const char *sec_name,
552  int location_id,
553  int ref_location_id,
554  cs_lnum_t ref_id_base,
555  const cs_lnum_t *ref_id);
556 
557 /*----------------------------------------------------------------------------
558  * Read a section from a restart file, when that section may have used a
559  * different name in a previous version.
560  *
561  * parameters:
562  * restart <-- associated restart file pointer
563  * sec_name <-- section name
564  * location_id <-- id of corresponding location
565  * n_location_vals <-- number of values per location (interlaced)
566  * val_type <-- value type
567  * val --> array of values
568  *
569  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
570  * or error code (CS_RESTART_ERR_xxx) in case of error
571  *----------------------------------------------------------------------------*/
572 
573 int
575  const char *sec_name,
576  const char *old_name,
577  int location_id,
578  int n_location_vals,
579  cs_restart_val_type_t val_type,
580  void *val);
581 
582 /*----------------------------------------------------------------------------
583  * Read a cs_real_t section from a restart file, when that section may
584  * have used a different name in a previous version.
585  *
586  * parameters:
587  * restart <-- associated restart file pointer
588  * sec_name <-- section name
589  * location_id <-- id of corresponding location
590  * n_location_vals <-- number of values per location (interlaced)
591  * val --> array of values
592  *
593  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
594  * or error code (CS_RESTART_ERR_xxx) in case of error
595  *----------------------------------------------------------------------------*/
596 
597 int
599  const char *sec_name,
600  const char *old_name,
601  int location_id,
602  int n_location_vals,
603  cs_real_t *val);
604 
605 /*----------------------------------------------------------------------------
606  * Read a cs_real_3_t vector section from a restart file, when that
607  * section may have used a different name and been non-interleaved
608  * in a previous version.
609  *
610  * This file assumes a mesh-base location (i.e. location_id > 0)
611  *
612  * parameters:
613  * restart <-- associated restart file pointer
614  * sec_name <-- section name
615  * old_name_x <-- old name, x component
616  * old_name_y <-- old name, y component
617  * old_name_y <-- old name, z component
618  * location_id <-- id of corresponding location
619  * val --> array of values
620  *
621  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
622  * or error code (CS_RESTART_ERR_xxx) in case of error
623  *----------------------------------------------------------------------------*/
624 
625 int
627  const char *sec_name,
628  const char *old_name_x,
629  const char *old_name_y,
630  const char *old_name_z,
631  int location_id,
632  cs_real_3_t *val);
633 
634 /*----------------------------------------------------------------------------
635  * Read a cs_real_6_t vector section from a restart file, when that
636  * section may have used a different name and been non-interleaved
637  * in a previous version.
638  *
639  * This file assumes a mesh-base location (i.e. location_id > 0)
640  *
641  * parameters:
642  * restart <-- associated restart file pointer
643  * sec_name <-- section name
644  * old_name_xx <-- old name, xx component
645  * old_name_yy <-- old name, yy component
646  * old_name_zz <-- old name, zz component
647  * old_name_xy <-- old name, xy component
648  * old_name_yz <-- old name, xy component
649  * old_name_xz <-- old name, xy component
650  * location_id <-- id of corresponding location (> 0)
651  * val --> array of values
652  *
653  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
654  * or error code (CS_RESTART_ERR_xxx) in case of error
655  *----------------------------------------------------------------------------*/
656 
657 int
659  const char *sec_name,
660  const char *old_name_xx,
661  const char *old_name_yy,
662  const char *old_name_zz,
663  const char *old_name_xy,
664  const char *old_name_yz,
665  const char *old_name_xz,
666  int location_id,
667  cs_real_6_t *val);
668 
669 /*----------------------------------------------------------------------------
670  * Read a cs_real_66_t vector section from a restart file, when that
671  * section may have used a different name and been non-interleaved
672  * in a previous version.
673  *
674  * This file assumes a mesh-base location (i.e. location_id > 0)
675  *
676  * parameters:
677  * restart <-- associated restart file pointer
678  * sec_name <-- section name
679  * old_name_xx <-- old name, xx component
680  * old_name_yy <-- old name, yy component
681  * old_name_zz <-- old name, zz component
682  * old_name_xy <-- old name, xy component
683  * old_name_yz <-- old name, xy component
684  * old_name_xz <-- old name, xy component
685  * location_id <-- id of corresponding location (> 0)
686  * val --> array of values
687  *
688  * returns: 0 (CS_RESTART_SUCCESS) in case of success,
689  * or error code (CS_RESTART_ERR_xxx) in case of error
690  *----------------------------------------------------------------------------*/
691 
692 int
694  const char *sec_name,
695  const char *old_name_xx,
696  const char *old_name_yy,
697  const char *old_name_zz,
698  const char *old_name_xy,
699  const char *old_name_yz,
700  const char *old_name_xz,
701  int location_id,
702  cs_real_66_t *val);
703 
704 /*----------------------------------------------------------------------------
705  * Print statistics associated with restart files
706  *----------------------------------------------------------------------------*/
707 
708 void
710 
711 /*----------------------------------------------------------------------------*/
712 
714 
715 #endif /* __CS_RESTART_H__ */
Definition: cs_restart.h:78
int cs_restart_read_section(cs_restart_t *restart, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type, void *val)
Definition: cs_restart.c:1758
time step descriptor
Definition: cs_time_step.h:51
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:281
int cs_restart_write_particles(cs_restart_t *restart, const char *name, bool number_by_coords, cs_lnum_t n_particles, const cs_lnum_t *particle_cell_num, const cs_real_t *particle_coords)
Definition: cs_restart.c:2411
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:312
void cs_restart_dump_index(const cs_restart_t *restart)
Definition: cs_restart.c:1601
void cs_restart_checkpoint_done(const cs_time_step_t *ts)
Definition: cs_restart.c:1205
void cs_restart_checkpoint_set_defaults(int nt_interval, double t_interval, double wt_interval)
Definition: cs_restart.c:1065
void cs_restart_print_stats(void)
Definition: cs_restart.c:3196
cs_restart_t * cs_restart_create(const char *name, const char *path, cs_restart_mode_t mode)
Definition: cs_restart.c:1268
integer, save ntsuit
saving period of the restart filesy5
Definition: entsor.f90:72
cs_real_t cs_real_66_t[6][6]
6x6 matrix of floating-point values
Definition: cs_defs.h:317
Definition: cs_restart.h:76
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:296
void indsui(cs_int_t *isuite)
Definition: cs_restart.c:1041
void cs_restart_write_section(cs_restart_t *restart, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type, const void *val)
Definition: cs_restart.c:1981
cs_restart_mode_t
Definition: cs_restart.h:65
int cs_restart_read_real_t_compat(cs_restart_t *restart, const char *sec_name, const char *old_name, int location_id, int n_location_vals, cs_real_t *val)
const char * cs_restart_get_name(const cs_restart_t *restart)
Definition: cs_restart.c:1586
Definition: cs_restart.h:75
void reqsui(cs_int_t *iisuit)
Definition: cs_restart.c:982
int cs_restart_read_section_compat(cs_restart_t *restart, const char *sec_name, const char *old_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type, void *val)
Definition: cs_restart.c:2746
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
integer, save isuite
Indicator of a calculation restart (=1) or not (=0). This value is set automatically by the code; dep...
Definition: optcal.f90:338
int cs_restart_read_real_3_t_compat(cs_restart_t *restart, const char *sec_name, const char *old_name_x, const char *old_name_y, const char *old_name_z, int location_id, cs_real_3_t *val)
Definition: cs_restart.c:2822
int cs_restart_read_real_66_t_compat(cs_restart_t *restart, const char *sec_name, const char *old_name_xx, const char *old_name_yy, const char *old_name_zz, const char *old_name_xy, const char *old_name_yz, const char *old_name_xz, int location_id, cs_real_66_t *val)
Definition: cs_restart.c:3076
void cs_restart_checkpoint_set_last_ts(int nt_last)
Definition: cs_restart.c:1082
bool cs_restart_checkpoint_required(const cs_time_step_t *ts)
Definition: cs_restart.c:1137
int cs_restart_present(void)
Definition: cs_restart.c:1244
Definition: cs_restart.h:77
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:86
void stusui(void)
Definition: cs_restart.c:1005
void cs_restart_checkpoint_set_next_ts(int nt_next)
Definition: cs_restart.c:1095
int cs_restart_read_particles_info(cs_restart_t *restart, const char *name, cs_lnum_t *n_particles)
Definition: cs_restart.c:2115
int cs_restart_read_ids(cs_restart_t *restart, const char *sec_name, int location_id, int ref_location_id, cs_lnum_t ref_id_base, cs_lnum_t *ref_id)
Definition: cs_restart.c:2544
int cs_restart_read_real_6_t_compat(cs_restart_t *restart, const char *sec_name, const char *old_name_xx, const char *old_name_yy, const char *old_name_zz, const char *old_name_xy, const char *old_name_yz, const char *old_name_xz, int location_id, cs_real_6_t *val)
Definition: cs_restart.c:2935
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:310
int cs_restart_check_section(cs_restart_t *restart, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type)
Definition: cs_restart.c:1639
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
Definition: cs_restart.h:68
void cs_restart_checkpoint_set_next_wt(double wt_next)
Definition: cs_restart.c:1121
void dflsui(cs_int_t *ntsuit, cs_real_t *ttsuit, cs_real_t *wtsuit)
Definition: cs_restart.c:961
cs_restart_val_type_t
Definition: cs_restart.h:74
#define END_C_DECLS
Definition: cs_defs.h:463
void cs_restart_checkpoint_set_next_tv(double t_next)
Definition: cs_restart.c:1108
int cs_restart_read_particles(cs_restart_t *restart, int particles_location_id, cs_lnum_t *particle_cell_id, cs_real_t *particle_coords)
Definition: cs_restart.c:2298
void trbsui(void)
Definition: cs_restart.c:1022
#define CS_PROCF(x, y)
Definition: cs_defs.h:476
void cs_restart_destroy(cs_restart_t **restart)
Definition: cs_restart.c:1381
void cs_restart_check_base_location(const cs_restart_t *restart, bool *match_cell, bool *match_i_face, bool *match_b_face, bool *match_vertex)
Definition: cs_restart.c:1436
Definition: cs_restart.h:67
int cs_restart_add_location(cs_restart_t *restart, const char *location_name, cs_gnum_t n_glob_ents, cs_lnum_t n_ents, const cs_gnum_t *ent_global_num)
Definition: cs_restart.c:1494
void cs_restart_write_ids(cs_restart_t *restart, const char *sec_name, int location_id, int ref_location_id, cs_lnum_t ref_id_base, const cs_lnum_t *ref_id)
Definition: cs_restart.c:2645