Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Milestones
Merge Requests
13
Merge Requests
13
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
f6fb95a8
Commit
f6fb95a8
authored
Apr 15, 2020
by
Loic Hausammann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GEAR: first corrections
parent
80f7bdf6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
38 deletions
+14
-38
examples/parameter_example.yml
examples/parameter_example.yml
+2
-0
src/feedback/GEAR/stellar_evolution.c
src/feedback/GEAR/stellar_evolution.c
+8
-8
src/feedback/GEAR/supernovae_ii.c
src/feedback/GEAR/supernovae_ii.c
+4
-8
src/pressure_floor/GEAR/pressure_floor.h
src/pressure_floor/GEAR/pressure_floor.h
+0
-22
No files found.
examples/parameter_example.yml
View file @
f6fb95a8
...
...
@@ -419,6 +419,8 @@ QLAStarFormation:
GEARStarFormation
:
star_formation_efficiency
:
0.01
# star formation efficiency (c_*)
maximal_temperature
:
3e4
# Upper limit to the temperature of a star forming particle
n_stars_per_particle
:
4
# Number of stars that an hydro particle can generate
min_mass_frac
:
0.5
# Minimal mass for a stellar particle as a fraction of the average mass for the stellar particles.
# Parameters related to feedback models -----------------------------------------------
...
...
src/feedback/GEAR/stellar_evolution.c
View file @
f6fb95a8
...
...
@@ -311,18 +311,18 @@ void stellar_evolution_evolve_spart(
const
float
m_init
=
sp
->
sf_data
.
birth_mass
/
phys_const
->
const_solar_mass
;
/* Compute number of SNIa */
const
float
number_snia_f
=
can_produce_snia
?
supernovae_ia_get_number_per_unit_mass
(
const
float
number_snia_f
=
!
can_produce_snia
?
0
:
supernovae_ia_get_number_per_unit_mass
(
&
sm
->
snia
,
m_end_step
,
m_beg_step
)
*
m_init
:
0
;
m_init
;
/* Compute number of SNII */
const
float
number_snii_f
=
can_produce_snii
?
supernovae_ii_get_number_per_unit_mass
(
const
float
number_snii_f
=
!
can_produce_snii
?
0
:
supernovae_ii_get_number_per_unit_mass
(
&
sm
->
snii
,
m_end_step
,
m_beg_step
)
*
m_init
:
0
;
m_init
;
/* Does this star produce a supernovae? */
if
(
number_snia_f
==
0
&&
number_snii_f
==
0
)
return
;
...
...
src/feedback/GEAR/supernovae_ii.c
View file @
f6fb95a8
...
...
@@ -412,8 +412,7 @@ void supernovae_ii_dump(const struct supernovae_ii *snii, FILE *stream,
if
(
snii
->
integrated
.
yields
[
i
].
data
!=
NULL
)
{
/* Generate name */
char
name
[
200
];
strcpy
(
name
,
element_name
);
strcat
(
name
,
"_int"
);
sprintf
(
name
,
"%s_int"
,
element_name
);
/* Write the array */
restart_write_blocks
((
void
*
)
snii
->
integrated
.
yields
[
i
].
data
,
...
...
@@ -425,8 +424,7 @@ void supernovae_ii_dump(const struct supernovae_ii *snii, FILE *stream,
if
(
snii
->
raw
.
yields
[
i
].
data
!=
NULL
)
{
/* Generate name */
char
name
[
200
];
strcpy
(
name
,
element_name
);
strcat
(
name
,
"_raw"
);
sprintf
(
name
,
"%s_raw"
,
element_name
);
/* Write the array */
restart_write_blocks
((
void
*
)
snii
->
raw
.
yields
[
i
].
data
,
sizeof
(
float
),
...
...
@@ -488,8 +486,7 @@ void supernovae_ii_restore(struct supernovae_ii *snii, FILE *stream,
if
(
snii
->
integrated
.
yields
[
i
].
data
!=
NULL
)
{
/* Generate name */
char
name
[
200
];
strcpy
(
name
,
element_name
);
strcat
(
name
,
"_int"
);
sprintf
(
name
,
"%s_int"
,
element_name
);
/* Allocate the memory */
snii
->
integrated
.
yields
[
i
].
data
=
...
...
@@ -508,8 +505,7 @@ void supernovae_ii_restore(struct supernovae_ii *snii, FILE *stream,
if
(
snii
->
raw
.
yields
[
i
].
data
!=
NULL
)
{
/* Generate name */
char
name
[
200
];
strcpy
(
name
,
element_name
);
strcat
(
name
,
"_raw"
);
sprintf
(
name
,
"%s_raw"
,
element_name
);
/* Allocate the memory */
snii
->
raw
.
yields
[
i
].
data
=
...
...
src/pressure_floor/GEAR/pressure_floor.h
View file @
f6fb95a8
...
...
@@ -24,9 +24,6 @@ struct cosmology;
__attribute__
((
always_inline
))
static
INLINE
float
pressure_floor_get_comoving_pressure
(
const
struct
part
*
p
,
const
float
pressure
,
const
struct
cosmology
*
cosmo
);
__attribute__
((
always_inline
))
static
INLINE
float
pressure_floor_get_physical_pressure
(
const
struct
part
*
p
,
const
float
pressure
,
const
struct
cosmology
*
cosmo
);
#include "adiabatic_index.h"
#include "cosmology.h"
...
...
@@ -55,25 +52,6 @@ struct pressure_floor_properties {
float
constants
;
};
/**
* @brief Compute the physical pressure floor of a given #part.
*
* Note that the particle is not updated!!
*
* @param p The #part.
* @param pressure_physical The physical pressure without any pressure floor.
* @param cosmo The #cosmology model.
*
* @return The physical pressure with the floor.
*/
__attribute__
((
always_inline
))
static
INLINE
float
pressure_floor_get_physical_pressure
(
const
struct
part
*
p
,
const
float
pressure_physical
,
const
struct
cosmology
*
cosmo
)
{
error
(
"Not used."
);
return
0
;
}
/**
* @brief Compute the comoving pressure floor of a given #part.
*
...
...
Write
Preview
Markdown
is supported
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