Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
8fa9e44d
Commit
8fa9e44d
authored
Jan 20, 2019
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Allow the code to compile without an entropy floor.
parent
27722d70
No related branches found
No related tags found
2 merge requests
!720
Implement EAGLE-like entropy floor
,
!705
Star formation following Schaye08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/entropy_floor/EAGLE/entropy_floor.h
+6
-1
6 additions, 1 deletion
src/entropy_floor/EAGLE/entropy_floor.h
src/entropy_floor/none/entropy_floor.h
+74
-0
74 additions, 0 deletions
src/entropy_floor/none/entropy_floor.h
with
80 additions
and
1 deletion
src/entropy_floor/EAGLE/entropy_floor.h
+
6
−
1
View file @
8fa9e44d
...
...
@@ -206,10 +206,15 @@ static INLINE void entropy_floor_init(struct entropy_floor_properties *props,
props
->
Cool_density_threshold
;
}
/**
* @brief Print the properties of the entropy floor to stdout.
*
* @param props The entropy floor properties.
*/
static
INLINE
void
entropy_floor_print
(
const
struct
entropy_floor_properties
*
props
)
{
message
(
"Entropy floor is EAGLE with:"
);
message
(
"Entropy floor is
'
EAGLE
'
with:"
);
message
(
"Jeans limiter with slope n=%.3f at rho=%e (%e H/cm^3) and T=%.1f K"
,
props
->
Jeans_gamma_effective
,
props
->
Jeans_density_threshold
,
props
->
Jeans_density_threshold_H_p_cm3
,
...
...
...
...
This diff is collapsed.
Click to expand it.
src/entropy_floor/none/entropy_floor.h
+
74
−
0
View file @
8fa9e44d
...
...
@@ -25,4 +25,78 @@
* floors.
*/
/**
* @brief Properties of the entropy floor.
*
* Nothing here.
*/
struct
entropy_floor_properties
{};
/**
* @brief Compute the entropy floor of a given #part.
*
* Simply return 0 (no floor).
*
* @param p The #part.
* @param cosmo The cosmological model.
* @param props The properties of the entropy floor.
*/
static
INLINE
float
entropy_floor
(
const
struct
part
*
p
,
const
struct
cosmology
*
cosmo
,
const
struct
entropy_floor_properties
*
props
)
{
return
0
.
f
;
}
/**
* @brief Initialise the entropy floor by reading the parameters and converting
* to internal units.
*
* Nothing to do here.
*
* @param params The YAML parameter file.
* @param us The system of units used internally.
* @param phys_cont The physical constants.
* @param props The entropy floor properties to fill.
*/
static
INLINE
void
entropy_floor_init
(
struct
entropy_floor_properties
*
props
,
const
struct
phys_const
*
phys_const
,
const
struct
unit_system
*
us
,
const
struct
hydro_props
*
hydro_props
,
struct
swift_params
*
params
)
{}
/**
* @brief Print the properties of the entropy floor to stdout.
*
* @param props The entropy floor properties.
*/
static
INLINE
void
entropy_floor_print
(
const
struct
entropy_floor_properties
*
props
)
{
message
(
"Entropy floor is 'no entropy floor'."
);
}
/**
* @brief Write an entropy floor struct to the given FILE as a stream of bytes.
*
* Nothing to do here.
*
* @param props the struct
* @param stream the file stream
*/
static
INLINE
void
entropy_floor_struct_dump
(
const
struct
entropy_floor_properties
*
props
,
FILE
*
stream
)
{}
/**
* @brief Restore a entropy floor struct from the given FILE as a stream of
* bytes.
*
* Nothing to do here.
*
* @param props the struct
* @param stream the file stream
*/
static
INLINE
void
entropy_floor_struct_restore
(
struct
entropy_floor_properties
*
props
,
FILE
*
stream
)
{}
#endif
/* SWIFT_ENTROPY_FLOOR_NONE_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
sign in
to comment