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
274bc00f
Commit
274bc00f
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Added BC tests for cells that are in the centre of the edges of the domain.
parent
61c89635
No related branches found
No related tags found
1 merge request
!350
Test periodic bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/testPeriodicBC.c
+25
-7
25 additions, 7 deletions
tests/testPeriodicBC.c
with
25 additions
and
7 deletions
tests/testPeriodicBC.c
+
25
−
7
View file @
274bc00f
...
...
@@ -511,7 +511,9 @@ int main(int argc, char *argv[]) {
/* Delete files if they already exist. */
remove
(
swiftOutputFileName
);
remove
(
bruteForceOutputFileName
);
const
int
half_dim
=
(
dim
-
1
)
/
2
;
/* Test the periodic boundary conditions for each of the 8 corners. */
test_boundary_conditions
(
cells
,
runner
,
0
,
0
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
0
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
...
...
@@ -523,12 +525,28 @@ int main(int argc, char *argv[]) {
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
dim
-
1
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
/* Test the boundary conditions for cells at the centre of each face of the box. */
test_boundary_conditions
(
cells
,
runner
,
(
dim
-
1
)
/
2
,
(
dim
-
1
)
/
2
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
(
dim
-
1
)
/
2
,
(
dim
-
1
)
/
2
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
(
dim
-
1
)
/
2
,
(
dim
-
1
)
/
2
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
(
dim
-
1
)
/
2
,
(
dim
-
1
)
/
2
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
(
dim
-
1
)
/
2
,
0
,
(
dim
-
1
)
/
2
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
(
dim
-
1
)
/
2
,
dim
-
1
,
(
dim
-
1
)
/
2
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
half_dim
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
half_dim
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
half_dim
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
half_dim
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
0
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
dim
-
1
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
/* Test the boundary conditions for cells at the centre of each edge of the box. */
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
dim
-
1
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
dim
-
1
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
dim
-
1
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
dim
-
1
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
half_dim
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
half_dim
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
half_dim
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
half_dim
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
0
,
0
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
dim
-
1
,
0
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
half_dim
,
0
,
dim
-
1
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
test_boundary_conditions
(
cells
,
runner
,
0
,
0
,
half_dim
,
dim
,
swiftOutputFileName
,
bruteForceOutputFileName
);
/* Clean things to make the sanitizer happy ... */
for
(
int
i
=
0
;
i
<
512
;
++
i
)
clean_up
(
cells
[
i
]);
...
...
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