Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
dumux-repositories
dumux
Commits
3715eebe
Commit
3715eebe
authored
3 years ago
by
Timo Koch
Committed by
Ned Coltman
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[test] Add test for AABBTree-based distance field
parent
836c9de4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2708
Add new class for calculating wall distance
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/geometry/CMakeLists.txt
+1
-1
1 addition, 1 deletion
test/geometry/CMakeLists.txt
test/geometry/test_distance.cc
+10
-0
10 additions, 0 deletions
test/geometry/test_distance.cc
with
11 additions
and
1 deletion
test/geometry/CMakeLists.txt
+
1
−
1
View file @
3715eebe
add_subdirectory
(
boundingboxtree
)
set
(
CMAKE_BUILD_TYPE Debug
)
dumux_add_test
(
SOURCES test_0d1d_intersection.cc LABELS unit
)
dumux_add_test
(
SOURCES test_0d2d_intersection.cc LABELS unit
)
dumux_add_test
(
SOURCES test_0d3d_intersection.cc LABELS unit
)
...
...
This diff is collapsed.
Click to expand it.
test/geometry/test_distance.cc
+
10
−
0
View file @
3715eebe
...
...
@@ -139,6 +139,16 @@ void checkDistanceField(const std::vector<Geometry>& geometries,
if
(
Dune
::
FloatCmp
::
ne
(
d
,
d2
)
||
idx
!=
idx2
)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Distance field using bounding spheres does"
"not return same result as without bounding spheres"
);
AABBDistanceField
<
Geometry
>
distanceFieldAABB
(
geometries
);
const
auto
[
d3
,
idx3
]
=
distanceFieldAABB
.
distanceAndIndex
(
p
);
if
(
Dune
::
FloatCmp
::
ne
(
d
,
d3
)
||
idx
!=
idx3
)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Distance field using AABB tree does"
"not return same result as other distance fields -> "
"expected ("
<<
d
<<
", "
<<
idx
<<
") got ("
<<
d3
<<
", "
<<
idx3
<<
")"
);
}
// checks the distances between various points with points/segments/lines
...
...
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