Skip to content
GitLab
Menu
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
8931ca11
Commit
8931ca11
authored
Jan 29, 2019
by
Matthieu Schaller
Browse files
Updated the ANARCHY-PU scheme with the new required functions for entropy floor and star formation.
parent
35ce681b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/hydro/AnarchyPU/hydro.h
View file @
8931ca11
...
...
@@ -362,6 +362,23 @@ hydro_set_physical_internal_energy_dt(struct part *restrict p,
p
->
u_dt
=
du_dt
/
cosmo
->
a_factor_internal_energy
;
}
/**
* @brief Sets the physical entropy of a particle
*
* @param p The particle of interest.
* @param xp The extended particle data.
* @param cosmo Cosmology data structure
* @param entropy The physical entropy
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_set_physical_entropy
(
struct
part
*
p
,
struct
xpart
*
xp
,
const
struct
cosmology
*
cosmo
,
const
float
entropy
)
{
/* Note there is no conversion from physical to comoving entropy */
const
float
comoving_entropy
=
entropy
;
xp
->
u_full
=
gas_internal_energy_from_entropy
(
p
->
rho
,
comoving_entropy
);
}
/**
* @brief Computes the hydro time-step of a given particle
*
...
...
src/hydro/AnarchyPU/hydro_part.h
View file @
8931ca11
...
...
@@ -33,6 +33,8 @@
#include
"chemistry_struct.h"
#include
"cooling_struct.h"
#include
"sftracers_struct.h"
#include
"tracers_struct.h"
/**
* @brief Particle fields not needed during the SPH loops over neighbours.
...
...
@@ -61,6 +63,12 @@ struct xpart {
/*! Additional data used to record cooling information */
struct
cooling_xpart_data
cooling_data
;
/* Additional data used by the tracers */
struct
tracers_xpart_data
tracers_data
;
/* Additional data used by the tracers */
struct
sftracers_xpart_data
sftracers_data
;
}
SWIFT_STRUCT_ALIGN
;
/**
...
...
Write
Preview
Supports
Markdown
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