Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
b2efc6e3
Commit
b2efc6e3
authored
Mar 31, 2020
by
Matthieu Schaller
Browse files
Also add the option to name columns in the cooling i/o
parent
9058a801
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/cooling/Compton/cooling_io.h
View file @
b2efc6e3
...
...
@@ -30,11 +30,14 @@
/**
* @brief Writes the current model of cooling to the file
*
* @param h_grp The HDF5 group in which to write
* @param cooling the parameters of the cooling function.
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"Compton cooling"
);
io_write_attribute_d
(
h_grp
,
"Compton rate [erg s^-1 K^-1]"
,
...
...
src/cooling/EAGLE/cooling_io.h
View file @
b2efc6e3
...
...
@@ -32,10 +32,12 @@
* @brief Writes the current model of cooling to the file.
*
* @param h_grp The HDF5 group in which to write
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"EAGLE"
);
}
...
...
src/cooling/QLA/cooling_io.h
View file @
b2efc6e3
...
...
@@ -32,10 +32,12 @@
* @brief Writes the current model of cooling to the file.
*
* @param h_grp The HDF5 group in which to write
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"Quick Lyman-alpha (EAGLE with primordial Z only)"
);
...
...
src/cooling/const_du/cooling_io.h
View file @
b2efc6e3
...
...
@@ -41,11 +41,14 @@
/**
* @brief Writes the current model of SPH to the file
*
* @param h_grp The HDF5 group in which to write
* @param cooling the parameters of the cooling function.
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"Constant du/dt"
);
}
...
...
src/cooling/const_lambda/cooling_io.h
View file @
b2efc6e3
...
...
@@ -39,11 +39,14 @@
/**
* @brief Writes the current model of cooling to the file
*
* @param h_grp The HDF5 group in which to write
* @param cooling the parameters of the cooling function.
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"Constant Lambda"
);
io_write_attribute_d
(
h_grp
,
"Lambda/n_H^2 [cgs]"
,
cooling
->
lambda_nH2_cgs
);
...
...
src/cooling/grackle/cooling_io.h
View file @
b2efc6e3
...
...
@@ -27,10 +27,14 @@
/**
* @brief Writes the current model of cooling to the file
*
* @param h_grp The HDF5 group in which to write
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling The #cooling_function_data
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
#if COOLING_GRACKLE_MODE == 0
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"Grackle"
);
...
...
src/cooling/none/cooling_io.h
View file @
b2efc6e3
...
...
@@ -30,11 +30,14 @@
/**
* @brief Writes the current model of SPH to the file
*
* @param h_grp The HDF5 group in which to write
* @param h_grp_columns The HDF5 group containing named columns
* @param cooling the parameters of the cooling function.
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_write_flavour
(
hid_t
h_grp
,
const
struct
cooling_function_data
*
cooling
)
{
hid_t
h_grp
,
hid_t
h_grp_columns
,
const
struct
cooling_function_data
*
cooling
)
{
io_write_attribute_s
(
h_grp
,
"Cooling Model"
,
"None"
);
}
...
...
src/parallel_io.c
View file @
b2efc6e3
...
...
@@ -1178,7 +1178,7 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
H5Gcreate
(
h_grp
,
"NamedColumns"
,
H5P_DEFAULT
,
H5P_DEFAULT
,
H5P_DEFAULT
);
if
(
h_grp_columns
<
0
)
error
(
"Error while creating named columns group"
);
entropy_floor_write_flavour
(
h_grp
);
cooling_write_flavour
(
h_grp
,
e
->
cooling_func
);
cooling_write_flavour
(
h_grp
,
h_grp_columns
,
e
->
cooling_func
);
chemistry_write_flavour
(
h_grp
,
h_grp_columns
);
tracers_write_flavour
(
h_grp
);
feedback_write_flavour
(
e
->
feedback_props
,
h_grp
);
...
...
src/serial_io.c
View file @
b2efc6e3
...
...
@@ -1043,7 +1043,7 @@ void write_output_serial(struct engine* e, const char* baseName,
H5Gcreate
(
h_grp
,
"NamedColumns"
,
H5P_DEFAULT
,
H5P_DEFAULT
,
H5P_DEFAULT
);
if
(
h_grp_columns
<
0
)
error
(
"Error while creating named columns group"
);
entropy_floor_write_flavour
(
h_grp
);
cooling_write_flavour
(
h_grp
,
e
->
cooling_func
);
cooling_write_flavour
(
h_grp
,
h_grp_columns
,
e
->
cooling_func
);
chemistry_write_flavour
(
h_grp
,
h_grp_columns
);
tracers_write_flavour
(
h_grp
);
feedback_write_flavour
(
e
->
feedback_props
,
h_grp
);
...
...
src/single_io.c
View file @
b2efc6e3
...
...
@@ -888,7 +888,7 @@ void write_output_single(struct engine* e, const char* baseName,
H5Gcreate
(
h_grp
,
"NamedColumns"
,
H5P_DEFAULT
,
H5P_DEFAULT
,
H5P_DEFAULT
);
if
(
h_grp_columns
<
0
)
error
(
"Error while creating named columns group"
);
entropy_floor_write_flavour
(
h_grp
);
cooling_write_flavour
(
h_grp
,
e
->
cooling_func
);
cooling_write_flavour
(
h_grp
,
h_grp_columns
,
e
->
cooling_func
);
chemistry_write_flavour
(
h_grp
,
h_grp_columns
);
tracers_write_flavour
(
h_grp
);
feedback_write_flavour
(
e
->
feedback_props
,
h_grp
);
...
...
Peter W. Draper
@pdraper
mentioned in issue
#664 (closed)
·
Mar 31, 2020
mentioned in issue
#664 (closed)
mentioned in issue #664
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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