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
54be8998
Commit
54be8998
authored
6 years ago
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Add the star formation struct to the main.c and engine_init
parent
21e886b8
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!705
Star formation following Schaye08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/main.c
+7
-1
7 additions, 1 deletion
examples/main.c
src/engine.h
+3
-0
3 additions, 0 deletions
src/engine.h
with
10 additions
and
1 deletion
examples/main.c
+
7
−
1
View file @
54be8998
...
...
@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
struct
cooling_function_data
cooling_func
;
struct
cosmology
cosmo
;
struct
external_potential
potential
;
struct
star_formation
starform
;
struct
pm_mesh
mesh
;
struct
gpart
*
gparts
=
NULL
;
struct
gravity_props
gravity_properties
;
...
...
@@ -862,6 +863,11 @@ int main(int argc, char *argv[]) {
cooling_init
(
params
,
&
us
,
&
prog_const
,
&
cooling_func
);
if
(
myrank
==
0
)
cooling_print
(
&
cooling_func
);
/* Initialise the star formation law and its properties */
if
(
with_star_formation
)
starformation_init
(
params
,
&
prog_const
,
&
us
,
&
s
,
&
starform
);
if
(
myrank
==
0
)
starformation_init
(
&
starform
);
/* Initialise the chemistry */
bzero
(
&
chemistry
,
sizeof
(
struct
chemistry_global_data
));
chemistry_init
(
params
,
&
us
,
&
prog_const
,
&
chemistry
);
...
...
@@ -890,7 +896,7 @@ int main(int argc, char *argv[]) {
engine_init
(
&
e
,
&
s
,
params
,
N_total
[
0
],
N_total
[
1
],
N_total
[
2
],
engine_policies
,
talking
,
&
reparttype
,
&
us
,
&
prog_const
,
&
cosmo
,
&
hydro_properties
,
&
gravity_properties
,
&
stars_properties
,
&
mesh
,
&
potential
,
&
cooling_func
,
&
chemistry
);
&
mesh
,
&
potential
,
&
cooling_func
,
&
starform
,
&
chemistry
);
engine_config
(
0
,
&
e
,
params
,
nr_nodes
,
myrank
,
nr_threads
,
with_aff
,
talking
,
restart_file
);
...
...
This diff is collapsed.
Click to expand it.
src/engine.h
+
3
−
0
View file @
54be8998
...
...
@@ -356,6 +356,9 @@ struct engine {
/* Properties of the cooling scheme */
struct
cooling_function_data
*
cooling_func
;
/* Properties of the starformation law */
const
struct
star_formation
*
star_formation
;
/* Properties of the chemistry model */
const
struct
chemistry_global_data
*
chemistry
;
...
...
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