/*******************************************************************************
 * This file is part of SWIFT.
 * Copyright (c) 2020 Matthieu Schaller (schaller@strw.leideuniv.nl)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 ******************************************************************************/
#ifndef SWIFT_NONE_HYDRO_IO_H
#define SWIFT_NONE_HYDRO_IO_H

/**
 * @file Shadowswift/hydro_io.h
 * @brief Empty implementation.
 */

#include "adiabatic_index.h"
#include "hydro.h"
#include "hydro_parameters.h"
#include "io_properties.h"
#include "kernel_hydro.h"

/**
 * @brief Specifies which particle fields to read from a dataset
 *
 * @param parts The particle array.
 * @param list The list of i/o properties to read.
 * @param num_fields The number of i/o fields to read.
 */
INLINE static void hydro_read_particles(struct part *parts,
                                        struct io_props *list,
                                        int *num_fields) {

  *num_fields = 0;
}

INLINE static void convert_part_pos(const struct engine *e,
                                    const struct part *p,
                                    const struct xpart *xp, double *ret) {
  ret[0] = 0.;
  ret[1] = 0.;
  ret[2] = 0.;
  error("Not implemented in the 'None' hydro scheme.");
}

INLINE static void convert_part_vel(const struct engine *e,
                                    const struct part *p,
                                    const struct xpart *xp, float *ret) {
  ret[0] = 0.f;
  ret[1] = 0.f;
  ret[2] = 0.f;
  error("Not implemented in the 'None' hydro scheme.");
}

/**
 * @brief Specifies which particle fields to write to a dataset
 *
 * @param parts The particle array.
 * @param xparts The extended particle array.
 * @param list The list of i/o properties to write.
 * @param num_fields The number of i/o fields to write.
 */
INLINE static void hydro_write_particles(const struct part *parts,
                                         const struct xpart *xparts,
                                         struct io_props *list,
                                         int *num_fields) {

  *num_fields = 0;
}

/**
 * @brief Writes the current model of SPH to the file
 * @param h_grpsph The HDF5 group in which to write
 */
INLINE static void hydro_write_flavour(hid_t h_grpsph) {}

/**
 * @brief Are we writing entropy in the internal energy field ?
 *
 * @return 1 if entropy is in 'internal energy', 0 otherwise.
 */
INLINE static int writeEntropyFlag(void) { return 0; }

#endif /* SWIFT_NONE_HYDRO_IO_H */
