  | 
  
    My Project
    
   programmer's documentation 
   | 
 
 
 
 
Go to the documentation of this file.    1 #ifndef __CS_RESTART_H__ 
    2 #define __CS_RESTART_H__ 
   52 #define CS_RESTART_SUCCESS        0  
   53 #define CS_RESTART_ERR_FILE_NUM  -1  
   54 #define CS_RESTART_ERR_LOCATION  -2  
   55 #define CS_RESTART_ERR_VAL_TYPE  -3  
   56 #define CS_RESTART_ERR_N_VALS    -4  
   57 #define CS_RESTART_ERR_MODE      -5  
   58 #define CS_RESTART_ERR_EXISTS    -6  
  114                              const char             *sec_name,
 
  144                             const char             *sec_name,
 
  172                              const char             *sec_name,
 
  467                         const char        *location_name,
 
  623                          const char             *sec_name,
 
  646                         const char             *sec_name,
 
  667                          const char             *sec_name,
 
  708                           int            particles_location_id,
 
  737                            bool              number_by_coords,
 
  768                     const char       *sec_name,
 
  793                      const char             *sec_name,
 
  818                                const char             *sec_name,
 
  819                                const char             *old_name,
 
  848                                 const char    *sec_name,
 
  849                                 const char    *old_name_x,
 
  850                                 const char    *old_name_y,
 
  851                                 const char    *old_name_z,
 
  881                                 const char    *sec_name,
 
  882                                 const char    *old_name_xx,
 
  883                                 const char    *old_name_yy,
 
  884                                 const char    *old_name_zz,
 
  885                                 const char    *old_name_xy,
 
  886                                 const char    *old_name_yz,
 
  887                                 const char    *old_name_xz,
 
  917                                  const char    *sec_name,
 
  918                                  const char    *old_name_xx,
 
  919                                  const char    *old_name_yy,
 
  920                                  const char    *old_name_zz,
 
  921                                  const char    *old_name_xy,
 
  922                                  const char    *old_name_yz,
 
  923                                  const char    *old_name_xz,
 
 
Definition: cs_restart.h:68
 
void cs_restart_checkpoint_done(const cs_time_step_t *ts)
Indicate checkpointing has been done at a given time.
Definition: cs_restart.c:1874
 
void cs_real_t * ttsuit
Definition: cs_restart.h:205
 
void() cs_restart_write_section_t(cs_restart_t *restart, void *context, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type, const void *val)
Function pointer for modifying behavior when writing a section.
Definition: cs_restart.h:170
 
Definition: cs_restart.h:77
 
integer, save isuite
Indicator of a calculation restart (=1) or not (=0). This value is set automatically by the code; dep...
Definition: optcal.f90:312
 
void cs_restart_checkpoint_set_next_ts(int nt_next)
Define next forced checkpoint time step.
Definition: cs_restart.c:1761
 
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)
Read a cs_real_66_t tensor section from a restart file, when that section may have used a different n...
Definition: cs_restart.c:3588
 
void cs_restart_destroy(cs_restart_t **restart)
Destroy structure associated with a restart file (and close the file).
Definition: cs_restart.c:2059
 
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)
Read a cs_real_6_t tensor section from a restart file, when that section may have used a different na...
Definition: cs_restart.c:3446
 
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
 
void CS_PROCF(dflsui, DFLSUI)(cs_int_t *ntsuit
 
cs_restart_check_section_t * cs_restart_set_check_section_func(cs_restart_check_section_t *func)
Associate a function to restart section check operations.
Definition: cs_restart.c:2355
 
cs_restart_mode_t
Definition: cs_restart.h:66
 
#define END_C_DECLS
Definition: cs_defs.h:468
 
cs_restart_val_type_t
Definition: cs_restart.h:75
 
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)
Add a location definition.
Definition: cs_restart.c:2173
 
int cs_restart_read_particles(cs_restart_t *restart, int particles_location_id, cs_lnum_t *particle_cell_id, cs_real_t *particle_coords)
Read basic particles information from a restart file.
Definition: cs_restart.c:2798
 
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)
Read a section from a restart file.
Definition: cs_restart.c:2532
 
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
 
cs_restart_write_section_t * cs_restart_set_write_section_func(cs_restart_write_section_t *func)
Associate a function and its input to all restart section write operations.
Definition: cs_restart.c:2399
 
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)
Read a referenced location id section from a restart file.
Definition: cs_restart.c:3050
 
void cs_restart_set_context(void *context)
Associate a context to restart section check operations.
Definition: cs_restart.c:2337
 
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
 
