Commit 4b01a513 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Documentation fixes and code formatting

parent eab55966
......@@ -71,7 +71,10 @@
* @param internal_units The #unit_system used internally.
* @param ic_units The #unit_system used in the snapshots.
* @param cleanup_h Are we removing h-factors from the ICs?
* @param cleanup_sqrt_a Are we cleaning-up the sqrt(a) factors in the Gadget
* IC velocities?
* @param h The value of the reduced Hubble constant to use for cleaning.
* @param a The current value of the scale-factor.
*/
void readArray_chunk(hid_t h_data, hid_t h_plist_id,
const struct io_props props, size_t N, long long offset,
......@@ -193,7 +196,10 @@ void readArray_chunk(hid_t h_data, hid_t h_plist_id,
* @param internal_units The #unit_system used internally.
* @param ic_units The #unit_system used in the ICs.
* @param cleanup_h Are we removing h-factors from the ICs?
* @param cleanup_sqrt_a Are we cleaning-up the sqrt(a) factors in the Gadget
* IC velocities?
* @param h The value of the reduced Hubble constant to use for cleaning.
* @param a The current value of the scale-factor.
*/
void readArray(hid_t grp, struct io_props props, size_t N, long long N_total,
int mpi_rank, long long offset,
......@@ -317,10 +323,6 @@ void readArray(hid_t grp, struct io_props props, size_t N, long long N_total,
H5Dclose(h_data);
}
/*-----------------------------------------------------------------------------
* Routines writing an output file
*-----------------------------------------------------------------------------*/
/**
* @brief Prepares an array in the snapshot.
*
......
......@@ -54,10 +54,6 @@
#include "units.h"
#include "xmf.h"
/*-----------------------------------------------------------------------------
* Routines reading an IC file
*-----------------------------------------------------------------------------*/
/**
* @brief Reads a data array from a given HDF5 group.
*
......@@ -69,7 +65,10 @@
* @param internal_units The #unit_system used internally
* @param ic_units The #unit_system used in the ICs
* @param cleanup_h Are we removing h-factors from the ICs?
* @param cleanup_sqrt_a Are we cleaning-up the sqrt(a) factors in the Gadget
* IC velocities?
* @param h The value of the reduced Hubble constant to use for cleaning.
* @param a The current value of the scale-factor.
*
* @todo A better version using HDF5 hyper-slabs to read the file directly into
* the part array will be written once the structures have been stabilized.
......@@ -201,10 +200,6 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
H5Dclose(h_data);
}
/*-----------------------------------------------------------------------------
* Routines writing an output file
*-----------------------------------------------------------------------------*/
void prepareArray(const struct engine* e, hid_t grp, char* fileName,
FILE* xmfFile, char* partTypeGroupName,
const struct io_props props, unsigned long long N_total,
......
......@@ -53,10 +53,6 @@
#include "units.h"
#include "xmf.h"
/*-----------------------------------------------------------------------------
* Routines reading an IC file
*-----------------------------------------------------------------------------*/
/**
* @brief Reads a data array from a given HDF5 group.
*
......@@ -66,15 +62,18 @@
* @param internal_units The #unit_system used internally
* @param ic_units The #unit_system used in the ICs
* @param cleanup_h Are we removing h-factors from the ICs?
* @param The value of the reduced Hubble constant.
* @param cleanup_sqrt_a Are we cleaning-up the sqrt(a) factors in the Gadget
* IC velocities?
* @param h The value of the reduced Hubble constant.
* @param a The current value of the scale-factor.
*
* @todo A better version using HDF5 hyper-slabs to read the file directly into
* the part array will be written once the structures have been stabilized.
*/
void readArray(hid_t h_grp, const struct io_props props, size_t N,
const struct unit_system* internal_units,
const struct unit_system* ic_units, int cleanup_h, double h,
int cleanup_sqrt_a, double a) {
const struct unit_system* ic_units, int cleanup_h,
int cleanup_sqrt_a, double h, double a) {
const size_t typeSize = io_sizeof_type(props.type);
const size_t copySize = typeSize * props.dimension;
......@@ -113,8 +112,8 @@ void readArray(hid_t h_grp, const struct io_props props, size_t N,
/* Read HDF5 dataspace in temporary buffer */
/* Dirty version that happens to work for vectors but should be improved */
/* Using HDF5 dataspaces would be better */
const hid_t h_err = H5Dread(h_data, io_hdf5_type(props.type), H5S_ALL, H5S_ALL,
H5P_DEFAULT, temp);
const hid_t h_err = H5Dread(h_data, io_hdf5_type(props.type), H5S_ALL,
H5S_ALL, H5P_DEFAULT, temp);
if (h_err < 0) error("Error while reading data array '%s'.", props.name);
/* Unit conversion if necessary */
......@@ -175,10 +174,6 @@ void readArray(hid_t h_grp, const struct io_props props, size_t N,
H5Dclose(h_data);
}
/*-----------------------------------------------------------------------------
* Routines writing an output file
*-----------------------------------------------------------------------------*/
/**
* @brief Writes a data array in given HDF5 group.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment