Skip to content
Snippets Groups Projects
Commit d7799257 authored by lhausamm's avatar lhausamm
Browse files

Update cooling with output

parent e07b4e05
No related branches found
No related tags found
1 merge request!499Improved grackle
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <math.h> #include <math.h>
/* Local includes. */ /* Local includes. */
#include "cooling_io.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
#include "io_properties.h" #include "io_properties.h"
...@@ -37,18 +38,6 @@ ...@@ -37,18 +38,6 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "EAGLE");
}
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2017 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* 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_COOLING_EAGLE_IO_H
#define SWIFT_COOLING_EAGLE_IO_H
#include "io_properties.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "EAGLE");
}
#endif
/**
* @brief Specifies which particle fields to write to a dataset
*
* @param parts The particle array.
* @param list The list of i/o properties to write.
* @param cooling The #cooling_function_data
*
* @return Returns the number of fields to write.
*/
__attribute__((always_inline)) INLINE static int cooling_write_particles(
const struct xpart* xparts, struct io_props* list,
const struct cooling_function_data *cooling) {
return 0;
}
#endif // SWIFT_COOLING_EAGLE_IO_H
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
/* Local includes. */ /* Local includes. */
#include "const.h" #include "const.h"
#include "cooling_io.h"
#include "cooling_struct.h" #include "cooling_struct.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
...@@ -44,18 +45,6 @@ ...@@ -44,18 +45,6 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant du/dt");
}
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2016 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
* Richard Bower (r.g.bower@durham.ac.uk)
* Stefan Arridge (stefan.arridge@durham.ac.uk)
*
* 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_COOLING_CONST_DU_IO_H
#define SWIFT_COOLING_CONST_DU_IO_H
#include "io_properties.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant du/dt");
}
#endif
/**
* @brief Specifies which particle fields to write to a dataset
*
* @param parts The particle array.
* @param list The list of i/o properties to write.
* @param cooling The #cooling_function_data
*
* @return Returns the number of fields to write.
*/
__attribute__((always_inline)) INLINE static int cooling_write_particles(
const struct xpart* xparts, struct io_props* list,
const struct cooling_function_data *cooling) {
return 0;
}
#endif // SWIFT_COOLING_CONST_DU_IO_H
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
/* Local includes. */ /* Local includes. */
#include "const.h" #include "const.h"
#include "cooling_io.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
#include "io_properties.h" #include "io_properties.h"
...@@ -37,18 +38,6 @@ ...@@ -37,18 +38,6 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant Lambda");
}
#endif
/** /**
* @brief Calculates du/dt in code units for a particle. * @brief Calculates du/dt in code units for a particle.
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2016 Tom Theuns (tom.theuns@durham.ac.uk)
* Matthieu Schaller (matthieu.schaller@durham.ac.uk)
* Richard Bower (r.g.bower@durham.ac.uk)
* Stefan Arridge (stefan.arridge@durham.ac.uk)
*
* 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_COOLING_CONST_LAMBDA_IO_H
#define SWIFT_COOLING_CONST_LAMBDA_IO_H
#include "io_properties.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant Lambda");
}
#endif
/**
* @brief Specifies which particle fields to write to a dataset
*
* @param parts The particle array.
* @param list The list of i/o properties to write.
* @param cooling The #cooling_function_data
*
* @return Returns the number of fields to write.
*/
__attribute__((always_inline)) INLINE static int cooling_write_particles(
const struct xpart* xparts, struct io_props* list,
const struct cooling_function_data *cooling) {
return 0;
}
#endif // SWIFT_COOLING_CONST_LAMBDA_IO_H
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <math.h> #include <math.h>
/* Local includes. */ /* Local includes. */
#include "cooling_io.h"
#include "error.h" #include "error.h"
#include "hydro.h" #include "hydro.h"
#include "io_properties.h" #include "io_properties.h"
...@@ -37,18 +38,6 @@ ...@@ -37,18 +38,6 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "None");
}
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2016 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* 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_COOLING_NONE_IO_H
#define SWIFT_COOLING_NONE_IO_H
#include "io_properties.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
*/
__attribute__((always_inline)) INLINE static void cooling_write_flavour(
hid_t h_grpsph) {
io_write_attribute_s(h_grpsph, "Cooling Model", "None");
}
#endif
/**
* @brief Specifies which particle fields to write to a dataset
*
* @param parts The particle array.
* @param list The list of i/o properties to write.
* @param cooling The #cooling_function_data
*
* @return Returns the number of fields to write.
*/
__attribute__((always_inline)) INLINE static int cooling_write_particles(
const struct xpart* xparts, struct io_props* list,
const struct cooling_function_data *cooling) {
return 0;
}
#endif // SWIFT_COOLING_NONE_IO_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment