I/O

For input and output purposes, the HDF5 file format is used throughout. To organize the data for output, the contents of a state to be stored are split up into different datasets that correspond, to all the asymptotic classes of the vertex in each channel, the self-energy, the frequency grids used, as well as the most important parameters of the calculation. The output file is then on a high level organized in terms of ‘’\(\Lambda\) layers’’, the idea being that each layer enables access to a different state stored inside the same file. This enables the output of, e.g., the results of a full mfRG flow into a single file, where each ‘’\(\Lambda\) layer index’’ corresponds to a different value of the regulator. Alternatively, this structure can be used to store the results of all the iterations done during a solution of the parquet equations separately. Of course, one can equally well use just a single layer to store the end result of a computation, such as a converged solution of the parquet equations or the result of a PT2 computation.

template<typename Q, bool diff>
void write_state_to_hdf(const H5std_string FILE_NAME, double Lambda_i, const int Lambda_size, const State<Q, diff> &state_in, const bool verbose = true, const bool is_converged = false)

Create an output file with a fixed number of Lambda layers and save a given state to the first layer.

Template Parameters:
  • Q – Template parameter specifying the type of the data.

  • diff – Template parameter specifying whether the state to be saved is a differentiated one or not.

Parameters:
  • FILE_NAME – String of the filename.

  • Lambda_i – Initial value for Λ. (Deprecated by now.)

  • Lambda_size – Number of layers to be included in the file.

  • state_inState to be stored into the first layer.

  • verbose – If true, output is written into the log file about the process of saving the file.

  • is_converged – Specifies if the state to be stored is the final result of a converged parquet or mfRG computation.

template<typename Q, bool diff>
void add_state_to_hdf(const H5std_string FILE_NAME, int Lambda_it, const State<Q, diff> &state_in, const bool is_converged = false, const bool verbose = true)

Open an output file and save a given state to a specified layer.

Template Parameters:
  • Q – Template parameter specifying the type of the data.

  • diff – Template parameter specifying whether the state to be saved is a differentiated one or not.

Parameters:
  • FILE_NAME – String of the filename.

  • Lambda_it – Number of the Λ layer into which the state shall be stored.

  • state_inState to be stored.

  • is_converged – Specifies if the state to be stored is the final result of a converged parquet or mfRG computation.

  • verbose – If true, output is written into the log file about the process of saving the file.

State<state_datatype, false> read_state_from_hdf(const H5std_string &filename, int Lambda_it)

Read a state from a specified Lambda layer of a given hdf file.

Parameters:
  • filename – String of the filename.

  • Lambda_it – Number of the Λ layer from which the state shall be read.

Returns:

State that has been read out.