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
4799b198
Commit
4799b198
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Also make use of the new data type for time in the space
parent
9d579c4b
No related branches found
No related tags found
1 merge request
!301
New time line
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/const.h
+1
-1
1 addition, 1 deletion
src/const.h
src/hydro/Gadget2/hydro.h
+2
-2
2 additions, 2 deletions
src/hydro/Gadget2/hydro.h
src/space.c
+2
-2
2 additions, 2 deletions
src/space.c
src/timeline.h
+1
-1
1 addition, 1 deletion
src/timeline.h
with
6 additions
and
6 deletions
src/const.h
+
1
−
1
View file @
4799b198
...
@@ -59,6 +59,6 @@
...
@@ -59,6 +59,6 @@
#define SOURCETERMS_NONE
#define SOURCETERMS_NONE
//#define SOURCETERMS_SN_FEEDBACK
//#define SOURCETERMS_SN_FEEDBACK
#define ICHECK 116650
#define ICHECK
-
116650
#endif
/* SWIFT_CONST_H */
#endif
/* SWIFT_CONST_H */
This diff is collapsed.
Click to expand it.
src/hydro/Gadget2/hydro.h
+
2
−
2
View file @
4799b198
...
@@ -288,8 +288,8 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
...
@@ -288,8 +288,8 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
* @param timeBase The minimal time-step size
* @param timeBase The minimal time-step size
*/
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_force
(
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_force
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
int
ti_current
,
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
double
timeBase
)
{
integertime_t
ti_current
,
double
timeBase
)
{
const
float
fac_mu
=
1
.
f
;
/* Will change with cosmological integration */
const
float
fac_mu
=
1
.
f
;
/* Will change with cosmological integration */
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
2
−
2
View file @
4799b198
...
@@ -246,7 +246,7 @@ void space_regrid(struct space *s, int verbose) {
...
@@ -246,7 +246,7 @@ void space_regrid(struct space *s, int verbose) {
const
size_t
nr_parts
=
s
->
nr_parts
;
const
size_t
nr_parts
=
s
->
nr_parts
;
const
ticks
tic
=
getticks
();
const
ticks
tic
=
getticks
();
const
int
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
const
int
egertime_t
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
/* Run through the cells and get the current h_max. */
/* Run through the cells and get the current h_max. */
// tic = getticks();
// tic = getticks();
...
@@ -480,7 +480,7 @@ void space_rebuild(struct space *s, int verbose) {
...
@@ -480,7 +480,7 @@ void space_rebuild(struct space *s, int verbose) {
size_t
nr_parts
=
s
->
nr_parts
;
size_t
nr_parts
=
s
->
nr_parts
;
size_t
nr_gparts
=
s
->
nr_gparts
;
size_t
nr_gparts
=
s
->
nr_gparts
;
struct
cell
*
restrict
cells_top
=
s
->
cells_top
;
struct
cell
*
restrict
cells_top
=
s
->
cells_top
;
const
int
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
const
int
egertime_t
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
/* Run through the particles and get their cell index. Allocates
/* Run through the particles and get their cell index. Allocates
an index that is larger than the number of particles to avoid
an index that is larger than the number of particles to avoid
...
...
This diff is collapsed.
Click to expand it.
src/timeline.h
+
1
−
1
View file @
4799b198
...
@@ -56,7 +56,7 @@ static INLINE integertime_t get_integer_timestep(timebin_t bin) {
...
@@ -56,7 +56,7 @@ static INLINE integertime_t get_integer_timestep(timebin_t bin) {
static
INLINE
timebin_t
get_time_bin
(
integertime_t
time_step
)
{
static
INLINE
timebin_t
get_time_bin
(
integertime_t
time_step
)
{
/* ((int) log_2(time_step)) - 1 */
/* ((int) log_2(time_step)) - 1 */
return
62
-
intrinsics_clzll
(
time_step
);
return
(
timebin_t
)(
62
-
intrinsics_clzll
(
time_step
)
)
;
}
}
/**
/**
...
...
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