Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
de493833
Commit
de493833
authored
Aug 22, 2016
by
Matthieu Schaller
Browse files
Print time-step information to the screen before drifting. Code formatting.
parent
562e07ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cell.h
View file @
de493833
...
...
@@ -141,8 +141,8 @@ struct cell {
struct
task
*
extra_ghost
,
*
ghost
,
*
init
,
*
kick
;
#ifdef WITH_MPI
/* Task receiving data. */
/* Task receiving data. */
struct
task
*
recv_xv
,
*
recv_rho
,
*
recv_gradient
,
*
recv_ti
;
/* Task send data. */
...
...
@@ -217,8 +217,6 @@ int cell_unpack_ti_ends(struct cell *c, int *ti_ends);
int
cell_getsize
(
struct
cell
*
c
);
int
cell_link_parts
(
struct
cell
*
c
,
struct
part
*
parts
);
int
cell_link_gparts
(
struct
cell
*
c
,
struct
gpart
*
gparts
);
void
cell_init_parts
(
struct
cell
*
c
,
void
*
data
);
void
cell_init_gparts
(
struct
cell
*
c
,
void
*
data
);
void
cell_convert_hydro
(
struct
cell
*
c
,
void
*
data
);
void
cell_clean_links
(
struct
cell
*
c
,
void
*
data
);
int
cell_are_neighbours
(
const
struct
cell
*
restrict
ci
,
...
...
src/engine.c
View file @
de493833
...
...
@@ -2692,10 +2692,6 @@ void engine_step(struct engine *e) {
e
->
timeOld
=
e
->
ti_old
*
e
->
timeBase
+
e
->
timeBegin
;
e
->
timeStep
=
(
e
->
ti_current
-
e
->
ti_old
)
*
e
->
timeBase
+
snapshot_drift_time
;
/* Drift only the necessary particles */
threadpool_map
(
&
e
->
threadpool
,
runner_do_drift_mapper
,
e
->
s
->
cells
,
e
->
s
->
nr_cells
,
sizeof
(
struct
cell
),
1
,
e
);
if
(
e
->
nodeID
==
0
)
{
/* Print some information to the screen */
...
...
@@ -2714,6 +2710,10 @@ void engine_step(struct engine *e) {
e
->
timeLastStatistics
+=
e
->
deltaTimeStatistics
;
}
/* Drift only the necessary particles */
threadpool_map
(
&
e
->
threadpool
,
runner_do_drift_mapper
,
e
->
s
->
cells
,
e
->
s
->
nr_cells
,
sizeof
(
struct
cell
),
1
,
e
);
/* Re-distribute the particles amongst the nodes? */
if
(
e
->
forcerepart
!=
REPART_NONE
)
engine_repartition
(
e
);
...
...
src/units.h
View file @
de493833
...
...
@@ -35,20 +35,19 @@
struct
UnitSystem
{
/*! Conversion factor from grams to internal mass units */
double
UnitMass_in_cgs
;
double
UnitMass_in_cgs
;
/*! Conversion factor from centimeters to internal length unit */
double
UnitLength_in_cgs
;
double
UnitLength_in_cgs
;
/*! Conversion factor from seconds to internal time units */
double
UnitTime_in_cgs
;
double
UnitTime_in_cgs
;
/*! Conversion factor from Ampere to internal current units */
double
UnitCurrent_in_cgs
;
double
UnitCurrent_in_cgs
;
/*! Conversion factor from Kelvins to internal temperature units. */
double
UnitTemperature_in_cgs
;
double
UnitTemperature_in_cgs
;
};
/**
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment