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
0413c8b0
Commit
0413c8b0
authored
3 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Add missing empty functions in the const-Lambda and const-du cooling models
parent
95210ce9
No related branches found
No related tags found
1 merge request
!1573
Master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cooling/EAGLE/cooling.c
+1
-1
1 addition, 1 deletion
src/cooling/EAGLE/cooling.c
src/cooling/const_du/cooling.h
+47
-0
47 additions, 0 deletions
src/cooling/const_du/cooling.h
src/cooling/const_lambda/cooling.h
+47
-0
47 additions, 0 deletions
src/cooling/const_lambda/cooling.h
with
95 additions
and
1 deletion
src/cooling/EAGLE/cooling.c
+
1
−
1
View file @
0413c8b0
...
@@ -667,7 +667,7 @@ float cooling_get_temperature(
...
@@ -667,7 +667,7 @@ float cooling_get_temperature(
* @brief Compute the electron pressure of a #part based on the cooling
* @brief Compute the electron pressure of a #part based on the cooling
* function.
* function.
*
*
*
There are no subgrid properties
in this model
, w
e return 0.
*
Does not exist
in this model
. W
e return 0.
*
*
* @param phys_const #phys_const data structure.
* @param phys_const #phys_const data structure.
* @param hydro_props The properties of the hydro scheme.
* @param hydro_props The properties of the hydro scheme.
...
...
This diff is collapsed.
Click to expand it.
src/cooling/const_du/cooling.h
+
47
−
0
View file @
0413c8b0
...
@@ -148,6 +148,53 @@ __attribute__((always_inline)) INLINE static float cooling_timestep(
...
@@ -148,6 +148,53 @@ __attribute__((always_inline)) INLINE static float cooling_timestep(
return
cooling
->
cooling_tstep_mult
*
internal_energy
/
fabsf
(
cooling_rate
);
return
cooling
->
cooling_tstep_mult
*
internal_energy
/
fabsf
(
cooling_rate
);
}
}
/**
* @brief Compute the electron pressure of a #part based on the cooling
* function.
*
* Does not exist in this model. We return 0.
*
* @param phys_const #phys_const data structure.
* @param hydro_props The properties of the hydro scheme.
* @param us The internal system of units.
* @param cosmo #cosmology data structure.
* @param cooling #cooling_function_data struct.
* @param p #part data.
* @param xp Pointer to the #xpart data.
*/
__attribute__
((
always_inline
))
INLINE
static
double
cooling_get_electron_pressure
(
const
struct
phys_const
*
phys_const
,
const
struct
hydro_props
*
hydro_props
,
const
struct
unit_system
*
us
,
const
struct
cosmology
*
cosmo
,
const
struct
cooling_function_data
*
cooling
,
const
struct
part
*
p
,
const
struct
xpart
*
xp
)
{
return
0
;
}
/**
* @brief Compute the y-Compton contribution of a #part based on the cooling
* function.
*
* Does not exist in this model. We return 0.
*
* @param phys_const #phys_const data structure.
* @param hydro_props The properties of the hydro scheme.
* @param us The internal system of units.
* @param cosmo #cosmology data structure.
* @param cooling #cooling_function_data struct.
* @param p #part data.
* @param xp Pointer to the #xpart data.
*/
__attribute__
((
always_inline
))
INLINE
static
double
cooling_get_ycompton
(
const
struct
phys_const
*
phys_const
,
const
struct
hydro_props
*
hydro_props
,
const
struct
unit_system
*
us
,
const
struct
cosmology
*
cosmo
,
const
struct
cooling_function_data
*
cooling
,
const
struct
part
*
p
,
const
struct
xpart
*
xp
)
{
error
(
"This cooling model does not compute Compton Y!"
);
return
0
.;
}
/**
/**
* @brief Sets the cooling properties of the (x-)particles to a valid start
* @brief Sets the cooling properties of the (x-)particles to a valid start
* state.
* state.
...
...
This diff is collapsed.
Click to expand it.
src/cooling/const_lambda/cooling.h
+
47
−
0
View file @
0413c8b0
...
@@ -228,6 +228,53 @@ __attribute__((always_inline)) INLINE static float cooling_timestep(
...
@@ -228,6 +228,53 @@ __attribute__((always_inline)) INLINE static float cooling_timestep(
return
cooling
->
cooling_tstep_mult
*
u
/
fabsf
(
cooling_du_dt
);
return
cooling
->
cooling_tstep_mult
*
u
/
fabsf
(
cooling_du_dt
);
}
}
/**
* @brief Compute the electron pressure of a #part based on the cooling
* function.
*
* Does not exist in this model. We return 0.
*
* @param phys_const #phys_const data structure.
* @param hydro_props The properties of the hydro scheme.
* @param us The internal system of units.
* @param cosmo #cosmology data structure.
* @param cooling #cooling_function_data struct.
* @param p #part data.
* @param xp Pointer to the #xpart data.
*/
__attribute__
((
always_inline
))
INLINE
static
double
cooling_get_electron_pressure
(
const
struct
phys_const
*
phys_const
,
const
struct
hydro_props
*
hydro_props
,
const
struct
unit_system
*
us
,
const
struct
cosmology
*
cosmo
,
const
struct
cooling_function_data
*
cooling
,
const
struct
part
*
p
,
const
struct
xpart
*
xp
)
{
return
0
;
}
/**
* @brief Compute the y-Compton contribution of a #part based on the cooling
* function.
*
* Does not exist in this model. We return 0.
*
* @param phys_const #phys_const data structure.
* @param hydro_props The properties of the hydro scheme.
* @param us The internal system of units.
* @param cosmo #cosmology data structure.
* @param cooling #cooling_function_data struct.
* @param p #part data.
* @param xp Pointer to the #xpart data.
*/
__attribute__
((
always_inline
))
INLINE
static
double
cooling_get_ycompton
(
const
struct
phys_const
*
phys_const
,
const
struct
hydro_props
*
hydro_props
,
const
struct
unit_system
*
us
,
const
struct
cosmology
*
cosmo
,
const
struct
cooling_function_data
*
cooling
,
const
struct
part
*
p
,
const
struct
xpart
*
xp
)
{
error
(
"This cooling model does not compute Compton Y!"
);
return
0
.;
}
/**
/**
* @brief Sets the cooling properties of the (x-)particles to a valid start
* @brief Sets the cooling properties of the (x-)particles to a valid start
* state.
* state.
...
...
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