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
70
Issues
70
List
Boards
Labels
Milestones
Merge Requests
13
Merge Requests
13
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
09e54f42
Commit
09e54f42
authored
Apr 23, 2018
by
Matthieu Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes
parent
ac2365c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
34 deletions
+16
-34
configure.ac
configure.ac
+4
-4
examples/parameter_example.yml
examples/parameter_example.yml
+9
-9
src/io_properties.h
src/io_properties.h
+3
-2
src/parser.c
src/parser.c
+0
-19
No files found.
configure.ac
View file @
09e54f42
...
@@ -979,19 +979,19 @@ case "$with_cooling" in
...
@@ -979,19 +979,19 @@ case "$with_cooling" in
;;
;;
grackle)
grackle)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [0], [Grackle chemistry network])
AC_DEFINE([COOLING_GRACKLE_MODE], [0], [Grackle chemistry network
, mode 0
])
;;
;;
grackle1)
grackle1)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [1], [Grackle chemistry network])
AC_DEFINE([COOLING_GRACKLE_MODE], [1], [Grackle chemistry network
, mode 1
])
;;
;;
grackle2)
grackle2)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [2], [Grackle chemistry network])
AC_DEFINE([COOLING_GRACKLE_MODE], [2], [Grackle chemistry network
, mode 2
])
;;
;;
grackle3)
grackle3)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [3], [Grackle chemistry network])
AC_DEFINE([COOLING_GRACKLE_MODE], [3], [Grackle chemistry network
, mode 3
])
;;
;;
EAGLE)
EAGLE)
AC_DEFINE([COOLING_EAGLE], [1], [Cooling following the EAGLE model])
AC_DEFINE([COOLING_EAGLE], [1], [Cooling following the EAGLE model])
...
...
examples/parameter_example.yml
View file @
09e54f42
...
@@ -182,15 +182,15 @@ LambdaCooling:
...
@@ -182,15 +182,15 @@ LambdaCooling:
# Cooling with Grackle 3.0
# Cooling with Grackle 3.0
GrackleCooling
:
GrackleCooling
:
CloudyTable
:
CloudyData_UVB=HM2012.h5
# Name of the Cloudy Table (available on the grackle bitbucket repository)
CloudyTable
:
CloudyData_UVB=HM2012.h5
# Name of the Cloudy Table (available on the grackle bitbucket repository)
WithUVbackground
:
1
# Enable or not the UV background
WithUVbackground
:
1
# Enable or not the UV background
Redshift
:
0
# Redshift to use (-1 means time based redshift)
Redshift
:
0
# Redshift to use (-1 means time based redshift)
WithMetalCooling
:
1
# Enable or not the metal cooling
WithMetalCooling
:
1
# Enable or not the metal cooling
ProvideVolumetricHeatingRates
:
0
# (optional) User provide volumetric heating rates
ProvideVolumetricHeatingRates
:
0
# (optional) User provide volumetric heating rates
ProvideSpecificHeatingRates
:
0
# (optional) User provide specific heating rates
ProvideSpecificHeatingRates
:
0
# (optional) User provide specific heating rates
SelfShieldingMethod
:
0
# (optional) Grackle (<= 3) or Gear self shielding method
SelfShieldingMethod
:
0
# (optional) Grackle (<= 3) or Gear self shielding method
OutputMode
:
0
# (optional) Write in output corresponding primordial chemistry mode
OutputMode
:
0
# (optional) Write in output corresponding primordial chemistry mode
MaxSteps
:
10000
# (optional) Max number of step when computing the initial composition
MaxSteps
:
10000
# (optional) Max number of step when computing the initial composition
ConvergenceLimit
:
1e-2
# (optional) Convergence threshold (relative) for initial composition
ConvergenceLimit
:
1e-2
# (optional) Convergence threshold (relative) for initial composition
# Parameters related to chemistry models -----------------------------------------------
# Parameters related to chemistry models -----------------------------------------------
...
...
src/io_properties.h
View file @
09e54f42
...
@@ -19,8 +19,6 @@
...
@@ -19,8 +19,6 @@
#ifndef SWIFT_IO_PROPERTIES_H
#ifndef SWIFT_IO_PROPERTIES_H
#define SWIFT_IO_PROPERTIES_H
#define SWIFT_IO_PROPERTIES_H
#include <string.h>
/* Config parameters. */
/* Config parameters. */
#include "../config.h"
#include "../config.h"
...
@@ -28,6 +26,9 @@
...
@@ -28,6 +26,9 @@
#include "common_io.h"
#include "common_io.h"
#include "inline.h"
#include "inline.h"
/* Standard includes. */
#include <string.h>
/**
/**
* @brief The two sorts of data present in the GADGET IC files: compulsory to
* @brief The two sorts of data present in the GADGET IC files: compulsory to
* start a run or optional.
* start a run or optional.
...
...
src/parser.c
View file @
09e54f42
...
@@ -594,10 +594,6 @@ int parser_get_opt_param_int(const struct swift_params *params,
...
@@ -594,10 +594,6 @@ int parser_get_opt_param_int(const struct swift_params *params,
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
}
}
#ifdef SWIFT_DEBUG_CHECKS
message
(
"Found parameter %s and got %i"
,
name
,
retParam
);
#endif
return
retParam
;
return
retParam
;
}
}
}
}
...
@@ -629,10 +625,6 @@ char parser_get_opt_param_char(const struct swift_params *params,
...
@@ -629,10 +625,6 @@ char parser_get_opt_param_char(const struct swift_params *params,
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
}
}
#ifdef SWIFT_DEBUG_CHECKS
message
(
"Found parameter %s and got %c"
,
name
,
retParam
);
#endif
return
retParam
;
return
retParam
;
}
}
}
}
...
@@ -664,10 +656,6 @@ float parser_get_opt_param_float(const struct swift_params *params,
...
@@ -664,10 +656,6 @@ float parser_get_opt_param_float(const struct swift_params *params,
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
}
}
#ifdef SWIFT_DEBUG_CHECKS
message
(
"Found parameter %s and got %g"
,
name
,
retParam
);
#endif
return
retParam
;
return
retParam
;
}
}
}
}
...
@@ -698,10 +686,6 @@ double parser_get_opt_param_double(const struct swift_params *params,
...
@@ -698,10 +686,6 @@ double parser_get_opt_param_double(const struct swift_params *params,
"characters '%s'."
,
"characters '%s'."
,
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
params
->
data
[
i
].
name
,
params
->
data
[
i
].
value
,
str
);
}
}
#ifdef SWIFT_DEBUG_CHECKS
message
(
"Found parameter %s and got %g"
,
name
,
retParam
);
#endif
return
retParam
;
return
retParam
;
}
}
}
}
...
@@ -723,9 +707,6 @@ void parser_get_opt_param_string(const struct swift_params *params,
...
@@ -723,9 +707,6 @@ void parser_get_opt_param_string(const struct swift_params *params,
for
(
int
i
=
0
;
i
<
params
->
paramCount
;
i
++
)
{
for
(
int
i
=
0
;
i
<
params
->
paramCount
;
i
++
)
{
if
(
!
strcmp
(
name
,
params
->
data
[
i
].
name
))
{
if
(
!
strcmp
(
name
,
params
->
data
[
i
].
name
))
{
strcpy
(
retParam
,
params
->
data
[
i
].
value
);
strcpy
(
retParam
,
params
->
data
[
i
].
value
);
#ifdef SWIFT_DEBUG_CHECKS
message
(
"Found parameter %s and got %s"
,
name
,
retParam
);
#endif
return
;
return
;
}
}
}
}
...
...
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