Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
5c1aff90
Commit
5c1aff90
authored
Jun 21, 2016
by
Quentin Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove remaining deprecated warnings after FTreeCoordinate simplification
parent
e9c6352e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
26 deletions
+17
-26
Src/Containers/FNeighborIndexes.hpp
Src/Containers/FNeighborIndexes.hpp
+1
-2
Tests/Utils/testOctreePrintMorton.cpp
Tests/Utils/testOctreePrintMorton.cpp
+4
-7
UTests/utestMorton.cpp
UTests/utestMorton.cpp
+7
-9
UTests/utestNeighborIndexes.cpp
UTests/utestNeighborIndexes.cpp
+5
-8
No files found.
Src/Containers/FNeighborIndexes.hpp
View file @
5c1aff90
...
...
@@ -53,7 +53,7 @@ class FCoordinateNeighborIndex : public FAbstractNeighborIndex{
public:
FCoordinateNeighborIndex
(
const
MortonIndex
inMindex
,
const
int
inLevel
)
:
mindex
(
inMindex
),
level
(
inLevel
),
coord
(
mindex
,
level
)
{
:
mindex
(
inMindex
),
level
(
inLevel
),
coord
(
mindex
)
{
currentMinX
=
(
coord
.
getX
()
==
0
?
0
:
-
1
);
currentMinY
=
(
coord
.
getY
()
==
0
?
0
:
-
1
);
...
...
@@ -233,4 +233,3 @@ public:
};
#endif // FNEIGHBORINDEXES_HPP
Tests/Utils/testOctreePrintMorton.cpp
View file @
5c1aff90
...
...
@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
...
...
@@ -274,7 +274,7 @@ int main(int argc, char ** argv){
}
while
(
sscanf
(
buffer
,
"%lld"
,
&
index
)
!=
1
);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
index
,
requiredlevel
);
coord
.
setPositionFromMorton
(
index
);
std
::
cout
<<
" This position is in the boxe x = "
<<
coord
.
getX
()
<<
" y = "
<<
coord
.
getY
()
<<
" z = "
<<
coord
.
getZ
()
<<
"
\n
"
;
...
...
@@ -293,6 +293,3 @@ int main(int argc, char ** argv){
return
0
;
}
UTests/utestMorton.cpp
View file @
5c1aff90
...
...
@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#include "FUTester.hpp"
...
...
@@ -30,21 +30,21 @@ class TestMorton : public FUTester<TestMorton> {
{
FTreeCoordinate
pos
(
5
,
1
,
7
);
FTreeCoordinate
cp
;
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
()
,
10
);
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
());
uassert
(
pos
==
cp
);
uassert
(
cp
.
getMortonIndex
()
==
pos
.
getMortonIndex
());
}
{
FTreeCoordinate
pos
(
2
,
8
,
3
);
FTreeCoordinate
cp
;
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
()
,
10
);
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
());
uassert
(
pos
==
cp
);
uassert
(
cp
.
getMortonIndex
()
==
pos
.
getMortonIndex
());
}
{
FTreeCoordinate
pos
(
51
,
11
,
47
);
FTreeCoordinate
cp
;
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
()
,
10
);
cp
.
setPositionFromMorton
(
pos
.
getMortonIndex
());
uassert
(
pos
==
cp
);
uassert
(
cp
.
getMortonIndex
()
==
pos
.
getMortonIndex
());
}
...
...
@@ -72,7 +72,7 @@ class TestMorton : public FUTester<TestMorton> {
uassert
(
pos
.
getMortonIndex
()
==
84
);
// 001 010 100 =>> 001010100 => 84d
}
}
// set test
void
SetTests
(){
AddTest
(
&
TestMorton
::
Morton
,
"Test Morton"
);
...
...
@@ -82,5 +82,3 @@ class TestMorton : public FUTester<TestMorton> {
// You must do this
TestClass
(
TestMorton
)
UTests/utestNeighborIndexes.cpp
View file @
5c1aff90
...
...
@@ -55,7 +55,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert
(
coordindexes
.
getIndex
(
idxX
,
idxY
,
idxZ
)
==
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
));
const
MortonIndex
neigh
=
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
);
const
FTreeCoordinate
neighCoord
(
neigh
,
idxLevel
);
const
FTreeCoordinate
neighCoord
(
neigh
);
uassert
(
xbox
+
idxX
==
neighCoord
.
getX
());
uassert
(
ybox
+
idxY
==
neighCoord
.
getY
());
uassert
(
zbox
+
idxZ
==
neighCoord
.
getZ
());
...
...
@@ -100,7 +100,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert
(
coordindexes
.
getIndex
(
idxX
,
idxY
,
idxZ
)
==
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
));
const
MortonIndex
neigh
=
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
);
const
FTreeCoordinate
neighCoord
(
neigh
,
idxLevel
);
const
FTreeCoordinate
neighCoord
(
neigh
);
uassert
(
xbox
+
idxX
==
neighCoord
.
getX
());
uassert
(
ybox
+
idxY
==
neighCoord
.
getY
());
uassert
(
zbox
+
idxZ
==
neighCoord
.
getZ
());
...
...
@@ -145,7 +145,7 @@ class TestIndexes : public FUTester<TestIndexes> {
uassert
(
coordindexes
.
getIndex
(
idxX
,
idxY
,
idxZ
)
==
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
));
const
MortonIndex
neigh
=
bitsindex
.
getIndex
(
idxX
,
idxY
,
idxZ
);
const
FTreeCoordinate
neighCoord
(
neigh
,
idxLevel
);
const
FTreeCoordinate
neighCoord
(
neigh
);
uassert
(
xbox
+
idxX
==
neighCoord
.
getX
());
uassert
(
ybox
+
idxY
==
neighCoord
.
getY
());
uassert
(
zbox
+
idxZ
==
neighCoord
.
getZ
());
...
...
@@ -167,12 +167,12 @@ class TestIndexes : public FUTester<TestIndexes> {
const
MortonIndex
limit
=
FMath
::
pow2
(
idxLevel
)
*
3L
;
for
(
MortonIndex
idxV1
=
1
;
idxV1
<
limit
;
++
idxV1
){
FBitsNeighborIndex
bitsindex
(
idxV1
,
idxLevel
);
const
FTreeCoordinate
coord1
(
idxV1
,
idxLevel
);
const
FTreeCoordinate
coord1
(
idxV1
);
for
(
MortonIndex
idxV2
=
0
;
idxV2
<
limit
;
++
idxV2
){
const
bool
isneig
=
bitsindex
.
areNeighbors
(
idxV1
,
idxV2
);
const
FTreeCoordinate
coord2
(
idxV2
,
idxLevel
);
const
FTreeCoordinate
coord2
(
idxV2
);
const
bool
isreallyneig
=
(
FMath
::
Abs
(
coord1
.
getX
()
-
coord2
.
getX
())
<=
1
)
&&
(
FMath
::
Abs
(
coord1
.
getY
()
-
coord2
.
getY
())
<=
1
)
&&
(
FMath
::
Abs
(
coord1
.
getZ
()
-
coord2
.
getZ
())
<=
1
);
...
...
@@ -195,6 +195,3 @@ class TestIndexes : public FUTester<TestIndexes> {
// You must do this
TestClass
(
TestIndexes
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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