cs_lnum_t cs_restart_get_n_location_elts(const cs_restart_t *restart, int location_id)
Return local number of elements associated with a given restart location.
Definition: cs_restart.c:2438
 
int cs_restart_present(void)
Check if we have a restart directory.
Definition: cs_restart.c:1912
 
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)
Check the presence of a given section in a restart file.
Definition: cs_restart.c:2499
 
Definition: cs_restart.h:78
 
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)
Read a section from a restart file, when that section may have used a different name in a previous ve...
Definition: cs_restart.c:3255
 
int() cs_restart_read_section_t(cs_restart_t *restart, void *context, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type, void *val)
Function pointer for modifying behavior when reading a section.
Definition: cs_restart.h:142
 
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
 
void const cs_int_t * mode
Definition: cs_syr_coupling.h:132
 
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)
Write a section to a restart file.
Definition: cs_restart.c:2575
 
time step descriptor
Definition: cs_time_step.h:51
 
void cs_real_t cs_real_t * wtsuit
Definition: cs_restart.h:205
 
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_id, const cs_real_t *particle_coords)
Write basic particles information to a restart file.
Definition: cs_restart.c:2915
 
const char * cs_restart_get_name(const cs_restart_t *restart)
Return name of restart file.
Definition: cs_restart.c:2418
 
void cs_restart_dump_index(const cs_restart_t *restart)
Print the index associated with a restart file in read mode.
Definition: cs_restart.c:2460
 
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:317
 
void cs_int_t cs_int_t cs_int_t cs_real_t * ts
Definition: cs_at_plugin.h:63
 
void cs_restart_checkpoint_set_mesh_mode(int mode)
Define checkpoint behavior for mesh.
Definition: cs_restart.c:1733
 
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
 
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:87
 
Definition: cs_restart.h:69
 
void cs_restart_checkpoint_set_next_wt(double wt_next)
Define next forced checkpoint wall-clock time value.
Definition: cs_restart.c:1789
 
void cs_restart_checkpoint_set_defaults(int nt_interval, double t_interval, double wt_interval)
Define default checkpoint interval.
Definition: cs_restart.c:1703
 
void cs_restart_print_stats(void)
Print statistics associated with restart files.
Definition: cs_restart.c:3711
 
int cs_restart_read_particles_info(cs_restart_t *restart, const char *name, cs_lnum_t *n_particles)
Read basic particles information from a restart file.
Definition: cs_restart.c:2615
 
int() cs_restart_check_section_t(cs_restart_t *restart, void *context, const char *sec_name, int location_id, int n_location_vals, cs_restart_val_type_t val_type)
Function pointer for modifying behavior when checking a section's presence.
Definition: cs_restart.h:112
 
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)
Write a referenced location id section to a restart file.
Definition: cs_restart.c:3153
 
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)
Read a cs_real_3_t vector section from a restart file, when that section may have used a different na...
Definition: cs_restart.c:3332
 
cs_restart_read_section_t * cs_restart_set_read_section_func(cs_restart_read_section_t *func)
Associate a function and its input to all restart section read operations.
Definition: cs_restart.c:2377
 
cs_real_t cs_real_66_t[6][6]
6x6 matrix of floating-point values
Definition: cs_defs.h:322
 
void cs_restart_checkpoint_set_last_ts(int nt_last)
Define last forced checkpoint time step.
Definition: cs_restart.c:1747
 
bool cs_restart_checkpoint_required(const cs_time_step_t *ts)
Check if checkpointing is recommended at a given time.
Definition: cs_restart.c:1805
 
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:301
 
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)
Check the locations associated with a restart file.
Definition: cs_restart.c:2115
 
Definition: cs_restart.h:76
 
void cs_restart_checkpoint_set_next_tv(double t_next)
Define next forced checkpoint time value.
Definition: cs_restart.c:1775
 
void cs_restart_add_location_ref(const char *location_name, cs_gnum_t n_glob_ents, cs_lnum_t n_ents, const cs_gnum_t *ent_global_num)
Add a reference location definition with a private copy.
Definition: cs_restart.c:2268
 
integer, save ntsuit
saving period of the restart filesy5
Definition: entsor.f90:72
 
void cs_restart_clear_locations_ref(void)
Clear reference location definitions with a private copy.
Definition: cs_restart.c:2310
 
cs_restart_t * cs_restart_create(const char *name, const char *path, cs_restart_mode_t mode)
Initialize a restart file.
Definition: cs_restart.c:1936
 
Definition: cs_restart.h:79