Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
12
Merge Requests
12
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
e7f6698b
Commit
e7f6698b
authored
Apr 23, 2018
by
Matthieu Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a file to switch the import of the i/o cooling to mimic what is done for the chemistry.
parent
09e54f42
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
97 additions
and
31 deletions
+97
-31
src/Makefile.am
src/Makefile.am
+2
-2
src/chemistry/none/chemistry.h
src/chemistry/none/chemistry.h
+4
-1
src/cooling/EAGLE/cooling.h
src/cooling/EAGLE/cooling.h
+5
-4
src/cooling/EAGLE/cooling_io.h
src/cooling/EAGLE/cooling_io.h
+5
-1
src/cooling/const_du/cooling.h
src/cooling/const_du/cooling.h
+3
-3
src/cooling/const_du/cooling_io.h
src/cooling/const_du/cooling_io.h
+5
-1
src/cooling/const_lambda/cooling.h
src/cooling/const_lambda/cooling.h
+3
-2
src/cooling/const_lambda/cooling_io.h
src/cooling/const_lambda/cooling_io.h
+5
-2
src/cooling/grackle/cooling.h
src/cooling/grackle/cooling.h
+8
-6
src/cooling/grackle/cooling_io.h
src/cooling/grackle/cooling_io.h
+4
-1
src/cooling/none/cooling.h
src/cooling/none/cooling.h
+4
-3
src/cooling/none/cooling_io.h
src/cooling/none/cooling_io.h
+6
-2
src/cooling_io.h
src/cooling_io.h
+40
-0
src/parallel_io.c
src/parallel_io.c
+1
-1
src/serial_io.c
src/serial_io.c
+1
-1
src/single_io.c
src/single_io.c
+1
-1
No files found.
src/Makefile.am
View file @
e7f6698b
...
...
@@ -43,8 +43,8 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
engine.h swift.h serial_io.h timers.h debug.h scheduler.h proxy.h parallel_io.h
\
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h
\
physical_constants.h physical_constants_cgs.h potential.h version.h
\
hydro_properties.h riemann.h threadpool.h cooling
.h cooling_struct.h sourceterms
.h
\
sourceterms_struct.h statistics.h memswap.h cache.h runner_doiact_vec.h profiler.h
\
hydro_properties.h riemann.h threadpool.h cooling
_io.h cooling.h cooling_struct
.h
\
sourceterms
.h sourceterms
_struct.h statistics.h memswap.h cache.h runner_doiact_vec.h profiler.h
\
dump.h logger.h active.h timeline.h xmf.h gravity_properties.h gravity_derivatives.h
\
gravity_softened_derivatives.h vector_power.h collectgroup.h hydro_space.h sort_part.h
\
chemistry.h chemistry_io.h chemistry_struct.h cosmology.h restart.h
...
...
src/chemistry/none/chemistry.h
View file @
e7f6698b
...
...
@@ -92,9 +92,12 @@ __attribute__((always_inline)) INLINE static void chemistry_end_density(
*
* Nothing to do here.
*
* @param phys_const The physical constant in internal units.
* @param us The unit system.
* @param cosmo The current cosmological model.
* @param data The global chemistry information used for this run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param data The global chemistry information used for this run.
*/
__attribute__
((
always_inline
))
INLINE
static
void
chemistry_first_init_part
(
const
struct
phys_const
*
restrict
phys_const
,
...
...
src/cooling/EAGLE/cooling.h
View file @
e7f6698b
...
...
@@ -20,19 +20,20 @@
#define SWIFT_COOLING_EAGLE_H
/**
* @file src/cooling/
none
/cooling.h
* @brief E
mpty infrastructure for the cases without
cooling function
* @file src/cooling/
EAGLE
/cooling.h
* @brief E
AGLE
cooling function
*/
/* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <float.h>
#include <math.h>
/* Local includes. */
#include "cooling_io.h"
#include "error.h"
#include "hydro.h"
#include "io_properties.h"
#include "parser.h"
#include "part.h"
#include "physical_constants.h"
...
...
src/cooling/EAGLE/cooling_io.h
View file @
e7f6698b
...
...
@@ -19,6 +19,10 @@
#ifndef SWIFT_COOLING_EAGLE_IO_H
#define SWIFT_COOLING_EAGLE_IO_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "io_properties.h"
#ifdef HAVE_HDF5
...
...
@@ -49,4 +53,4 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
return
0
;
}
#endif
// SWIFT_COOLING_EAGLE_IO_H
#endif
/* SWIFT_COOLING_EAGLE_IO_H */
src/cooling/const_du/cooling.h
View file @
e7f6698b
...
...
@@ -30,16 +30,16 @@
* realistic functions.
*/
/* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <math.h>
/* Local includes. */
#include "const.h"
#include "cooling_io.h"
#include "cooling_struct.h"
#include "error.h"
#include "hydro.h"
#include "io_properties.h"
#include "parser.h"
#include "part.h"
#include "physical_constants.h"
...
...
src/cooling/const_du/cooling_io.h
View file @
e7f6698b
...
...
@@ -21,6 +21,10 @@
#ifndef SWIFT_COOLING_CONST_DU_IO_H
#define SWIFT_COOLING_CONST_DU_IO_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "io_properties.h"
#ifdef HAVE_HDF5
...
...
@@ -51,4 +55,4 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
return
0
;
}
#endif
// SWIFT_COOLING_CONST_DU_IO_H
#endif
/* SWIFT_COOLING_CONST_DU_IO_H */
src/cooling/const_lambda/cooling.h
View file @
e7f6698b
...
...
@@ -23,16 +23,17 @@
#ifndef SWIFT_COOLING_CONST_LAMBDA_H
#define SWIFT_COOLING_CONST_LAMBDA_H
/* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <float.h>
#include <math.h>
/* Local includes. */
#include "const.h"
#include "cooling_io.h"
#include "error.h"
#include "hydro.h"
#include "io_properties.h"
#include "parser.h"
#include "part.h"
#include "physical_constants.h"
...
...
src/cooling/const_lambda/cooling_io.h
View file @
e7f6698b
...
...
@@ -19,10 +19,13 @@
* 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
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "io_properties.h"
#ifdef HAVE_HDF5
...
...
@@ -53,4 +56,4 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
return
0
;
}
#endif
// SWIFT_COOLING_CONST_LAMBDA_IO_H
#endif
/* SWIFT_COOLING_CONST_LAMBDA_IO_H */
src/cooling/grackle/cooling.h
View file @
e7f6698b
...
...
@@ -20,22 +20,24 @@
#define SWIFT_COOLING_GRACKLE_H
/**
* @file src/cooling/
non
e/cooling.h
* @brief
Empty infrastructure for the cases without cooling function
* @file src/cooling/
grackl
e/cooling.h
* @brief
Cooling using the GRACKLE 3.0 library.
*/
/* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <float.h>
#include <grackle.h>
#include <math.h>
/* The grackle library itself */
#include <grackle.h>
/* Local includes. */
#include "../config.h"
#include "chemistry.h"
#include "cooling_io.h"
#include "error.h"
#include "hydro.h"
#include "io_properties.h"
#include "parser.h"
#include "part.h"
#include "physical_constants.h"
...
...
src/cooling/grackle/cooling_io.h
View file @
e7f6698b
...
...
@@ -19,7 +19,10 @@
#ifndef SWIFT_COOLING_GRACKLE_IO_H
#define SWIFT_COOLING_GRACKLE_IO_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "cooling_struct.h"
#include "io_properties.h"
...
...
@@ -163,4 +166,4 @@ __attribute__((always_inline)) INLINE static void cooling_read_parameters(
parameter_file
,
"GrackleCooling:ConvergenceLimit"
,
1e-2
);
}
#endif
// SWIFT_COOLING_GRACKLE_IO_H
#endif
/* SWIFT_COOLING_GRACKLE_IO_H */
src/cooling/none/cooling.h
View file @
e7f6698b
...
...
@@ -29,10 +29,8 @@
#include <math.h>
/* Local includes. */
#include "cooling_io.h"
#include "error.h"
#include "hydro.h"
#include "io_properties.h"
#include "parser.h"
#include "part.h"
#include "physical_constants.h"
...
...
@@ -84,9 +82,12 @@ __attribute__((always_inline)) INLINE static float cooling_timestep(
*
* Nothing to do here.
*
* @param phys_const The physical constant in internal units.
* @param us The unit system.
* @param cosmo The current cosmological model.
* @param data The properties of the cooling function.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param cooling The properties of the cooling function.
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_first_init_part
(
const
struct
phys_const
*
restrict
phys_const
,
...
...
src/cooling/none/cooling_io.h
View file @
e7f6698b
...
...
@@ -19,6 +19,10 @@
#ifndef SWIFT_COOLING_NONE_IO_H
#define SWIFT_COOLING_NONE_IO_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "io_properties.h"
#ifdef HAVE_HDF5
...
...
@@ -37,7 +41,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
/**
* @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 cooling The #cooling_function_data
*
...
...
@@ -49,4 +53,4 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
return
0
;
}
#endif
// SWIFT_COOLING_NONE_IO_H
#endif
/* SWIFT_COOLING_NONE_IO_H */
src/cooling_io.h
0 → 100644
View file @
e7f6698b
/*******************************************************************************
* This file is part of SWIFT.
* Coypright (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_IO_H
#define SWIFT_COOLING_IO_H
/* Config parameters. */
#include "../config.h"
/* Import the i/o routines of the right cooling definition */
#if defined(COOLING_NONE)
#include "./cooling/none/cooling_io.h"
#elif defined(COOLING_CONST_DU)
#include "./cooling/const_du/cooling_io.h"
#elif defined(COOLING_CONST_LAMBDA)
#include "./cooling/const_lambda/cooling_io.h"
#elif defined(COOLING_GRACKLE)
#include "./cooling/grackle/cooling_io.h"
#elif defined(COOLING_EAGLE)
#include "./cooling/EAGLE/cooling_io.h"
#else
#error "Invalid choice of cooling function."
#endif
#endif
/* SWIFT_COOLING_IO_H */
src/parallel_io.c
View file @
e7f6698b
...
...
@@ -38,7 +38,7 @@
/* Local includes. */
#include "chemistry_io.h"
#include "common_io.h"
#include "cooling.h"
#include "cooling
_io
.h"
#include "dimension.h"
#include "engine.h"
#include "error.h"
...
...
src/serial_io.c
View file @
e7f6698b
...
...
@@ -38,7 +38,7 @@
/* Local includes. */
#include "chemistry_io.h"
#include "common_io.h"
#include "cooling.h"
#include "cooling
_io
.h"
#include "dimension.h"
#include "engine.h"
#include "error.h"
...
...
src/single_io.c
View file @
e7f6698b
...
...
@@ -37,7 +37,7 @@
/* Local includes. */
#include "chemistry_io.h"
#include "common_io.h"
#include "cooling.h"
#include "cooling
_io
.h"
#include "dimension.h"
#include "engine.h"
#include "error.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment