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
9a365b4e
Commit
9a365b4e
authored
Nov 04, 2014
by
BRAMAS Berenger
Browse files
Add method to the blocked tree to have direct access
parent
cdb4d8f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/GroupTree/FGroupTree.hpp
View file @
9a365b4e
...
...
@@ -487,26 +487,42 @@ public:
return
treeHeight
;
}
CellGroupIterator
cellsBegin
(
const
int
atHeight
){
FAssertLF
(
atHeight
<
treeHeight
);
return
cellBlocksPerLevel
[
atHeight
].
begin
();
CellGroupIterator
cellsBegin
(
const
int
inLevel
){
FAssertLF
(
inLevel
<
treeHeight
);
return
cellBlocksPerLevel
[
inLevel
].
begin
();
}
CellGroupConstIterator
cellsBegin
(
const
int
atHeight
)
const
{
FAssertLF
(
atHeight
<
treeHeight
);
return
cellBlocksPerLevel
[
atHeight
].
begin
();
CellGroupConstIterator
cellsBegin
(
const
int
inLevel
)
const
{
FAssertLF
(
inLevel
<
treeHeight
);
return
cellBlocksPerLevel
[
inLevel
].
begin
();
}
CellGroupIterator
cellsEnd
(
const
int
atHeight
){
FAssertLF
(
atHeight
<
treeHeight
);
return
cellBlocksPerLevel
[
atHeight
].
end
();
CellGroupIterator
cellsEnd
(
const
int
inLevel
){
FAssertLF
(
inLevel
<
treeHeight
);
return
cellBlocksPerLevel
[
inLevel
].
end
();
}
CellGroupConstIterator
cellsEnd
(
const
int
atHeight
)
const
{
FAssertLF
(
atHeight
<
treeHeight
);
return
cellBlocksPerLevel
[
atHeight
].
end
();
CellGroupConstIterator
cellsEnd
(
const
int
inLevel
)
const
{
FAssertLF
(
inLevel
<
treeHeight
);
return
cellBlocksPerLevel
[
inLevel
].
end
();
}
int
getNbCellGroupAtLevel
(
const
int
inLevel
)
const
{
FAssertLF
(
inLevel
<
treeHeight
);
return
int
(
cellBlocksPerLevel
[
inLevel
].
size
());
}
CellGroupClass
*
getCellGroup
(
const
int
inLevel
,
const
int
inIdx
){
FAssertLF
(
inLevel
<
treeHeight
);
FAssertLF
(
inIdx
<
int
(
cellBlocksPerLevel
[
inLevel
].
size
()));
return
cellBlocksPerLevel
[
inLevel
][
inIdx
];
}
const
CellGroupClass
*
getCellGroup
(
const
int
inLevel
,
const
int
inIdx
)
const
{
FAssertLF
(
inLevel
<
treeHeight
);
FAssertLF
(
inIdx
<
int
(
cellBlocksPerLevel
[
inLevel
].
size
()));
return
cellBlocksPerLevel
[
inLevel
][
inIdx
];
}
ParticleGroupIterator
leavesBegin
(){
return
particleBlocks
.
begin
();
...
...
@@ -523,6 +539,20 @@ public:
ParticleGroupConstIterator
leavesEnd
()
const
{
return
particleBlocks
.
end
();
}
int
getNbParticleGroup
()
const
{
return
int
(
particleBlocks
.
size
());
}
ParticleGroupClass
*
getParticleGroup
(
const
int
inIdx
){
FAssertLF
(
inIdx
<
int
(
particleBlocks
.
size
()));
return
particleBlocks
[
inIdx
];
}
const
ParticleGroupClass
*
getParticleGroup
(
const
int
inIdx
)
const
{
FAssertLF
(
inIdx
<
int
(
particleBlocks
.
size
()));
return
particleBlocks
[
inIdx
];
}
};
#endif // FGROUPTREE_HPP
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