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
5fbf74b3
"git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" did not exist on "6734027bc1417edfd64ae1906ba088a7f118650b"
Commit
5fbf74b3
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting.
parent
b2692841
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!350
Test periodic bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/testPeriodicBC.c
+6
-3
6 additions, 3 deletions
tests/testPeriodicBC.c
tests/tolerance_periodic_BC_normal.dat
+2
-2
2 additions, 2 deletions
tests/tolerance_periodic_BC_normal.dat
with
8 additions
and
5 deletions
tests/testPeriodicBC.c
+
6
−
3
View file @
5fbf74b3
...
...
@@ -211,7 +211,8 @@ void end_calculation(struct cell *c) {
/**
* @brief Dump all the particles to a file
*/
void
dump_particle_fields
(
char
*
fileName
,
struct
cell
*
main_cell
,
int
i
,
int
j
,
int
k
)
{
void
dump_particle_fields
(
char
*
fileName
,
struct
cell
*
main_cell
,
int
i
,
int
j
,
int
k
)
{
FILE
*
file
=
fopen
(
fileName
,
"a"
);
/* Write header */
...
...
@@ -221,7 +222,8 @@ void dump_particle_fields(char *fileName, struct cell *main_cell, int i, int j,
"ID"
,
"pos_x"
,
"pos_y"
,
"pos_z"
,
"v_x"
,
"v_y"
,
"v_z"
,
"rho"
,
"rho_dh"
,
"wcount"
,
"wcount_dh"
,
"div_v"
,
"curl_vx"
,
"curl_vy"
,
"curl_vz"
);
fprintf
(
file
,
"# Centre cell at (i,j,k)=(%d, %d, %d) ---------------------
\n
"
,
i
,
j
,
k
);
fprintf
(
file
,
"# Centre cell at (i,j,k)=(%d, %d, %d) ---------------------
\n
"
,
i
,
j
,
k
);
/* Write main cell */
for
(
int
pid
=
0
;
pid
<
main_cell
->
count
;
pid
++
)
{
...
...
@@ -369,7 +371,8 @@ void test_boundary_conditions(struct cell **cells, struct runner runner,
end_calculation
(
main_cell
);
/* Dump */
dump_particle_fields
(
bruteForceOutputFileName
,
main_cell
,
loc_i
,
loc_j
,
loc_k
);
dump_particle_fields
(
bruteForceOutputFileName
,
main_cell
,
loc_i
,
loc_j
,
loc_k
);
}
/* And go... */
...
...
This diff is collapsed.
Click to expand it.
tests/tolerance_periodic_BC_normal.dat
+
2
−
2
View file @
5fbf74b3
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 4e-6 4e-5
2
e-4 3e-3 2e-4 1e-4 1e-4 1e-4
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6 2e-4 1e-4 1e-4
5
e-4 2e-3 2e-3 2e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 4e-6 4e-5
3
e-4 3e-3 2e-4 1e-4 1e-4 1e-4
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6 2e-4 1e-4 1e-4
6
e-4 2e-3 2e-3 2e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-4 1e-6 1e-4 5e-4 2e-4 2e-4 2e-4
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