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
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
974b30ba
Commit
974b30ba
authored
Sep 10, 2020
by
Mladen Ivkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved rt_struct initialisation/resetting out of stars files
parent
c3c46887
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
+10
-4
src/cell.c
src/cell.c
+3
-0
src/rt/debug/rt_io.h
src/rt/debug/rt_io.h
+1
-1
src/runner_ghost.c
src/runner_ghost.c
+2
-0
src/space.c
src/space.c
+4
-1
src/stars/GEAR/stars.h
src/stars/GEAR/stars.h
+0
-2
No files found.
src/cell.c
View file @
974b30ba
...
...
@@ -63,6 +63,7 @@
#include "minmax.h"
#include "multipole.h"
#include "pressure_floor.h"
#include "rt.h"
#include "scheduler.h"
#include "space.h"
#include "space_getsid.h"
...
...
@@ -5281,6 +5282,7 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
tracers_after_init
(
p
,
xp
,
e
->
internal_units
,
e
->
physical_constants
,
with_cosmology
,
e
->
cosmology
,
e
->
hydro_properties
,
e
->
cooling_func
,
e
->
time
);
rt_init_xpart
(
xp
);
}
}
...
...
@@ -5602,6 +5604,7 @@ void cell_drift_spart(struct cell *c, const struct engine *e, int force) {
if
(
spart_is_active
(
sp
,
e
))
{
stars_init_spart
(
sp
);
feedback_init_spart
(
sp
);
rt_init_spart
(
sp
);
}
}
...
...
src/rt/debug/rt_io.h
View file @
974b30ba
...
...
@@ -66,7 +66,7 @@ INLINE static int rt_write_stars(const struct spart* sparts,
"number of interactions between this hydro "
"particle and any star particle"
);
list
[
1
]
=
io_make_output_field
(
"RT
R
otalCalls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
0
,
sparts
,
rt_data
.
calls_tot
,
"RT
T
otalCalls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
0
,
sparts
,
rt_data
.
calls_tot
,
"total number of calls to this particle during the run"
);
list
[
2
]
=
io_make_output_field
(
"RTCallsThisStep"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
0
,
sparts
,
...
...
src/runner_ghost.c
View file @
974b30ba
...
...
@@ -33,6 +33,7 @@
#include "feedback.h"
#include "pressure_floor.h"
#include "pressure_floor_iact.h"
#include "rt.h"
#include "space_getsid.h"
#include "star_formation.h"
#include "stars.h"
...
...
@@ -315,6 +316,7 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
/* Re-initialise everything */
stars_init_spart
(
sp
);
feedback_init_spart
(
sp
);
rt_init_spart
(
sp
);
/* Off we go ! */
continue
;
...
...
src/space.c
View file @
974b30ba
...
...
@@ -5341,7 +5341,10 @@ void space_init_sparts_mapper(void *restrict map_data, int scount,
void
*
restrict
extra_data
)
{
struct
spart
*
restrict
sparts
=
(
struct
spart
*
)
map_data
;
for
(
int
k
=
0
;
k
<
scount
;
k
++
)
stars_init_spart
(
&
sparts
[
k
]);
for
(
int
k
=
0
;
k
<
scount
;
k
++
)
{
stars_init_spart
(
&
sparts
[
k
]);
rt_init_spart
(
&
sparts
[
k
]);
}
}
/**
...
...
src/stars/GEAR/stars.h
View file @
974b30ba
...
...
@@ -20,7 +20,6 @@
#define SWIFT_GEAR_STARS_H
#include "minmax.h"
#include "rt.h"
#include <float.h>
...
...
@@ -51,7 +50,6 @@ __attribute__((always_inline)) INLINE static void stars_init_spart(
sp
->
density
.
wcount
=
0
.
f
;
sp
->
density
.
wcount_dh
=
0
.
f
;
rt_init_spart
(
sp
);
}
/**
...
...
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