Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
a2154f09
There was a problem fetching the pipeline summary.
Commit
a2154f09
authored
8 years ago
by
DUFOYER Benjamin
Browse files
Options
Downloads
Patches
Plain Diff
fix error
parent
68b820ae
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/GroupTree/Core/FGroupLinearTree.hpp
+32
-8
32 additions, 8 deletions
Src/GroupTree/Core/FGroupLinearTree.hpp
with
32 additions
and
8 deletions
Src/GroupTree/Core/FGroupLinearTree.hpp
+
32
−
8
View file @
a2154f09
...
@@ -21,7 +21,7 @@ protected:
...
@@ -21,7 +21,7 @@ protected:
std
::
vector
<
node_t
>*
linear_tree
;
std
::
vector
<
node_t
>*
linear_tree
;
std
::
vector
<
std
::
pair
<
unsigned
long
long
int
,
unsigned
long
long
int
>>
particle_repartition
;
std
::
vector
<
std
::
pair
<
unsigned
long
long
int
,
unsigned
long
long
int
>>
particle_repartition
;
bool
unknow_particle_repartition
=
true
:
;
bool
unknow_particle_repartition
=
true
;
public:
public:
...
@@ -179,14 +179,18 @@ public:
...
@@ -179,14 +179,18 @@ public:
return
this
->
get_leaf_level
();
return
this
->
get_leaf_level
();
}
}
size_t
get_first_morton_index
(){
size_t
get_first_morton_index
()
const
{
return
this
->
linear_tree
->
front
().
morton_index
;
return
this
->
linear_tree
->
front
().
morton_index
;
}
}
size_t
get_last_morton_index
(){
size_t
get_last_morton_index
()
const
{
return
this
->
linear_tree
->
back
().
morton_index
;
return
this
->
linear_tree
->
back
().
morton_index
;
}
}
/**
* This function print the information of this current class
* @author benjamin.dufoyer@inria.fr
*/
void
print_info_tree
(){
void
print_info_tree
(){
std
::
cout
<<
" nb_leaf : "
<<
this
->
linear_tree
->
size
()
<<
std
::
endl
;
std
::
cout
<<
" nb_leaf : "
<<
this
->
linear_tree
->
size
()
<<
std
::
endl
;
std
::
cout
<<
" nb_block : "
<<
nb_block
<<
std
::
endl
;
std
::
cout
<<
" nb_block : "
<<
nb_block
<<
std
::
endl
;
...
@@ -196,6 +200,10 @@ public:
...
@@ -196,6 +200,10 @@ public:
}
}
}
}
/**
* This function return the linear tree associated with this calss
* @author benjamin.dufoyer@inria.fr
*/
std
::
vector
<
node_t
>*
get_tree
(){
std
::
vector
<
node_t
>*
get_tree
(){
return
this
->
linear_tree
;
return
this
->
linear_tree
;
}
}
...
@@ -210,6 +218,7 @@ public:
...
@@ -210,6 +218,7 @@ public:
void
set_particle_repartition
(
void
set_particle_repartition
(
std
::
vector
<
particle_t
>
particle_container
)
std
::
vector
<
particle_t
>
particle_container
)
{
{
unknow_particle_repartition
=
false
;
dstr_grp_tree_builder
::
know_particle_division
(
dstr_grp_tree_builder
::
know_particle_division
(
this
->
mpi_conf
,
this
->
mpi_conf
,
particle_container
,
particle_container
,
...
@@ -217,7 +226,7 @@ public:
...
@@ -217,7 +226,7 @@ public:
}
}
std
::
vector
<
std
::
pair
<
unsigned
long
long
int
,
unsigned
long
long
int
>>*
std
::
vector
<
std
::
pair
<
unsigned
long
long
int
,
unsigned
long
long
int
>>*
get_particle_repartition
()
get_particle_repartition
()
{
// TO get the particle repartition, you will compute it before
// TO get the particle repartition, you will compute it before
FAssert
(
!
unknow_particle_repartition
);
FAssert
(
!
unknow_particle_repartition
);
return
&
this
->
particle_repartition
;
return
&
this
->
particle_repartition
;
...
@@ -233,15 +242,17 @@ public:
...
@@ -233,15 +242,17 @@ public:
/**
/**
* return the max morton index of the left proc
* return the max morton index of the left proc
* it's needed for the distributed construction of the groupTree
* it's needed for the distributed construction of the groupTree
* you will compute the repartition before calling this function
*
[RESTRICTION]
you will compute the repartition before calling this function
* @author benjamin.dufoyer@inria.fr
* @author benjamin.dufoyer@inria.fr
* @return
M
orton
I
ndex
* @return
max left m
orton
i
ndex
, -1 if he doesn't exist
*/
*/
unsigned
long
long
int
get_left_limit
(){
long
long
int
get_left_limit
(){
// Check if the repartition have been compute
FAssert
(
!
unknow_particle_repartition
);
FAssert
(
!
unknow_particle_repartition
);
int
my_rank
=
this
->
mpi_conf
.
comm
.
rank
();
int
my_rank
=
this
->
mpi_conf
.
comm
.
rank
();
long
long
int
left_limit
=
-
1
;
if
(
my_rank
!=
0
){
if
(
my_rank
!=
0
){
left_limit
=
this
->
particle_repartition
[
my_rank
-
1
].
second
;
left_limit
=
(
long
long
int
)
this
->
particle_repartition
[
my_rank
-
1
].
second
;
}
}
return
left_limit
;
return
left_limit
;
}
}
...
@@ -316,6 +327,19 @@ public:
...
@@ -316,6 +327,19 @@ public:
}
}
/**
* This function is used to show the FGroupLinearTee more easly
* @author benjamin.dufoyer@inria.fr
*/
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
FGroupLinearTree
&
n
)
{
return
os
<<
"--> Number of leaf : "
<<
n
.
get_nb_leaf
()
<<
"
\n
first leaf : "
<<
n
.
get_first_morton_index
()
<<
"
\n
last leaf : "
<<
n
.
get_last_morton_index
()
<<
"
\n
block_size "
<<
n
.
get_block_size
()
<<
"
\n
number of block : "
<<
n
.
get_nb_block
();
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment