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
9d32a4b5
Commit
9d32a4b5
authored
Mar 09, 2021
by
COULAUD Olivier
Browse files
use iterators to get index in trace
parent
9770c2b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
experimental/include/scalfmm/tree/group_tree.hpp
View file @
9d32a4b5
...
...
@@ -500,10 +500,11 @@ namespace scalfmm::component
std
::
cout
<<
" "
<<
leaf
.
index
()
<<
" p2p_list ("
<<
leaf_symbolics
.
number_of_neighbors
<<
"): "
;
// get the p2p interacion list
auto
index
=
leaf_symbolics
.
interaction_indexes
;
for
(
int
idx
=
0
;
idx
<
leaf_symbolics
.
number_of_neighbors
;
++
idx
)
// auto index = leaf_symbolics.interaction_indexes;
auto
index
=
leaf_symbolics
.
interaction_iterators
;
for
(
int
idx
=
0
;
idx
<
leaf_symbolics
.
existing_neighbors_in_group
;
++
idx
)
{
std
::
cout
<<
index
[
idx
]
<<
" "
;
std
::
cout
<<
index
[
idx
]
->
index
()
<<
" "
;
}
std
::
cout
<<
std
::
endl
;
});
...
...
@@ -534,12 +535,12 @@ namespace scalfmm::component
component
::
for_each
(
std
::
begin
(
*
ptr_group
),
std
::
end
(
*
ptr_group
),
[](
auto
&
cell
)
{
auto
&
cell_symbolics
=
cell
.
symbolics
();
std
::
cout
<<
" "
<<
cell
.
index
()
<<
" m2l_list ("
<<
cell_symbolics
.
number_of
_neighbors
<<
"): "
;
<<
cell_symbolics
.
existing
_neighbors
<<
"): "
;
// get the m2l interacion list
auto
index
=
cell_symbolics
.
interaction_i
ndexe
s
;
for
(
int
idx
=
0
;
idx
<
cell_symbolics
.
number_of
_neighbors
;
++
idx
)
auto
index
=
cell_symbolics
.
interaction_i
terator
s
;
for
(
int
idx
=
0
;
idx
<
cell_symbolics
.
existing
_neighbors
;
++
idx
)
{
std
::
cout
<<
index
[
idx
]
<<
" "
;
std
::
cout
<<
index
[
idx
]
->
index
()
<<
" "
;
}
std
::
cout
<<
std
::
endl
;
});
...
...
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