|
void | init_basic (simparticles *Sp_ptr) |
| Function for field registering. More...
|
|
| snap_io (simparticles *Sp_ptr, MPI_Comm comm, int format) |
|
void | write_snapshot (int num, mysnaptype snap_type) |
| Save snapshot to disk. More...
|
|
void | read_snapshot (int num, mysnaptype snap_type) |
|
int | acquire_basic_treeinfo (int num, mysnaptype loc_snap_type) |
|
void | free_basic_treeinfo (void) |
|
long long | load_orphans (int num, long long treenr, int num_files) |
|
void | free_orphans (void) |
|
void | read_ic (const char *fname) |
| This function reads initial conditions that are in on of the default file formats of Gadget. More...
|
|
void | fill_file_header (int writeTask, int lastTask, long long *nloc_part, long long *npart) |
|
void | read_file_header (const char *fname, int filenr, int readTask, int lastTask, long long *nloc_part, long long *npart, int *nstart) |
|
void | get_datagroup_name (int grnr, char *gname) |
|
void | write_header_fields (hid_t) |
| Write the fields contained in the header group of the HDF5 snapshot file. More...
|
|
void | read_header_fields (const char *fname) |
| This function reads the snapshot header in case of hdf5 files (i.e. format 3) More...
|
|
void | read_increase_numbers (int type, int n_for_this_task) |
|
int | get_filenr_from_header (void) |
|
void | set_filenr_in_header (int) |
|
void * | get_base_address_of_structure (enum arrays array, int index) |
|
int | get_type_of_element (int index) |
|
void | set_type_of_element (int index, int type) |
|
| IO_Def (MPI_Comm comm, int format) |
|
virtual | ~IO_Def () |
|
void | init_field (const char *label, const char *datasetname, enum types_in_memory type_in_memory, enum types_in_file type_in_file_output, enum read_flags read_flag, int values_per_block, enum arrays array, void *pointer_to_field, void(*io_func)(IO_Def *, int, int, void *, int), int typelist_bitmask, int hasunits, double a, double h, double L, double M, double V, double c, bool compression_on=false) |
|
int | find_files (const char *fname, const char *fname_multiple) |
| This function determines on how many files a given snapshot or group/desc catalogue is distributed. More...
|
|
void | read_files_driver (const char *fname, int rep, int numfiles) |
|
void | write_multiple_files (char *fname, int numfilesperdump, int append_flag=0, int chunk_size=0) |
|
void | write_compile_time_options_in_hdf5 (hid_t handle) |
|
void | read_segment (const char *fname, int type, long long offset, long long count, int numfiles) |
|
void | read_single_file_segment (const char *fname, int filenr, int type, long long offset, unsigned long long count, long long storage_offset, int numfiles) |
|
void | alloc_and_read_ntype_in_files (const char *fname, int num_files) |
|
size_t | my_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
| A wrapper for the fwrite() function. More...
|
|
size_t | my_fread (void *ptr, size_t size, size_t nmemb, FILE *stream) |
| A wrapper for the fread() function. More...
|
|
void | reset_io_byte_count (void) |
|
long long | get_io_byte_count (void) |
|
| setcomm (MPI_Comm Comm) |
|
| setcomm (const char *str) |
|
void | initcomm (MPI_Comm Comm) |
|
void | mpi_printf (const char *fmt,...) |
|
void | determine_compute_nodes (void) |
|
Definition at line 22 of file snap_io.h.
void read_ic |
( |
const char * |
fname | ) |
|
This function reads initial conditions that are in on of the default file formats of Gadget.
Snapshot files can be used as input files. However, when a snapshot file is used as input, not all the information in the header is used: THE STARTING TIME NEEDS TO BE SET IN THE PARAMETERFILE. Alternatively, the code can be started with All.RestartFlag 2, then snapshots from the code can be used as initial conditions-files without having to change the parameter file. For gas particles, only the internal energy is read, the density and mean molecular weight will be recomputed by the code. When InitGasTemp>0 is given, the gas temperature will be initialized to this value assuming a mean molecular weight either corresponding to complete neutrality, or full ionization.
- Parameters
-
fname | file name of the ICs |
readTypes | readTypes is a bitfield that determines what particle types to read, only if the bit corresponding to a particle type is set, the corresponding data is loaded, otherwise its particle number is set to zero. (This is only implemented for HDF5 files.) |
Definition at line 289 of file snap_io.cc.