Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_pdata
Commits
1b08cead
Commit
1b08cead
authored
Jul 03, 2019
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing tests + adding adjust ghost
parent
6133c34c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
275 additions
and
253 deletions
+275
-253
openfpm_data
openfpm_data
+1
-1
src/Amr/grid_dist_amr_unit_tests.cpp
src/Amr/grid_dist_amr_unit_tests.cpp
+42
-5
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph0_test.vtk
...Distribution/test_data/dec_optimizer_disc_graph0_test.vtk
+64
-64
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph1_test.vtk
...Distribution/test_data/dec_optimizer_disc_graph1_test.vtk
+64
-64
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph2_test.vtk
...Distribution/test_data/dec_optimizer_disc_graph2_test.vtk
+64
-64
src/Grid/grid_dist_id.hpp
src/Grid/grid_dist_id.hpp
+35
-53
src/Vector/cuda/vector_dist_gpu_unit_tests.cu
src/Vector/cuda/vector_dist_gpu_unit_tests.cu
+4
-1
No files found.
openfpm_data
@
5f570f31
Subproject commit
b0330228e8503af944dcc5a05fa4fb1bc3e3b594
Subproject commit
5f570f31ead72c65c4d38243dcc58425e7b2fdf3
src/Amr/grid_dist_amr_unit_tests.cpp
View file @
1b08cead
...
...
@@ -223,6 +223,13 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_px
)
==
gkey
.
get
(
0
)
+
1
;
match
&=
amr_g
.
template
get
<
1
>(
key_px
)
==
gkey
.
get
(
1
);
match
&=
amr_g
.
template
get
<
2
>(
key_px
)
==
gkey
.
get
(
2
);
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
if
(
gr_is_inside
(
key_gmx
,
amr_g
.
getGridInfoVoid
(
it2
.
getLvl
()).
getSize
())
==
true
)
...
...
@@ -230,6 +237,13 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_mx
)
==
gkey
.
get
(
0
)
-
1
;
match
&=
amr_g
.
template
get
<
1
>(
key_mx
)
==
gkey
.
get
(
1
);
match
&=
amr_g
.
template
get
<
2
>(
key_mx
)
==
gkey
.
get
(
2
);
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
if
(
gr_is_inside
(
key_gpy
,
amr_g
.
getGridInfoVoid
(
it2
.
getLvl
()).
getSize
())
==
true
)
...
...
@@ -237,6 +251,13 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_py
)
==
gkey
.
get
(
0
);
match
&=
amr_g
.
template
get
<
1
>(
key_py
)
==
gkey
.
get
(
1
)
+
1
;
match
&=
amr_g
.
template
get
<
2
>(
key_py
)
==
gkey
.
get
(
2
);
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
if
(
gr_is_inside
(
key_gmy
,
amr_g
.
getGridInfoVoid
(
it2
.
getLvl
()).
getSize
())
==
true
)
...
...
@@ -244,6 +265,13 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_my
)
==
gkey
.
get
(
0
);
match
&=
amr_g
.
template
get
<
1
>(
key_my
)
==
gkey
.
get
(
1
)
-
1
;
match
&=
amr_g
.
template
get
<
2
>(
key_my
)
==
gkey
.
get
(
2
);
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
if
(
gr_is_inside
(
key_gpz
,
amr_g
.
getGridInfoVoid
(
it2
.
getLvl
()).
getSize
())
==
true
)
...
...
@@ -251,6 +279,13 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_pz
)
==
gkey
.
get
(
0
);
match
&=
amr_g
.
template
get
<
1
>(
key_pz
)
==
gkey
.
get
(
1
);
match
&=
amr_g
.
template
get
<
2
>(
key_pz
)
==
gkey
.
get
(
2
)
+
1
;
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
if
(
gr_is_inside
(
key_gmz
,
amr_g
.
getGridInfoVoid
(
it2
.
getLvl
()).
getSize
())
==
true
)
...
...
@@ -258,14 +293,16 @@ void Test3D_amr_child_parent_get_no_periodic(grid & amr_g, Box<3,float> & domain
match
&=
amr_g
.
template
get
<
0
>(
key_mz
)
==
gkey
.
get
(
0
);
match
&=
amr_g
.
template
get
<
1
>(
key_mz
)
==
gkey
.
get
(
1
);
match
&=
amr_g
.
template
get
<
2
>(
key_mz
)
==
gkey
.
get
(
2
)
-
1
;
}
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
if
(
match
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
// Test to go to all the levels down
size_t
lvl
=
it2
.
getLvl
();
...
...
src/CMakeLists.txt
View file @
1b08cead
...
...
@@ -23,7 +23,7 @@ add_executable(pdata ${OPENFPM_INIT_FILE} ${CUDA_SOURCES} main.cpp
Grid/tests/grid_dist_id_HDF5_chckpnt_restart_test.cpp
Grid/tests/grid_dist_id_unit_test.cpp
Grid/tests/sgrid_dist_id_unit_tests.cpp
#
Grid/tests/grid_dist_id_dlb_unit_test.cpp
Grid/tests/grid_dist_id_dlb_unit_test.cpp
Grid/tests/staggered_grid_dist_unit_test.cpp
Vector/tests/vector_dist_cell_list_tests.cpp
Vector/tests/vector_dist_complex_prp_unit_test.cpp
...
...
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph0_test.vtk
View file @
1b08cead
...
...
@@ -359,70 +359,70 @@ LINES 224 672
2 63 55
POINT_DATA 64
VECTORS x float
0.000000 0.000000 0
0.125000 0.000000 0
0.250000 0.000000 0
0.375000 0.000000 0
0.500000 0.000000 0
0.625000 0.000000 0
0.750000 0.000000 0
0.875000 0.000000 0
0.000000 0.125000 0
0.125000 0.125000 0
0.250000 0.125000 0
0.375000 0.125000 0
0.500000 0.125000 0
0.625000 0.125000 0
0.750000 0.125000 0
0.875000 0.125000 0
0.000000 0.250000 0
0.125000 0.250000 0
0.250000 0.250000 0
0.375000 0.250000 0
0.500000 0.250000 0
0.625000 0.250000 0
0.750000 0.250000 0
0.875000 0.250000 0
0.000000 0.375000 0
0.125000 0.375000 0
0.250000 0.375000 0
0.375000 0.375000 0
0.500000 0.375000 0
0.625000 0.375000 0
0.750000 0.375000 0
0.875000 0.375000 0
0.000000 0.500000 0
0.125000 0.500000 0
0.250000 0.500000 0
0.375000 0.500000 0
0.500000 0.500000 0
0.625000 0.500000 0
0.750000 0.500000 0
0.875000 0.500000 0
0.000000 0.625000 0
0.125000 0.625000 0
0.250000 0.625000 0
0.375000 0.625000 0
0.500000 0.625000 0
0.625000 0.625000 0
0.750000 0.625000 0
0.875000 0.625000 0
0.000000 0.750000 0
0.125000 0.750000 0
0.250000 0.750000 0
0.375000 0.750000 0
0.500000 0.750000 0
0.625000 0.750000 0
0.750000 0.750000 0
0.875000 0.750000 0
0.000000 0.875000 0
0.125000 0.875000 0
0.250000 0.875000 0
0.375000 0.875000 0
0.500000 0.875000 0
0.625000 0.875000 0
0.750000 0.875000 0
0.875000 0.875000 0
0.000000 0.000000 0
.000000
0.125000 0.000000 0
.000000
0.250000 0.000000 0
.000000
0.375000 0.000000 0
.000000
0.500000 0.000000 0
.000000
0.625000 0.000000 0
.000000
0.750000 0.000000 0
.000000
0.875000 0.000000 0
.000000
0.000000 0.125000 0
.000000
0.125000 0.125000 0
.000000
0.250000 0.125000 0
.000000
0.375000 0.125000 0
.000000
0.500000 0.125000 0
.000000
0.625000 0.125000 0
.000000
0.750000 0.125000 0
.000000
0.875000 0.125000 0
.000000
0.000000 0.250000 0
.000000
0.125000 0.250000 0
.000000
0.250000 0.250000 0
.000000
0.375000 0.250000 0
.000000
0.500000 0.250000 0
.000000
0.625000 0.250000 0
.000000
0.750000 0.250000 0
.000000
0.875000 0.250000 0
.000000
0.000000 0.375000 0
.000000
0.125000 0.375000 0
.000000
0.250000 0.375000 0
.000000
0.375000 0.375000 0
.000000
0.500000 0.375000 0
.000000
0.625000 0.375000 0
.000000
0.750000 0.375000 0
.000000
0.875000 0.375000 0
.000000
0.000000 0.500000 0
.000000
0.125000 0.500000 0
.000000
0.250000 0.500000 0
.000000
0.375000 0.500000 0
.000000
0.500000 0.500000 0
.000000
0.625000 0.500000 0
.000000
0.750000 0.500000 0
.000000
0.875000 0.500000 0
.000000
0.000000 0.625000 0
.000000
0.125000 0.625000 0
.000000
0.250000 0.625000 0
.000000
0.375000 0.625000 0
.000000
0.500000 0.625000 0
.000000
0.625000 0.625000 0
.000000
0.750000 0.625000 0
.000000
0.875000 0.625000 0
.000000
0.000000 0.750000 0
.000000
0.125000 0.750000 0
.000000
0.250000 0.750000 0
.000000
0.375000 0.750000 0
.000000
0.500000 0.750000 0
.000000
0.625000 0.750000 0
.000000
0.750000 0.750000 0
.000000
0.875000 0.750000 0
.000000
0.000000 0.875000 0
.000000
0.125000 0.875000 0
.000000
0.250000 0.875000 0
.000000
0.375000 0.875000 0
.000000
0.500000 0.875000 0
.000000
0.625000 0.875000 0
.000000
0.750000 0.875000 0
.000000
0.875000 0.875000 0
.000000
SCALARS migration unsigned_int
LOOKUP_TABLE default
0
...
...
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph1_test.vtk
View file @
1b08cead
...
...
@@ -359,70 +359,70 @@ LINES 224 672
2 63 55
POINT_DATA 64
VECTORS x float
0.000000 0.000000 0
0.125000 0.000000 0
0.250000 0.000000 0
0.375000 0.000000 0
0.500000 0.000000 0
0.625000 0.000000 0
0.750000 0.000000 0
0.875000 0.000000 0
0.000000 0.125000 0
0.125000 0.125000 0
0.250000 0.125000 0
0.375000 0.125000 0
0.500000 0.125000 0
0.625000 0.125000 0
0.750000 0.125000 0
0.875000 0.125000 0
0.000000 0.250000 0
0.125000 0.250000 0
0.250000 0.250000 0
0.375000 0.250000 0
0.500000 0.250000 0
0.625000 0.250000 0
0.750000 0.250000 0
0.875000 0.250000 0
0.000000 0.375000 0
0.125000 0.375000 0
0.250000 0.375000 0
0.375000 0.375000 0
0.500000 0.375000 0
0.625000 0.375000 0
0.750000 0.375000 0
0.875000 0.375000 0
0.000000 0.500000 0
0.125000 0.500000 0
0.250000 0.500000 0
0.375000 0.500000 0
0.500000 0.500000 0
0.625000 0.500000 0
0.750000 0.500000 0
0.875000 0.500000 0
0.000000 0.625000 0
0.125000 0.625000 0
0.250000 0.625000 0
0.375000 0.625000 0
0.500000 0.625000 0
0.625000 0.625000 0
0.750000 0.625000 0
0.875000 0.625000 0
0.000000 0.750000 0
0.125000 0.750000 0
0.250000 0.750000 0
0.375000 0.750000 0
0.500000 0.750000 0
0.625000 0.750000 0
0.750000 0.750000 0
0.875000 0.750000 0
0.000000 0.875000 0
0.125000 0.875000 0
0.250000 0.875000 0
0.375000 0.875000 0
0.500000 0.875000 0
0.625000 0.875000 0
0.750000 0.875000 0
0.875000 0.875000 0
0.000000 0.000000 0
.000000
0.125000 0.000000 0
.000000
0.250000 0.000000 0
.000000
0.375000 0.000000 0
.000000
0.500000 0.000000 0
.000000
0.625000 0.000000 0
.000000
0.750000 0.000000 0
.000000
0.875000 0.000000 0
.000000
0.000000 0.125000 0
.000000
0.125000 0.125000 0
.000000
0.250000 0.125000 0
.000000
0.375000 0.125000 0
.000000
0.500000 0.125000 0
.000000
0.625000 0.125000 0
.000000
0.750000 0.125000 0
.000000
0.875000 0.125000 0
.000000
0.000000 0.250000 0
.000000
0.125000 0.250000 0
.000000
0.250000 0.250000 0
.000000
0.375000 0.250000 0
.000000
0.500000 0.250000 0
.000000
0.625000 0.250000 0
.000000
0.750000 0.250000 0
.000000
0.875000 0.250000 0
.000000
0.000000 0.375000 0
.000000
0.125000 0.375000 0
.000000
0.250000 0.375000 0
.000000
0.375000 0.375000 0
.000000
0.500000 0.375000 0
.000000
0.625000 0.375000 0
.000000
0.750000 0.375000 0
.000000
0.875000 0.375000 0
.000000
0.000000 0.500000 0
.000000
0.125000 0.500000 0
.000000
0.250000 0.500000 0
.000000
0.375000 0.500000 0
.000000
0.500000 0.500000 0
.000000
0.625000 0.500000 0
.000000
0.750000 0.500000 0
.000000
0.875000 0.500000 0
.000000
0.000000 0.625000 0
.000000
0.125000 0.625000 0
.000000
0.250000 0.625000 0
.000000
0.375000 0.625000 0
.000000
0.500000 0.625000 0
.000000
0.625000 0.625000 0
.000000
0.750000 0.625000 0
.000000
0.875000 0.625000 0
.000000
0.000000 0.750000 0
.000000
0.125000 0.750000 0
.000000
0.250000 0.750000 0
.000000
0.375000 0.750000 0
.000000
0.500000 0.750000 0
.000000
0.625000 0.750000 0
.000000
0.750000 0.750000 0
.000000
0.875000 0.750000 0
.000000
0.000000 0.875000 0
.000000
0.125000 0.875000 0
.000000
0.250000 0.875000 0
.000000
0.375000 0.875000 0
.000000
0.500000 0.875000 0
.000000
0.625000 0.875000 0
.000000
0.750000 0.875000 0
.000000
0.875000 0.875000 0
.000000
SCALARS migration unsigned_int
LOOKUP_TABLE default
0
...
...
src/Decomposition/Distribution/test_data/dec_optimizer_disc_graph2_test.vtk
View file @
1b08cead
...
...
@@ -359,70 +359,70 @@ LINES 224 672
2 63 55
POINT_DATA 64
VECTORS x float
0.000000 0.000000 0
0.125000 0.000000 0
0.250000 0.000000 0
0.375000 0.000000 0
0.500000 0.000000 0
0.625000 0.000000 0
0.750000 0.000000 0
0.875000 0.000000 0
0.000000 0.125000 0
0.125000 0.125000 0
0.250000 0.125000 0
0.375000 0.125000 0
0.500000 0.125000 0
0.625000 0.125000 0
0.750000 0.125000 0
0.875000 0.125000 0
0.000000 0.250000 0
0.125000 0.250000 0
0.250000 0.250000 0
0.375000 0.250000 0
0.500000 0.250000 0
0.625000 0.250000 0
0.750000 0.250000 0
0.875000 0.250000 0
0.000000 0.375000 0
0.125000 0.375000 0
0.250000 0.375000 0
0.375000 0.375000 0
0.500000 0.375000 0
0.625000 0.375000 0
0.750000 0.375000 0
0.875000 0.375000 0
0.000000 0.500000 0
0.125000 0.500000 0
0.250000 0.500000 0
0.375000 0.500000 0
0.500000 0.500000 0
0.625000 0.500000 0
0.750000 0.500000 0
0.875000 0.500000 0
0.000000 0.625000 0
0.125000 0.625000 0
0.250000 0.625000 0
0.375000 0.625000 0
0.500000 0.625000 0
0.625000 0.625000 0
0.750000 0.625000 0
0.875000 0.625000 0
0.000000 0.750000 0
0.125000 0.750000 0
0.250000 0.750000 0
0.375000 0.750000 0
0.500000 0.750000 0
0.625000 0.750000 0
0.750000 0.750000 0
0.875000 0.750000 0
0.000000 0.875000 0
0.125000 0.875000 0
0.250000 0.875000 0
0.375000 0.875000 0
0.500000 0.875000 0
0.625000 0.875000 0
0.750000 0.875000 0
0.875000 0.875000 0
0.000000 0.000000 0
.000000
0.125000 0.000000 0
.000000
0.250000 0.000000 0
.000000
0.375000 0.000000 0
.000000
0.500000 0.000000 0
.000000
0.625000 0.000000 0
.000000
0.750000 0.000000 0
.000000
0.875000 0.000000 0
.000000
0.000000 0.125000 0
.000000
0.125000 0.125000 0
.000000
0.250000 0.125000 0
.000000
0.375000 0.125000 0
.000000
0.500000 0.125000 0
.000000
0.625000 0.125000 0
.000000
0.750000 0.125000 0
.000000
0.875000 0.125000 0
.000000
0.000000 0.250000 0
.000000
0.125000 0.250000 0
.000000
0.250000 0.250000 0
.000000
0.375000 0.250000 0
.000000
0.500000 0.250000 0
.000000
0.625000 0.250000 0
.000000
0.750000 0.250000 0
.000000
0.875000 0.250000 0
.000000
0.000000 0.375000 0
.000000
0.125000 0.375000 0
.000000
0.250000 0.375000 0
.000000
0.375000 0.375000 0
.000000
0.500000 0.375000 0
.000000
0.625000 0.375000 0
.000000
0.750000 0.375000 0
.000000
0.875000 0.375000 0
.000000
0.000000 0.500000 0
.000000
0.125000 0.500000 0
.000000
0.250000 0.500000 0
.000000
0.375000 0.500000 0
.000000
0.500000 0.500000 0
.000000
0.625000 0.500000 0
.000000
0.750000 0.500000 0
.000000
0.875000 0.500000 0
.000000
0.000000 0.625000 0
.000000
0.125000 0.625000 0
.000000
0.250000 0.625000 0
.000000
0.375000 0.625000 0
.000000
0.500000 0.625000 0
.000000
0.625000 0.625000 0
.000000
0.750000 0.625000 0
.000000
0.875000 0.625000 0
.000000
0.000000 0.750000 0
.000000
0.125000 0.750000 0
.000000
0.250000 0.750000 0
.000000
0.375000 0.750000 0
.000000
0.500000 0.750000 0
.000000
0.625000 0.750000 0
.000000
0.750000 0.750000 0
.000000
0.875000 0.750000 0
.000000
0.000000 0.875000 0
.000000
0.125000 0.875000 0
.000000
0.250000 0.875000 0
.000000
0.375000 0.875000 0
.000000
0.500000 0.875000 0
.000000
0.625000 0.875000 0
.000000
0.750000 0.875000 0
.000000
0.875000 0.875000 0
.000000
SCALARS migration unsigned_int
LOOKUP_TABLE default
0
...
...
src/Grid/grid_dist_id.hpp
View file @
1b08cead
...
...
@@ -71,7 +71,12 @@ struct Box_fix
* \snippet grid_dist_id_unit_test.cpp Construct two grid with the same decomposition
*
*/
template
<
unsigned
int
dim
,
typename
St
,
typename
T
,
typename
Decomposition
=
CartDecomposition
<
dim
,
St
>,
typename
Memory
=
HeapMemory
,
typename
device_grid
=
grid_cpu
<
dim
,
T
>
>
template
<
unsigned
int
dim
,
typename
St
,
typename
T
,
typename
Decomposition
=
CartDecomposition
<
dim
,
St
>,
typename
Memory
=
HeapMemory
,
typename
device_grid
=
grid_cpu
<
dim
,
T
>
>
class
grid_dist_id
:
public
grid_dist_id_comm
<
dim
,
St
,
T
,
Decomposition
,
Memory
,
device_grid
>
{
//! Domain
...
...
@@ -333,7 +338,7 @@ class grid_dist_id : public grid_dist_id_comm<dim,St,T,Decomposition,Memory,devi
Box
<
dim
,
long
int
>
&
ib
,
Ghost
<
dim
,
long
int
>
&
g
)
{
if
(
g
.
isInvalidGhost
()
==
true
)
if
(
g
.
isInvalidGhost
()
==
true
||
use_bx_def
==
true
)
{
return
;}
// Convert from SpaceBox<dim,St> to SpaceBox<dim,long int>
...
...
@@ -362,6 +367,8 @@ class grid_dist_id : public grid_dist_id_comm<dim,St,T,Decomposition,Memory,devi
}
}
/*! \brief Create per-processor internal ghost boxes list in grid units and g_id_to_external_ghost_box
*
*/
...
...
@@ -390,6 +397,18 @@ class grid_dist_id : public grid_dist_id_comm<dim,St,T,Decomposition,Memory,devi
::
Box
<
dim
,
St
>
ib_dom
=
dec
.
getProcessorIGhostBox
(
i
,
j
);
::
Box
<
dim
,
long
int
>
ib
=
cd_sm
.
convertDomainSpaceIntoGridUnits
(
ib_dom
,
dec
.
periodicity
());
size_t
sub_id
=
dec
.
getProcessorIGhostSub
(
i
,
j
);
size_t
r_sub
=
dec
.
getProcessorIGhostSSub
(
i
,
j
);
auto
&
n_box
=
dec
.
getNearSubdomains
(
dec
.
IDtoProc
(
i
));
Box
<
dim
,
long
int
>
sub
=
gdb_ext
.
get
(
sub_id
).
Dbox
;
sub
+=
gdb_ext
.
get
(
sub_id
).
origin
;
set_for_adjustment
(
sub
,
n_box
.
get
(
r_sub
),
dec
.
getProcessorIGhostPos
(
i
,
j
),
ib
,
ghost_int
);
// Here we intersect the internal ghost box with the definition boxes
// this operation make sense when the grid is not defined in the full
// domain and we have to intersect the internal ghost box with all the box
...
...
@@ -698,6 +717,19 @@ class grid_dist_id : public grid_dist_id_comm<dim,St,T,Decomposition,Memory,devi
if
(
ib
.
isValid
()
==
false
)
continue
;
size_t
sub_id
=
i
;
size_t
r_sub
=
dec
.
getLocalIGhostSub
(
i
,
j
);
Box
<
dim
,
long
int
>
sub
=
gdb_ext
.
get
(
sub_id
).
Dbox
;
sub
+=
gdb_ext
.
get
(
sub_id
).
origin
;
set_for_adjustment
(
sub
,
dec
.
getSubDomain
(
r_sub
),
dec
.
getLocalIGhostPos
(
i
,
j
),
ib
,
ghost_int
);
// Check if ib is valid if not it mean that the internal ghost does not contain information so skip it
if
(
ib
.
isValid
()
==
false
)
continue
;
pib
.
bid
.
add
();
pib
.
bid
.
last
().
box
=
ib
;
pib
.
bid
.
last
().
sub
=
dec
.
getLocalIGhostSub
(
i
,
j
);
...
...
@@ -818,57 +850,6 @@ class grid_dist_id : public grid_dist_id_comm<dim,St,T,Decomposition,Memory,devi
volume_linked
+=
pib
.
bid
.
last
().
box
.
getVolumeKey
();
}
}
/* if (volume_linked != loc_ig_box.get(i).bid.get(j).box.getVolumeKey())
{
// Create a grid with the same size of the external ghost
// and mark all the linked points
size_t sz[dim];
for (size_t s = 0 ; s < dim ; s++)
{sz[s] = loc_ig_box.get(i).bid.get(j).box.getHigh(s) - loc_ig_box.get(i).bid.get(j).box.getLow(s) + 1;}
// Add an unlinked gdb_ext
// An unlinked gdb_ext is an empty domain with only a ghost
// part
GBoxes<dim> tmp;
tmp.GDbox = loc_ig_box.get(i).bid.get(j).box;
tmp.GDbox -= tmp.GDbox.getP1();
tmp.origin = loc_ig_box.get(i).bid.get(j).box.getP1();
for (size_t i = 0 ; i < dim ; i++)
{
// we set an invalid box, there is no-domain
tmp.Dbox.setLow(i,0);
tmp.Dbox.setHigh(i,-1);
}
tmp.k = -1;
gdb_ext.add(tmp);
// create the local grid
loc_grid.add();
loc_grid.last().resize(sz);
// Add an external ghost box
Box<dim,long int> output = flip_box(loc_ig_box.get(i).bid.get(j).box,loc_ig_box.get(i).bid.get(j).cmb);
// fill the link variable
loc_ig_box.get(i).bid.get(j).k = pib.bid.size();
comb<dim> cmb = loc_ig_box.get(i).bid.get(j).cmb;
cmb.sign_flip();
size_t s = loc_ig_box.get(i).bid.get(j).k;
add_loc_eg_box(le_sub,
dec.getLocalEGhostSub(le_sub,s),
j,
gdb_ext.size() - 1,
pib.bid,
output,
cmb);
}*/