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
e81732ec
Commit
e81732ec
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Add the missing functions to the gizmo schemes.
parent
fb7f71e1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hydro/GizmoMFM/hydro.h
+74
-0
74 additions, 0 deletions
src/hydro/GizmoMFM/hydro.h
src/hydro/GizmoMFV/hydro.h
+74
-0
74 additions, 0 deletions
src/hydro/GizmoMFV/hydro.h
with
148 additions
and
0 deletions
src/hydro/GizmoMFM/hydro.h
+
74
−
0
View file @
e81732ec
...
...
@@ -913,6 +913,80 @@ __attribute__((always_inline)) INLINE static void hydro_get_drifted_velocities(
v
[
2
]
+=
xp
->
a_grav
[
2
]
*
dt_kick_grav
;
}
/**
* @brief Returns the time derivative of co-moving internal energy of a particle
*
* We assume a constant density.
*
* @param p The particle of interest
*/
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_comoving_internal_energy_dt
(
const
struct
part
*
restrict
p
)
{
error
(
"Needs implementing"
);
return
0
.
f
;
}
/**
* @brief Returns the time derivative of physical internal energy of a particle
*
* We assume a constant density.
*
* @param p The particle of interest.
* @param cosmo The cosmological model.
*/
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_physical_internal_energy_dt
(
const
struct
part
*
restrict
p
,
const
struct
cosmology
*
cosmo
)
{
error
(
"Needs implementing"
);
return
0
.
f
;
}
/**
* @brief Sets the time derivative of the co-moving internal energy of a
* particle
*
* We assume a constant density for the conversion to entropy.
*
* @param p The particle of interest.
* @param du_dt The new time derivative of the comoving internal energy.
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_set_comoving_internal_energy_dt
(
struct
part
*
restrict
p
,
const
float
du_dt
)
{
error
(
"Needs implementing"
);
}
/**
* @brief Sets the time derivative of the physical internal energy of a particle
*
* We assume a constant density for the conversion to entropy.
*
* @param p The particle of interest.
* @param cosmo Cosmology data structure
* @param du_dt The time derivative of the physical internal energy.
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_set_physical_internal_energy_dt
(
struct
part
*
restrict
p
,
const
struct
cosmology
*
restrict
cosmo
,
const
float
du_dt
)
{
error
(
"Needs implementing"
);
}
/**
* @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
)
{
error
(
"Needs implementing"
);
}
/**
* @brief Returns the comoving density of a particle
*
...
...
This diff is collapsed.
Click to expand it.
src/hydro/GizmoMFV/hydro.h
+
74
−
0
View file @
e81732ec
...
...
@@ -987,6 +987,80 @@ __attribute__((always_inline)) INLINE static void hydro_get_drifted_velocities(
v
[
2
]
+=
xp
->
a_grav
[
2
]
*
dt_kick_grav
;
}
/**
* @brief Returns the time derivative of co-moving internal energy of a particle
*
* We assume a constant density.
*
* @param p The particle of interest
*/
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_comoving_internal_energy_dt
(
const
struct
part
*
restrict
p
)
{
error
(
"Needs implementing"
);
return
0
.
f
;
}
/**
* @brief Returns the time derivative of physical internal energy of a particle
*
* We assume a constant density.
*
* @param p The particle of interest.
* @param cosmo The cosmological model.
*/
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_physical_internal_energy_dt
(
const
struct
part
*
restrict
p
,
const
struct
cosmology
*
cosmo
)
{
error
(
"Needs implementing"
);
return
0
.
f
;
}
/**
* @brief Sets the time derivative of the co-moving internal energy of a
* particle
*
* We assume a constant density for the conversion to entropy.
*
* @param p The particle of interest.
* @param du_dt The new time derivative of the comoving internal energy.
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_set_comoving_internal_energy_dt
(
struct
part
*
restrict
p
,
const
float
du_dt
)
{
error
(
"Needs implementing"
);
}
/**
* @brief Sets the time derivative of the physical internal energy of a particle
*
* We assume a constant density for the conversion to entropy.
*
* @param p The particle of interest.
* @param cosmo Cosmology data structure
* @param du_dt The time derivative of the physical internal energy.
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_set_physical_internal_energy_dt
(
struct
part
*
restrict
p
,
const
struct
cosmology
*
restrict
cosmo
,
const
float
du_dt
)
{
error
(
"Needs implementing"
);
}
/**
* @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
)
{
error
(
"Needs implementing"
);
}
/**
* @brief Returns the comoving density of a particle
*
...
...
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