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
4e9ef4c8
Commit
4e9ef4c8
authored
Nov 19, 2014
by
PIACIBELLO Cyrille
Browse files
fix on octree arranger
parent
7635caed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Src/Arranger/FOctreeArranger.hpp
View file @
4e9ef4c8
...
...
@@ -64,10 +64,11 @@ public:
do
{
const
MortonIndex
currentIndex
=
octreeIterator
.
getCurrentGlobalIndex
();
ContainerClass
*
particles
=
octreeIterator
.
getCurrentLeaf
()
->
getSrc
();
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
//IdxPart is incremented at the end of the loop
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
/*++idxPart*/
){
FPoint
partPos
(
particles
->
getPositions
()[
0
][
idxPart
],
particles
->
getPositions
()[
1
][
idxPart
],
particles
->
getPositions
()[
2
][
idxPart
]
);
particles
->
getPositions
()[
1
][
idxPart
],
particles
->
getPositions
()[
2
][
idxPart
]
);
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
if
(
TestPeriodicCondition
(
isPeriodic
,
DirPlusX
)
){
while
(
partPos
.
getX
()
>=
max
.
getX
()){
...
...
@@ -133,6 +134,10 @@ public:
const
MortonIndex
particuleIndex
=
tree
->
getMortonFromPosition
(
partPos
);
if
(
particuleIndex
!=
currentIndex
){
tomove
.
push
(
ConverterClass
::
GetParticleAndRemove
(
particles
,
idxPart
));
//No need to increment idxPart, since the array has been staggered
}
else
{
idxPart
++
;
}
}
}
while
(
octreeIterator
.
moveRight
());
...
...
Src/Arranger/FOctreeArrangerProc.hpp
View file @
4e9ef4c8
...
...
@@ -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 FOCTREEARRANGERPROC_HPP
...
...
@@ -114,7 +114,8 @@ public:
do
{
const
MortonIndex
currentIndex
=
octreeIterator
.
getCurrentGlobalIndex
();
ContainerClass
*
particles
=
octreeIterator
.
getCurrentLeaf
()
->
getSrc
();
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
//IdxPart is incremented at the end of the loop
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
/*++idxPart*/
){
FPoint
partPos
(
particles
->
getPositions
()[
0
][
idxPart
],
particles
->
getPositions
()[
1
][
idxPart
],
particles
->
getPositions
()[
2
][
idxPart
]
);
...
...
@@ -187,6 +188,10 @@ public:
const
int
procConcerned
=
getInterval
(
particuleIndex
,
comm
.
processCount
(),
intervals
);
toMove
[
procConcerned
].
push
(
ConverterClass
::
GetParticleAndRemove
(
particles
,
idxPart
));
indexesToExtract
.
push
(
idxPart
);
//No need to increment idxPart, since the array has been staggered
}
else
{
idxPart
++
;
}
}
...
...
@@ -271,7 +276,7 @@ public:
}
hasToRecvFrom
-=
1
;
}
}
}
}
int
counterLeavesAlive
=
0
;
...
...
@@ -290,7 +295,7 @@ public:
// Not empty, just continue
else
{
workOnNext
=
octreeIterator
.
moveRight
();
counterLeavesAlive
+=
1
;
counterLeavesAlive
+=
1
;
}
}
while
(
workOnNext
);
}
...
...
Write
Preview
Supports
Markdown
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