Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
b5a1a031
Commit
b5a1a031
authored
Sep 17, 2012
by
BRAMAS Berenger
Browse files
Check particles on the leaves border
parent
1817e38e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Containers/FOctree.hpp
View file @
b5a1a031
...
...
@@ -85,11 +85,12 @@ class FOctree : protected FAssertable, public FNoCopyable {
int
getTreeCoordinate
(
const
FReal
inRelativePosition
)
const
{
FDEBUG
(
fassert
(
inRelativePosition
>=
0
&&
inRelativePosition
<
this
->
boxWidth
,
"Particle out of box"
,
__LINE__
,
__FILE__
)
);
const
FReal
indexFReal
=
inRelativePosition
/
this
->
boxWidthAtLevel
[
this
->
leafIndex
];
const
int
index
=
int
(
FMath
::
dfloor
(
indexFReal
));
/*
const int index = int(FMath::dfloor(indexFReal));
if( index && FMath::LookEqual(inRelativePosition, this->boxWidthAtLevel[this->leafIndex] * FReal(index) ) ){
return index - 1;
}
return
index
;
return index;*/
return
static_cast
<
int
>
(
indexFReal
);
}
public:
...
...
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