Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_pdata
Commits
af336a3c
Commit
af336a3c
authored
Jun 22, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing recalculation of ShiftBox in case of periodic boundary condition for vector_dist
parent
406f3750
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
18 deletions
+12
-18
src/Decomposition/CartDecomposition.hpp
src/Decomposition/CartDecomposition.hpp
+3
-3
src/Decomposition/ie_ghost.hpp
src/Decomposition/ie_ghost.hpp
+3
-3
src/Grid/Iterators/grid_dist_id_iterator_dec_skin.hpp
src/Grid/Iterators/grid_dist_id_iterator_dec_skin.hpp
+0
-6
src/Vector/vector_dist_comm.hpp
src/Vector/vector_dist_comm.hpp
+6
-6
No files found.
src/Decomposition/CartDecomposition.hpp
View file @
af336a3c
...
...
@@ -853,7 +853,7 @@ public:
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
bc
[
i
]
==
PERIODIC
)
pt
[
i
]
=
openfpm
::
math
::
periodic_l
(
pt
[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));
{
pt
[
i
]
=
openfpm
::
math
::
periodic_l
(
pt
[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));}
}
}
...
...
@@ -871,7 +871,7 @@ public:
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
bc
[
i
]
==
PERIODIC
)
pt
.
get
(
i
)
=
openfpm
::
math
::
periodic_l
(
pt
.
get
(
i
),
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));
{
pt
.
get
(
i
)
=
openfpm
::
math
::
periodic_l
(
pt
.
get
(
i
),
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));}
}
}
...
...
@@ -889,7 +889,7 @@ public:
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
bc
[
i
]
==
PERIODIC
)
pt
.
template
get
<
0
>
()[
i
]
=
openfpm
::
math
::
periodic_l
(
pt
.
template
get
<
0
>
()[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));
{
pt
.
template
get
<
0
>
()[
i
]
=
openfpm
::
math
::
periodic_l
(
pt
.
template
get
<
0
>
()[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));}
}
}
...
...
src/Decomposition/ie_ghost.hpp
View file @
af336a3c
...
...
@@ -839,7 +839,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
vb_int
.
get
(
bid
).
box
.
isInside
(
p
)
==
true
)
if
(
vb_int
.
get
(
bid
).
box
.
isInside
NP
(
p
)
==
true
)
{
ids
.
add
(
id
::
id
(
vb_int
.
get
(
bid
),
bid
));
}
...
...
@@ -883,7 +883,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
vb_int
.
get
(
bid
).
box
.
isInside
(
p
)
==
true
)
if
(
vb_int
.
get
(
bid
).
box
.
isInside
NP
(
p
)
==
true
)
{
ids_p
.
add
(
std
::
pair
<
size_t
,
size_t
>
(
id1
::
id
(
vb_int
.
get
(
bid
),
bid
),
id2
::
id
(
vb_int
.
get
(
bid
),
bid
)));
}
...
...
@@ -926,7 +926,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
vb_int
.
get
(
bid
).
box
.
isInside
(
p
)
==
true
)
if
(
vb_int
.
get
(
bid
).
box
.
isInside
NP
(
p
)
==
true
)
{
ids
.
add
(
id
::
id
(
vb_int
.
get
(
bid
),
bid
));
}
...
...
src/Grid/Iterators/grid_dist_id_iterator_dec_skin.hpp
View file @
af336a3c
...
...
@@ -252,12 +252,6 @@ class grid_dist_id_iterator_dec_skin : protected grid_skin_iterator_bc<Decomposi
// shift
k_glob
=
k_glob
+
gdb_ext
.
get
(
sub_id
).
origin
;
if
(
k_glob
.
get
(
0
)
>
11
)
{
int
debug
=
0
;
debug
++
;
}
return
k_glob
;
}
...
...
src/Vector/vector_dist_comm.hpp
View file @
af336a3c
...
...
@@ -204,8 +204,8 @@ class vector_dist_comm
return
end_id
;
}
//! F
lags that indicate that the function createShiftBox() has been call
ed
bool
is_shift_box_created
=
false
;
//! F
rom which decomposition the shift boxes are calculat
ed
long
int
shift_box_ndec
=
-
1
;
//! this map is used to check if a combination is already present
std
::
unordered_map
<
size_t
,
size_t
>
map_cmb
;
...
...
@@ -226,11 +226,11 @@ class vector_dist_comm
*/
void
createShiftBox
()
{
if
(
is_shift_box_created
==
true
)
if
(
shift_box_ndec
==
(
long
int
)
dec
.
get_ndec
()
)
return
;
// Add local particles coming from periodic boundary, the only boxes that count are the one
// touching the border
, filter them
// touching the border
for
(
size_t
i
=
0
;
i
<
dec
.
getNLocalSub
();
i
++
)
{
size_t
Nl
=
dec
.
getLocalNIGhost
(
i
);
...
...
@@ -261,7 +261,7 @@ class vector_dist_comm
}
}
is_shift_box_created
=
true
;
shift_box_ndec
=
dec
.
get_ndec
()
;
}
/*! \brief Local ghost from labeled particles
...
...
@@ -333,7 +333,7 @@ class vector_dist_comm
{
for
(
size_t
j
=
0
;
j
<
box_f
.
get
(
i
).
size
();
j
++
)
{
if
(
box_f
.
get
(
i
).
get
(
j
).
isInside
(
v_pos
.
get
(
key
))
==
true
)
if
(
box_f
.
get
(
i
).
get
(
j
).
isInside
NP
(
v_pos
.
get
(
key
))
==
true
)
{
size_t
lin_id
=
dec
.
convertShift
(
box_cmb
.
get
(
i
));
...
...
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