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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
8931ca11
Commit
8931ca11
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Updated the ANARCHY-PU scheme with the new required functions for entropy floor and star formation.
parent
35ce681b
No related branches found
No related tags found
1 merge request
!705
Star formation following Schaye08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hydro/AnarchyPU/hydro.h
+17
-0
17 additions, 0 deletions
src/hydro/AnarchyPU/hydro.h
src/hydro/AnarchyPU/hydro_part.h
+8
-0
8 additions, 0 deletions
src/hydro/AnarchyPU/hydro_part.h
with
25 additions
and
0 deletions
src/hydro/AnarchyPU/hydro.h
+
17
−
0
View file @
8931ca11
...
@@ -362,6 +362,23 @@ hydro_set_physical_internal_energy_dt(struct part *restrict p,
...
@@ -362,6 +362,23 @@ hydro_set_physical_internal_energy_dt(struct part *restrict p,
p
->
u_dt
=
du_dt
/
cosmo
->
a_factor_internal_energy
;
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
* @brief Computes the hydro time-step of a given particle
*
*
...
...
This diff is collapsed.
Click to expand it.
src/hydro/AnarchyPU/hydro_part.h
+
8
−
0
View file @
8931ca11
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
#include
"chemistry_struct.h"
#include
"chemistry_struct.h"
#include
"cooling_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.
* @brief Particle fields not needed during the SPH loops over neighbours.
...
@@ -61,6 +63,12 @@ struct xpart {
...
@@ -61,6 +63,12 @@ struct xpart {
/*! Additional data used to record cooling information */
/*! Additional data used to record cooling information */
struct
cooling_xpart_data
cooling_data
;
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
;
}
SWIFT_STRUCT_ALIGN
;
/**
/**
...
...
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
register
or
sign in
to comment