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
c62da58f
Commit
c62da58f
authored
Oct 06, 2017
by
James Willis
Browse files
Call DOPAIR2_BRANCH and make sure that each cell's max timestep is above the current time.
parent
d959e046
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testActivePair.c
View file @
c62da58f
...
...
@@ -142,7 +142,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell
->
ti_old_part
=
8
;
cell
->
ti_end_min
=
8
;
cell
->
ti_end_max
=
8
;
cell
->
ti_end_max
=
10
;
shuffle_particles
(
cell
->
parts
,
cell
->
count
);
...
...
@@ -220,6 +220,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci, struct cell *cj
void
runner_doself1_density_vec
(
struct
runner
*
r
,
struct
cell
*
ci
);
void
runner_dopair1_branch_density
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
);
void
runner_dopair2_branch_force
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
);
/**
* @brief Computes the pair interactions of two cells using SWIFT and a brute
...
...
@@ -542,7 +544,7 @@ int main(int argc, char *argv[]) {
/* Re-assign function pointers. */
serial_inter_func
=
&
pairs_all_force
;
vec_inter_func
=
&
runner_dopair2_force
_vec
;
vec_inter_func
=
&
runner_dopair2_
branch_
force
;
/* Create new output file names. */
sprintf
(
swiftOutputFileName
,
"swift_dopair2_force_%s.dat"
,
outputFileNameExtension
);
...
...
@@ -554,6 +556,9 @@ int main(int argc, char *argv[]) {
remove
(
bruteForceOutputFileName
);
/* Test a pair of cells face-on. */
offset
[
0
]
=
1
.;
offset
[
1
]
=
0
.;
offset
[
2
]
=
0
.;
test_all_pair_interactions
(
runner
,
offset
,
particles
,
size
,
h
,
rho
,
&
partId
,
perturbation
,
h_pert
,
swiftOutputFileName
,
bruteForceOutputFileName
,
serial_inter_func
,
vec_inter_func
);
...
...
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