GADGET-4
fof_io< partset > Class Template Reference

#include <fof_io.h>

Inherits IO_Def.

Classes

struct  fof_subfind_header
 

Public Member Functions

 fof_io (fof< partset > *FoF_ptr, MPI_Comm comm, int format)
 
void fof_subfind_save_groups (int num, const char *basename, const char *grpcat_dirbasename)
 
void fof_subfind_load_groups (int num)
 
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)
 
void read_header_fields (const char *fname)
 
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)
 
- Public Member Functions inherited from IO_Def
 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)
 
- Public Member Functions inherited from io_streamcount
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)
 
- Public Member Functions inherited from setcomm
 setcomm (MPI_Comm Comm)
 
 setcomm (const char *str)
 
void initcomm (MPI_Comm Comm)
 
void mpi_printf (const char *fmt,...)
 
void determine_compute_nodes (void)
 

Public Attributes

fof< partset > * FoF
 
fof_subfind_header catalogue_header
 
int LegacyFormat = 0
 
- Public Attributes inherited from IO_Def
int N_DataGroups = 0
 
int N_IO_Fields = 0
 
int Max_IO_Fields = 0
 
size_t header_size
 
void * header_buf
 
long long * ntype_in_files
 
char info [100]
 
enum file_contents type_of_file
 
- Public Attributes inherited from io_streamcount
long long byte_count = 0
 
- Public Attributes inherited from setcomm
MPI_Comm Communicator
 
int NTask
 
int ThisTask
 
int PTask
 
int ThisNode
 
int NumNodes = 0
 
int TasksInThisNode
 
int RankInThisNode
 
int MinTasksPerNode
 
int MaxTasksPerNode
 
long long MemoryOnNode
 
long long SharedMemoryOnNode
 

Detailed Description

template<typename partset>
class fof_io< partset >

Definition at line 19 of file fof_io.h.

Constructor & Destructor Documentation

◆ fof_io()

fof_io ( fof< partset > *  FoF_ptr,
MPI_Comm  comm,
int  format 
)

Member Function Documentation

◆ fill_file_header()

void fill_file_header ( int  writeTask,
int  lastTask,
long long *  nloc_part,
long long *  npart 
)
virtual

Implements IO_Def.

◆ fof_subfind_load_groups()

void fof_subfind_load_groups ( int  num)

◆ fof_subfind_save_groups()

void fof_subfind_save_groups ( int  num,
const char *  basename,
const char *  grpcat_dirbasename 
)

◆ get_base_address_of_structure()

void * get_base_address_of_structure ( enum arrays  array,
int  index 
)
virtual

Implements IO_Def.

◆ get_datagroup_name()

void get_datagroup_name ( int  grnr,
char *  gname 
)
virtual

Implements IO_Def.

◆ get_filenr_from_header()

int get_filenr_from_header ( void  )
virtual

Implements IO_Def.

◆ get_type_of_element()

int get_type_of_element ( int  index)
virtual

Implements IO_Def.

◆ read_file_header()

void read_file_header ( const char *  fname,
int  filenr,
int  readTask,
int  lastTask,
long long *  nloc_part,
long long *  npart,
int *  nstart 
)
virtual

Implements IO_Def.

◆ read_header_fields()

void read_header_fields ( const char *  fname)
virtual

Implements IO_Def.

◆ read_increase_numbers()

void read_increase_numbers ( int  type,
int  n_for_this_task 
)
virtual

Implements IO_Def.

◆ set_filenr_in_header()

void set_filenr_in_header ( int  )
virtual

Implements IO_Def.

◆ set_type_of_element()

void set_type_of_element ( int  index,
int  type 
)
virtual

Implements IO_Def.

◆ write_header_fields()

void write_header_fields ( hid_t  )
virtual

Implements IO_Def.

Member Data Documentation

◆ catalogue_header

fof_subfind_header catalogue_header

Definition at line 57 of file fof_io.h.

◆ FoF

fof<partset>* FoF

Definition at line 22 of file fof_io.h.

◆ LegacyFormat

int LegacyFormat = 0

Definition at line 59 of file fof_io.h.


The documentation for this class was generated from the following file: