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
cb40e538
"README.md" did not exist on "039540fd3476c0ee96f6dec7e6af599f671fe696"
Commit
cb40e538
authored
6 years ago
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Update star formation properties copying
parent
f0707789
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/runner.c
+2
-1
2 additions, 1 deletion
src/runner.c
src/starformation/schaye08/starformation.h
+7
-2
7 additions, 2 deletions
src/starformation/schaye08/starformation.h
with
9 additions
and
3 deletions
src/runner.c
+
2
−
1
View file @
cb40e538
...
...
@@ -470,6 +470,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
const
int
count
=
c
->
hydro
.
count
;
struct
part
*
restrict
parts
=
c
->
hydro
.
parts
;
struct
xpart
*
restrict
xparts
=
c
->
hydro
.
xparts
;
const
int
with_cosmology
=
(
e
->
policy
&
engine_policy_cosmology
);
TIMER_TIC
;
...
...
@@ -493,7 +494,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
//const float rho = hydro_get_physical_density(p, cosmo);
if
(
star_formation_convert_to_star
(
starform
,
p
,
xp
,
constants
,
cosmo
)
)
{
star_formation_copy_properties
(
e
,
c
,
p
,
xp
,
starform
,
constants
,
cosmo
);
star_formation_copy_properties
(
e
,
c
,
p
,
xp
,
starform
,
constants
,
cosmo
,
with_cosmology
);
//struct spart *sp = cell_conert_part_to_spart(c, p, ...);
//
...
...
This diff is collapsed.
Click to expand it.
src/starformation/schaye08/starformation.h
+
7
−
2
View file @
cb40e538
...
...
@@ -217,12 +217,17 @@ INLINE static int star_formation_convert_to_star(
INLINE
static
void
star_formation_copy_properties
(
struct
engine
*
e
,
struct
cell
*
c
,
struct
part
*
p
,
struct
xpart
*
xp
,
const
struct
star_formation
*
starform
,
const
struct
phys_const
*
const
phys_const
,
const
struct
cosmology
*
cosmo
)
{
const
struct
phys_const
*
const
phys_const
,
const
struct
cosmology
*
cosmo
,
int
with_cosmology
)
{
struct
spart
*
sp
=
cell_convert_part_to_spart
(
e
,
c
,
p
,
xp
);
sp
->
mass
=
p
->
mass
;
sp
->
mass_init
=
p
->
mass
;
sp
->
age
=
cosmo
->
a
;
if
(
with_cosmology
)
{
sp
->
age
=
cosmo
->
a
;
}
else
{
sp
->
age
=
cosmo
->
a
;
}
message
(
"Copy Properties"
);
}
...
...
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