Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
14ba2dc5
Commit
14ba2dc5
authored
8 years ago
by
Yaroslav
Browse files
Options
Downloads
Patches
Plain Diff
Fixed? P_id and grid_send copy
parent
ee9f3fc1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openfpm_vcluster
+1
-1
1 addition, 1 deletion
openfpm_vcluster
src/Grid/grid_dist_id_comm.hpp
+10
-8
10 additions, 8 deletions
src/Grid/grid_dist_id_comm.hpp
with
11 additions
and
9 deletions
openfpm_vcluster
@
9d0986ae
Subproject commit
a463ae1d10144099b2bdeccc6aa6b4de8f3bfcd
8
Subproject commit
9d0986ae448b22ada91ddcbb789ed58e270d421
8
This diff is collapsed.
Click to expand it.
src/Grid/grid_dist_id_comm.hpp
+
10
−
8
View file @
14ba2dc5
...
@@ -102,17 +102,20 @@ public:
...
@@ -102,17 +102,20 @@ public:
std::cout << "Cont. size on " << l << " dimension: " << sz1[l] << std::endl;
std::cout << "Cont. size on " << l << " dimension: " << sz1[l] << std::endl;
}
}
*/
*/
auto
inte_box_cont
=
cd_sm
.
convertCellUnitsIntoDomainSpace
(
inte_box
);
// Get processor ID that store intersection box
// Get processor ID that store intersection box
Point
<
dim
,
St
>
p
;
Point
<
dim
,
St
>
p
;
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
for
(
size_t
n
=
0
;
n
<
dim
;
n
++
)
p
.
get
(
i
)
=
(
inte_box
.
getHigh
(
i
)
+
inte_box
.
getLow
(
i
))
/
2
;
p
.
get
(
n
)
=
(
inte_box
_cont
.
getHigh
(
n
)
+
inte_box
_cont
.
getLow
(
n
))
/
2
;
//
std::cout << "Point: (" << p.get(0) << "; " << p.get(1) << ")" << std::endl;
std
::
cout
<<
"Point: ("
<<
p
.
get
(
0
)
<<
"; "
<<
p
.
get
(
1
)
<<
")"
<<
std
::
endl
;
p_id
=
dec
.
processorID
(
p
);
p_id
=
dec
.
processorID
(
p
);
prc_sz
.
get
(
p_id
)
++
;
prc_sz
.
get
(
p_id
)
++
;
//
std::cout << "P_id: " << p_id << std::endl;
std
::
cout
<<
"P_id: "
<<
p_id
<<
std
::
endl
;
// Convert intersection box from contiguous to discrete
// Convert intersection box from contiguous to discrete
//SpaceBox<dim,long int> inte_box_discr = cd_sm.convertDomainSpaceIntoGridUnits(inte_box,dec.periodicity());
//SpaceBox<dim,long int> inte_box_discr = cd_sm.convertDomainSpaceIntoGridUnits(inte_box,dec.periodicity());
...
@@ -133,12 +136,11 @@ public:
...
@@ -133,12 +136,11 @@ public:
for
(
size_t
l
=
0
;
l
<
dim
;
l
++
)
for
(
size_t
l
=
0
;
l
<
dim
;
l
++
)
std
::
cout
<<
"GR Size on "
<<
l
<<
" dimension: "
<<
gr
.
getGrid
().
size
(
l
)
<<
std
::
endl
;
std
::
cout
<<
"GR Size on "
<<
l
<<
" dimension: "
<<
gr
.
getGrid
().
size
(
l
)
<<
std
::
endl
;
// Size of the grid to send
// Size of the grid to send
size_t
sz
[
dim
];
size_t
sz
[
dim
];
for
(
size_t
l
=
0
;
l
<
dim
;
l
++
)
for
(
size_t
l
=
0
;
l
<
dim
;
l
++
)
{
{
sz
[
l
]
=
inte_box_local
.
getHigh
(
l
)
-
inte_box_local
.
getLow
(
l
);
sz
[
l
]
=
inte_box_local
.
getHigh
(
l
)
-
inte_box_local
.
getLow
(
l
)
+
1
;
std
::
cout
<<
"GR_send size on "
<<
l
<<
" dimension: "
<<
sz
[
l
]
<<
std
::
endl
;
std
::
cout
<<
"GR_send size on "
<<
l
<<
" dimension: "
<<
sz
[
l
]
<<
std
::
endl
;
}
}
...
@@ -160,8 +162,8 @@ public:
...
@@ -160,8 +162,8 @@ public:
{
{
auto
key
=
it
.
get
();
auto
key
=
it
.
get
();
std
::
string
str
=
key
.
to_string
();
std
::
string
str
=
key
.
to_string
();
std
::
cout
<<
"Key: "
<<
str
<<
std
::
endl
;
std
::
cout
<<
"Key: "
<<
str
<<
std
::
endl
;
gr_send
.
get_o
(
key
)
=
gr
.
get_o
(
key
);
gr_send
.
get_o
(
key
)
=
gr
.
get_o
(
key
);
//gr_send.template get<0>(key) = gr.template get<0>(key);
//gr_send.template get<0>(key) = gr.template get<0>(key);
...
@@ -172,7 +174,7 @@ public:
...
@@ -172,7 +174,7 @@ public:
++
it
;
++
it
;
}
}
// Add to the labeling vector
// Add to the labeling vector
//
lbl_b.get(p_id).add(gr_send);
lbl_b
.
get
(
p_id
).
add
(
gr_send
);
//std::cout << "9" << std::endl;
//std::cout << "9" << std::endl;
}
}
...
...
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