Skip to content
GitLab
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
e81732ec
Commit
e81732ec
authored
Feb 06, 2019
by
Matthieu Schaller
Browse files
Add the missing functions to the gizmo schemes.
parent
fb7f71e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/hydro/GizmoMFM/hydro.h
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
*
...
...
src/hydro/GizmoMFV/hydro.h
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
*
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment