Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
0f9e1cf9
Commit
0f9e1cf9
authored
Jun 21, 2016
by
Quentin Khan
Browse files
Remove "deprecated" warnings after FTreeCoordinate simplification
parent
ff46af1a
Changes
24
Hide whitespace changes
Inline
Side-by-side
Src/BalanceTree/FChebSymCostKernel.hpp
View file @
0f9e1cf9
...
...
@@ -316,7 +316,7 @@ public:
flopsP2P
+=
tmpCost
;
CellClass
*
cell
=
_tree
->
getCell
(
LeafCellCoordinate
.
getMortonIndex
(
_treeHeight
-
1
),
LeafCellCoordinate
.
getMortonIndex
(),
_treeHeight
-
1
);
cell
->
addNearCost
(
tmpCost
);
...
...
@@ -344,7 +344,7 @@ public:
flopsP2P
+=
tmpCost
;
CellClass
*
cell
=
_tree
->
getCell
(
LeafCellCoordinate
.
getMortonIndex
(
_treeHeight
-
1
),
LeafCellCoordinate
.
getMortonIndex
(),
_treeHeight
-
1
);
cell
->
addNearCost
(
tmpCost
);
...
...
Src/BalanceTree/FDumbCostKernel.hpp
View file @
0f9e1cf9
...
...
@@ -194,7 +194,7 @@ public:
CellClass
*
cell
=
_tree
->
getCell
(
LeafCellCoordinate
.
getMortonIndex
(
_treeHeight
-
1
),
LeafCellCoordinate
.
getMortonIndex
(),
_treeHeight
-
1
);
flopsP2P
+=
tmpCost
;
...
...
@@ -210,7 +210,7 @@ public:
FSize
tmpCost
=
0
;
CellClass
*
cell
=
_tree
->
getCell
(
LeafCellCoordinate
.
getMortonIndex
(
_treeHeight
-
1
),
LeafCellCoordinate
.
getMortonIndex
(),
_treeHeight
-
1
);
flopsP2P
+=
tmpCost
;
...
...
Src/Containers/FNeighborIndexes.hpp
View file @
0f9e1cf9
...
...
@@ -87,7 +87,7 @@ public:
}
MortonIndex
getIndex
(
const
int
inX
,
const
int
inY
,
const
int
inZ
)
override
{
return
FTreeCoordinate
(
inX
+
coord
.
getX
(),
inY
+
coord
.
getY
(),
inZ
+
coord
.
getZ
()).
getMortonIndex
(
level
);
return
FTreeCoordinate
(
inX
+
coord
.
getX
(),
inY
+
coord
.
getY
(),
inZ
+
coord
.
getZ
()).
getMortonIndex
();
}
};
...
...
Src/Containers/FOctree.hpp
View file @
0f9e1cf9
...
...
@@ -187,7 +187,7 @@ public:
template
<
typename
...
Args
>
void
insert
(
const
FPoint
<
FReal
>&
inParticlePosition
,
Args
...
args
){
const
FTreeCoordinate
host
=
getCoordinateFromPosition
(
inParticlePosition
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
(
leafIndex
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
();
if
(
root
->
isLeafPart
()){
((
SubOctreeWithLeaves
*
)
root
)
->
insert
(
particleIndex
,
host
,
this
->
height
,
inParticlePosition
,
args
...
);
}
...
...
@@ -200,7 +200,7 @@ public:
* @param indexToRemove the index of the leaf to remove
*/
LeafClass
*
createLeaf
(
const
MortonIndex
indexToCreate
){
const
FTreeCoordinate
host
(
indexToCreate
,
this
->
height
-
1
);
const
FTreeCoordinate
host
(
indexToCreate
);
if
(
root
->
isLeafPart
()){
return
((
SubOctreeWithLeaves
*
)
root
)
->
createLeaf
(
indexToCreate
,
host
,
this
->
height
);
}
...
...
@@ -222,7 +222,7 @@ public:
* @return the morton index
*/
MortonIndex
getMortonFromPosition
(
const
FPoint
<
FReal
>&
position
)
const
{
return
getCoordinateFromPosition
(
position
).
getMortonIndex
(
leafIndex
);
return
getCoordinateFromPosition
(
position
).
getMortonIndex
();
}
/*
...
...
@@ -803,7 +803,7 @@ public:
// if we are not on the current cell
if
(
!
(
!
idxX
&&
!
idxY
&&
!
idxZ
)
){
const
FTreeCoordinate
other
(
center
.
getX
()
+
idxX
,
center
.
getY
()
+
idxY
,
center
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// if not a brother
if
(
mortonOther
>>
3
!=
inIndex
>>
3
){
// get cell
...
...
@@ -888,7 +888,7 @@ public:
// if we are not on the current cell
if
(
neighSeparation
<
1
||
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
otherParent
(
parentCell
.
getX
()
+
idxX
,
parentCell
.
getY
()
+
idxY
,
parentCell
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -950,7 +950,7 @@ public:
// if we are not on the current cell
if
(
neighSeparation
<
1
||
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
otherParent
(
parentCell
.
getX
()
+
idxX
,
parentCell
.
getY
()
+
idxY
,
parentCell
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -1016,7 +1016,7 @@ public:
if
(
!
FMath
::
Between
(
parentCell
.
getZ
()
+
idxZ
,
0
,
boxLimite
))
continue
;
const
FTreeCoordinate
otherParent
(
parentCell
.
getX
()
+
idxX
,
parentCell
.
getY
()
+
idxY
,
parentCell
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -1076,7 +1076,7 @@ public:
if
(
!
FMath
::
Between
(
parentCell
.
getZ
()
+
idxZ
,
0
,
boxLimite
))
continue
;
const
FTreeCoordinate
otherParent
(
parentCell
.
getX
()
+
idxX
,
parentCell
.
getY
()
+
idxY
,
parentCell
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -1173,7 +1173,7 @@ public:
}
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -1270,7 +1270,7 @@ public:
}
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
(
inLevel
-
1
)
<<
3
;
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
()
<<
3
;
// Get child
CellClass
**
const
cells
=
getCellPt
(
mortonOtherParent
,
inLevel
);
...
...
@@ -1353,7 +1353,7 @@ public:
// if we are not on the current cell
if
(
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
other
(
center
.
getX
()
+
idxX
,
center
.
getY
()
+
idxY
,
center
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
ContainerClass
*
const
leaf
=
getLeafSrc
(
mortonOther
);
// add to list if not null
...
...
@@ -1393,7 +1393,7 @@ public:
// if we are not on the current cell
if
(
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
other
(
center
.
getX
()
+
idxX
,
center
.
getY
()
+
idxY
,
center
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
ContainerClass
*
const
leaf
=
getLeafSrc
(
mortonOther
);
// add to list if not null
...
...
@@ -1436,7 +1436,7 @@ public:
// if we are not on the current cell
if
(
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
other
(
center
.
getX
()
+
idxX
,
center
.
getY
()
+
idxY
,
center
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
CellClass
**
const
leaf
=
getCellPt
(
mortonOther
,
inLevel
);
...
...
@@ -1477,7 +1477,7 @@ public:
// if we are not on the current cell
if
(
idxX
||
idxY
||
idxZ
){
const
FTreeCoordinate
other
(
center
.
getX
()
+
idxX
,
center
.
getY
()
+
idxY
,
center
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
CellClass
**
const
leaf
=
getCellPt
(
mortonOther
,
inLevel
);
...
...
@@ -1567,7 +1567,7 @@ public:
}
other
.
setZ
(
otherZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
ContainerClass
*
const
leaf
=
getLeafSrc
(
mortonOther
);
// add to list if not null
...
...
@@ -1656,7 +1656,7 @@ public:
}
other
.
setZ
(
otherZ
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
(
inLevel
);
const
MortonIndex
mortonOther
=
other
.
getMortonIndex
();
// get cell
ContainerClass
*
const
leaf
=
getLeafSrc
(
mortonOther
);
// add to list if not null
...
...
@@ -1746,4 +1746,3 @@ public:
};
#endif //FOCTREE_HPP
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
View file @
0f9e1cf9
...
...
@@ -1831,7 +1831,7 @@ protected:
otherParentInBox
.
setZ
(
otherParentInBox
.
getZ
()
-
boxLimite
);
}
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
(
inLevel
-
1
);
const
MortonIndex
mortonOtherParent
=
otherParentInBox
.
getMortonIndex
();
// For each child
for
(
int
idxCousin
=
0
;
idxCousin
<
8
;
++
idxCousin
){
...
...
@@ -1871,7 +1871,7 @@ protected:
const
FTreeCoordinate
otherParent
(
parentCell
.
getX
()
+
idxX
,
parentCell
.
getY
()
+
idxY
,
parentCell
.
getZ
()
+
idxZ
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
(
inLevel
-
1
);
const
MortonIndex
mortonOtherParent
=
otherParent
.
getMortonIndex
();
// For each child
for
(
int
idxCousin
=
0
;
idxCousin
<
8
;
++
idxCousin
){
...
...
Src/Files/FMpiFmaDivider.hpp
View file @
0f9e1cf9
...
...
@@ -143,7 +143,7 @@ private:
return
FCoordinateComputer
::
GetCoordinateFromPosition
(
_boxCenter
,
_boxWidth
,
_divisionLevel
,
getPosition
()).
getMortonIndex
(
_divisionLevel
);
getMortonIndex
();
}
...
...
Src/Files/FMpiTreeBuilder.hpp
View file @
0f9e1cf9
...
...
@@ -101,7 +101,7 @@ public:
host
.
setZ
(
FCoordinateComputer
::
GetTreeCoordinate
<
FReal
>
(
originalParticlesUnsorted
[
idxPart
].
particle
.
getPosition
().
getZ
()
-
boxCorner
.
getZ
(),
loader
.
getBoxWidth
(),
boxWidthAtLeafLevel
,
TreeHeight
));
originalParticlesUnsorted
[
idxPart
].
index
=
host
.
getMortonIndex
(
TreeHeight
-
1
);
originalParticlesUnsorted
[
idxPart
].
index
=
host
.
getMortonIndex
();
}
// Sort particles
...
...
@@ -140,7 +140,7 @@ public:
host
.
setZ
(
FCoordinateComputer
::
GetTreeCoordinate
<
FReal
>
(
originalParticlesUnsorted
[
idxPart
].
particle
.
getPosition
().
getZ
()
-
boxCorner
.
getZ
(),
boxWidth
,
boxWidthAtLeafLevel
,
TreeHeight
));
originalParticlesUnsorted
[
idxPart
].
index
=
host
.
getMortonIndex
(
TreeHeight
-
1
);
originalParticlesUnsorted
[
idxPart
].
index
=
host
.
getMortonIndex
();
}
FLOG
(
FLog
::
Controller
<<
"Particles Distribution: "
<<
"
\t
Prepare particles ("
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
;
FLog
::
Controller
.
flush
();
);
...
...
Src/Files/FTreeBuilder.hpp
View file @
0f9e1cf9
...
...
@@ -108,7 +108,7 @@ public:
boxWidth
,
boxWidthAtLeafLevel
,
NbLevels
)
);
// Store morton index and original idx
particleIndexes
[
idxParts
].
mindex
=
host
.
getMortonIndex
(
NbLevels
-
1
);
particleIndexes
[
idxParts
].
mindex
=
host
.
getMortonIndex
();
particleIndexes
[
idxParts
].
particlePositionInArray
=
idxParts
;
}
...
...
Src/GroupTree/Core/FGroupTaskAlgorithm.hpp
View file @
0f9e1cf9
...
...
@@ -147,7 +147,7 @@ protected:
MortonIndex
interactionsIndexes
[
26
];
int
interactionsPosition
[
26
];
FTreeCoordinate
coord
(
mindex
,
tree
->
getHeight
()
-
1
);
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getNeighborsIndexes
(
tree
->
getHeight
(),
interactionsIndexes
,
interactionsPosition
);
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
...
...
@@ -234,7 +234,7 @@ protected:
MortonIndex
interactionsIndexes
[
189
];
int
interactionsPosition
[
189
];
const
FTreeCoordinate
coord
(
mindex
,
idxLevel
);
const
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getInteractionNeighbors
(
idxLevel
,
interactionsIndexes
,
interactionsPosition
);
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
...
...
@@ -618,7 +618,7 @@ protected:
MortonIndex
interactionsIndexes
[
26
];
int
interactionsPosition
[
26
];
FTreeCoordinate
coord
(
mindex
,
tree
->
getHeight
()
-
1
);
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getNeighborsIndexes
(
tree
->
getHeight
(),
interactionsIndexes
,
interactionsPosition
);
ParticleContainerClass
interactionsObjects
[
26
];
...
...
@@ -673,11 +673,11 @@ protected:
FAssertLF
(
containers
->
getLeafMortonIndex
((
*
outsideInteractions
)[
outInterIdx
].
insideIdxInBlock
)
==
(
*
outsideInteractions
)[
outInterIdx
].
insideIndex
);
ParticleContainerClass
*
ptrLeaf
=
&
interParticles
;
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
insideIndex
,
tree
->
getHeight
()
-
1
),
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
insideIndex
),
&
particles
,
&
ptrLeaf
,
&
(
*
outsideInteractions
)[
outInterIdx
].
relativeOutPosition
,
1
);
const
int
otherPosition
=
getOppositeNeighIndex
((
*
outsideInteractions
)[
outInterIdx
].
relativeOutPosition
);
ptrLeaf
=
&
particles
;
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
outIndex
,
tree
->
getHeight
()
-
1
),
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
outIndex
),
&
interParticles
,
&
ptrLeaf
,
&
otherPosition
,
1
);
}
}
...
...
Src/GroupTree/Core/FGroupTaskDepAlgorithm.hpp
View file @
0f9e1cf9
...
...
@@ -204,7 +204,7 @@ protected:
MortonIndex
interactionsIndexes
[
26
];
int
interactionsPosition
[
26
];
FTreeCoordinate
coord
(
mindex
,
tree
->
getHeight
()
-
1
);
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getNeighborsIndexes
(
tree
->
getHeight
(),
interactionsIndexes
,
interactionsPosition
);
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
...
...
@@ -291,7 +291,7 @@ protected:
MortonIndex
interactionsIndexes
[
189
];
int
interactionsPosition
[
189
];
const
FTreeCoordinate
coord
(
mindex
,
idxLevel
);
const
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getInteractionNeighbors
(
idxLevel
,
interactionsIndexes
,
interactionsPosition
);
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
...
...
@@ -777,11 +777,11 @@ protected:
FAssertLF
(
containers
->
getLeafMortonIndex
((
*
outsideInteractions
)[
outInterIdx
].
insideIdxInBlock
)
==
(
*
outsideInteractions
)[
outInterIdx
].
insideIndex
);
ParticleContainerClass
*
ptrLeaf
=
&
interParticles
;
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
insideIndex
,
tree
->
getHeight
()
-
1
),
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
insideIndex
),
&
particles
,
&
ptrLeaf
,
&
(
*
outsideInteractions
)[
outInterIdx
].
relativeOutPosition
,
1
);
const
int
otherPosition
=
getOppositeNeighIndex
((
*
outsideInteractions
)[
outInterIdx
].
relativeOutPosition
);
ptrLeaf
=
&
particles
;
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
outIndex
,
tree
->
getHeight
()
-
1
),
kernel
->
P2POuter
(
FTreeCoordinate
((
*
outsideInteractions
)[
outInterIdx
].
outIndex
),
&
interParticles
,
&
ptrLeaf
,
&
otherPosition
,
1
);
}
}
...
...
@@ -816,7 +816,7 @@ protected:
MortonIndex
interactionsIndexes
[
26
];
int
interactionsPosition
[
26
];
FTreeCoordinate
coord
(
mindex
,
tree
->
getHeight
()
-
1
);
FTreeCoordinate
coord
(
mindex
);
int
counter
=
coord
.
getNeighborsIndexes
(
tree
->
getHeight
(),
interactionsIndexes
,
interactionsPosition
);
ParticleContainerClass
interactionsObjects
[
26
];
...
...
Src/GroupTree/Core/FGroupTree.hpp
View file @
0f9e1cf9
...
...
@@ -203,7 +203,7 @@ public:
const
FTreeCoordinate
host
=
FCoordinateComputer
::
GetCoordinateFromPositionAndCorner
<
FReal
>
(
this
->
boxCorner
,
this
->
boxWidth
,
treeHeight
,
FPoint
<
FReal
>
(
xpos
[
idxPart
],
ypos
[
idxPart
],
zpos
[
idxPart
])
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
(
treeHeight
-
1
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
();
particlesToSort
[
idxPart
].
mindex
=
particleIndex
;
particlesToSort
[
idxPart
].
originalIndex
=
idxPart
;
}
...
...
@@ -260,7 +260,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
// Add leaf
...
...
@@ -344,7 +344,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
@@ -405,7 +405,7 @@ public:
const
FTreeCoordinate
host
=
FCoordinateComputer
::
GetCoordinateFromPositionAndCorner
<
FReal
>
(
this
->
boxCorner
,
this
->
boxWidth
,
treeHeight
,
FPoint
<
FReal
>
(
xpos
[
idxPart
],
ypos
[
idxPart
],
zpos
[
idxPart
])
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
(
treeHeight
-
1
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
();
particlesToSort
[
idxPart
].
mindex
=
particleIndex
;
particlesToSort
[
idxPart
].
originalIndex
=
idxPart
;
}
...
...
@@ -466,7 +466,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
// Add leaf
...
...
@@ -551,7 +551,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
@@ -606,7 +606,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
Src/GroupTree/Core/FGroupTreeDyn.hpp
View file @
0f9e1cf9
...
...
@@ -243,7 +243,7 @@ public:
const
FTreeCoordinate
host
=
FCoordinateComputer
::
GetCoordinateFromPositionAndCorner
<
FReal
>
(
this
->
boxCorner
,
this
->
boxWidth
,
treeHeight
,
inParticlesContainer
[
idxPart
].
pos
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
(
treeHeight
-
1
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
();
inParticlesContainer
[
idxPart
].
mindex
=
particleIndex
;
inParticlesContainer
[
idxPart
].
originalIndex
=
idxPart
;
}
...
...
@@ -296,7 +296,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
}
...
...
@@ -397,7 +397,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
@@ -458,7 +458,7 @@ public:
const
FTreeCoordinate
host
=
FCoordinateComputer
::
GetCoordinateFromPositionAndCorner
<
FReal
>
(
this
->
boxCorner
,
this
->
boxWidth
,
treeHeight
,
inParticlesContainer
[
idxPart
].
pos
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
(
treeHeight
-
1
);
const
MortonIndex
particleIndex
=
host
.
getMortonIndex
();
inParticlesContainer
[
idxPart
].
mindex
=
particleIndex
;
inParticlesContainer
[
idxPart
].
originalIndex
=
idxPart
;
}
...
...
@@ -513,7 +513,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
}
...
...
@@ -615,7 +615,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
@@ -671,7 +671,7 @@ public:
CompositeCellClass
newNode
=
newBlock
->
getCompleteCell
(
cellIdInBlock
);
newNode
.
setMortonIndex
(
currentBlockIndexes
[
cellIdInBlock
]);
FTreeCoordinate
coord
;
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]
,
idxLevel
);
coord
.
setPositionFromMorton
(
currentBlockIndexes
[
cellIdInBlock
]);
newNode
.
setCoordinate
(
coord
);
}
...
...
@@ -881,4 +881,3 @@ public:
};
#endif // FGROUPTREEDYN_HPP
Src/Kernels/Spherical/FAbstractSphericalKernel.hpp
View file @
0f9e1cf9
...
...
@@ -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".
// ===================================================================================
#ifndef FABSTRACTSPHERICALKERNEL_HPP
...
...
@@ -71,7 +71,7 @@ protected:
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
FTreeCoordinate
childBox
;
childBox
.
setPositionFromMorton
(
idxChild
,
1
);
childBox
.
setPositionFromMorton
(
idxChild
);
const
FPoint
<
FReal
>
M2MVector
(
father
.
getX
()
-
(
treeWidthAtLevel
*
FReal
(
1
+
(
childBox
.
getX
()
*
2
))),
...
...
@@ -627,7 +627,7 @@ private:
harmonic
.
result
(
index_j_k
)
*=
local_exp
[
index_j_k
];
result
+=
harmonic
.
result
(
index_j_k
).
getReal
();
++
index_j_k
;
++
index_j_k
;
// k>0
for
(
int
k
=
1
;
k
<=
j
;
++
k
,
++
index_j_k
){
...
...
@@ -683,5 +683,3 @@ public:
#endif //FABSTRACTSPHERICALKERNEL_HPP
Tests/GroupTree/testBlockedMpiAlgorithm.cpp
View file @
0f9e1cf9
...
...
@@ -115,7 +115,7 @@ int main(int argc, char* argv[]){
loader
.
getBoxWidth
(),
NbLevels
,
myParticles
[
myParticles
.
getSize
()
-
1
].
position
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
(
NbLevels
-
1
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
();
MortonIndex
leftLimite
=
-
1
;
if
(
mpiComm
.
global
().
processId
()
!=
0
){
FMpi
::
Assert
(
MPI_Recv
(
&
leftLimite
,
sizeof
(
leftLimite
),
MPI_BYTE
,
...
...
Tests/GroupTree/testBlockedMpiChebyshev.cpp
View file @
0f9e1cf9
...
...
@@ -124,7 +124,7 @@ int main(int argc, char* argv[]){
loader
.
getBoxWidth
(),
TreeHeight
,
myParticles
[
myParticles
.
getSize
()
-
1
].
position
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
(
TreeHeight
-
1
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
();
MortonIndex
leftLimite
=
-
1
;
if
(
mpiComm
.
global
().
processId
()
!=
0
){
FMpi
::
Assert
(
MPI_Recv
(
&
leftLimite
,
sizeof
(
leftLimite
),
MPI_BYTE
,
...
...
Tests/GroupTree/testBlockedRotationMpi.cpp
View file @
0f9e1cf9
...
...
@@ -128,7 +128,7 @@ int main(int argc, char* argv[]){
loader
.
getBoxWidth
(),
TreeHeight
,
myParticles
[
myParticles
.
getSize
()
-
1
].
position
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
(
TreeHeight
-
1
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
();
MortonIndex
leftLimite
=
-
1
;
if
(
mpiComm
.
global
().
processId
()
!=
0
){
FMpi
::
Assert
(
MPI_Recv
(
&
leftLimite
,
sizeof
(
leftLimite
),
MPI_BYTE
,
...
...
Tests/GroupTree/testBlockedRotationMpiCuda.cpp
View file @
0f9e1cf9
...
...
@@ -135,7 +135,7 @@ int main(int argc, char* argv[]){
loader
.
getBoxWidth
(),
TreeHeight
,
myParticles
[
myParticles
.
getSize
()
-
1
].
position
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
(
TreeHeight
-
1
);
const
MortonIndex
myLeftLimite
=
host
.
getMortonIndex
();
MortonIndex
leftLimite
=
-
1
;
if
(
mpiComm
.
global
().
processId
()
!=
0
){
FMpi
::
Assert
(
MPI_Recv
(
&
leftLimite
,
sizeof
(
leftLimite
),
MPI_BYTE
,
...
...
Tests/Utils/testOctreePrintMorton.cpp
View file @
0f9e1cf9
...
...
@@ -126,7 +126,7 @@ int main(int argc, char ** argv){
}
while
(
sscanf
(
buffer
,
"%d %d %d"
,
&
x
,
&
y
,
&
z
)
!=
3
);
FTreeCoordinate
coord
(
x
,
y
,
z
);
const
MortonIndex
index
=
coord
.
getMortonIndex
(
requiredlevel
)
;
const
MortonIndex
index
=
coord
.
getMortonIndex
()
;
std
::
cout
<<
" Morton Index is "
<<
index
<<
"
\t
"
<<
std
::
hex
<<
index
<<
"H
\t
"
<<
MortonToBinary
(
index
,
requiredlevel
)
<<
"D
\n\n
"
;
}
break
;
...
...
@@ -158,7 +158,7 @@ int main(int argc, char ** argv){
host
.
setY
(
int
(
FMath
::
dfloor
((
FReal
(
y
)
-
centerOfBox
.
getY
()
-
rootBoxWidth
/
2
)
/
boxWidthAtThisLevel
)
));
host
.
setZ
(
int
(
FMath
::
dfloor
((
FReal
(
z
)
-
centerOfBox
.
getZ
()
-
rootBoxWidth
/
2
)
/
boxWidthAtThisLevel
)
));
const
MortonIndex
index
=
host
.
getMortonIndex
(
requiredlevel
);
const
MortonIndex
index
=
host
.
getMortonIndex
();
std
::
cout
<<
" Morton Index is "
<<
index
<<
"
\t
"
<<
std
::
hex
<<
index
<<
"h
\t
"
<<
MortonToBinary
(
index
,
requiredlevel
)
<<
"d
\n\n
"
;
}
break
;
...
...
@@ -193,7 +193,7 @@ int main(int argc, char ** argv){
for
(
int
y
=
sy
;
y
<=
ey
;
++
y
){
for
(
int
x
=
sx
;
x
<=
ex
;
++
x
){
FTreeCoordinate
coord
(
x
,
y
,
z
);
const
MortonIndex
index
=
coord
.
getMortonIndex
(
requiredlevel
);
const
MortonIndex
index
=
coord
.
getMortonIndex
();
std
::
cout
<<
"[x = "
<<
x
<<
" y = "
<<
y
<<
" z = "
<<
z
<<
"]
\n
"
;
std
::
cout
<<
" Morton Index is "
<<
index
<<
"
\t
"
<<
std
::
hex
<<
index
<<
"H
\t
"
<<
MortonToBinary
(
index
,
requiredlevel
)
<<
"D
\n\n
"
;
}
...
...
@@ -219,7 +219,7 @@ int main(int argc, char ** argv){
for
(
int
y
=
0
;
y
<
maxBoxAtThisLevel
;
++
y
){
for
(
int
x
=
0
;
x
<
maxBoxAtThisLevel
;
++
x
){
FTreeCoordinate
coord
(
x
,
y
,
z
);
const
MortonIndex
index
=
coord
.
getMortonIndex
(
requiredlevel
);
const
MortonIndex
index
=
coord
.
getMortonIndex
();
std
::
cout
<<
"[x = "
<<
x
<<
" y = "
<<
y
<<
" z = "
<<
z
<<
"]
\n
"
;
std
::
cout
<<
" Morton Index is "
<<
index
<<
"
\t
"
<<
std
::
hex
<<
index
<<
"H
\t
"
<<
MortonToBinary
(
index
,
requiredlevel
)
<<
"D
\n\n
"
;
}
...
...
Tests/noDist/testInsert.cpp
View file @
0f9e1cf9
...
...
@@ -185,7 +185,7 @@ int main(int argc, char** argv){
host
.
setZ
(
FCoordinateComputer
::
GetTreeCoordinate
<
FReal
>
(
arrayOfParts
[
idxPart
].
getPosition
().
getZ
()
-
boxCorner
.
getZ
(),
boxWidth
,
boxWidthAtLeafLevel
,
NbLevels
));
//Set Morton index from Tree Coordinate
arrayOfParts
[
idxPart
].
index
=
host
.
getMortonIndex
(
NbLevels
-
1
);
arrayOfParts
[
idxPart
].
index
=
host
.
getMortonIndex
();
arrayOfParts
[
idxPart
].
indexInFile
=
idxPart
;
}
...
...
Tests/noDist/testTreeBuilder.cpp
View file @
0f9e1cf9
...
...
@@ -181,7 +181,7 @@ int main(int argc, char** argv){
host
.
setZ
(
FCoordinateComputer
::
GetTreeCoordinate
<
FReal
>
(
arrayOfParts
[
idxPart
].
getPosition
().
getZ
()
-
boxCorner
.
getZ
(),
boxWidth
,
boxWidthAtLeafLevel
,
NbLevels
));
//Set Morton index from Tree Coordinate
arrayOfParts
[
idxPart
].
index
=
host
.
getMortonIndex
(
NbLevels
-
1
);
arrayOfParts
[
idxPart
].
index
=
host
.
getMortonIndex
();
arrayOfParts
[
idxPart
].
indexInFile
=
idxPart
;