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
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_pdata
Commits
3bbb86eb
Commit
3bbb86eb
authored
Feb 02, 2016
by
Pietro Incardona
Browse files
Fixing duplicate particles in periodic boundary conditions
parent
8aaf2009
Changes
4
Hide whitespace changes
Inline
Side-by-side
openfpm_data
@
29df8079
Subproject commit
f57dd8c910a9c05a321237721b147d7331f175ba
Subproject commit
29df8079fec8f6735f18bdf5ec50497f43be154e
src/Decomposition/CartDecomposition.hpp
View file @
3bbb86eb
...
...
@@ -1062,12 +1062,6 @@ p1[0]<-----+ +----> p2[0]
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
pt
.
get
(
0
)
<
-
0.1
)
{
int
debug
=
0
;
debug
++
;
}
if
(
bc
[
i
]
==
PERIODIC
)
pt
.
get
(
i
)
=
openfpm
::
math
::
periodic_l
(
p
[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));
}
...
...
src/Grid/grid_dist_id_unit_test.hpp
View file @
3bbb86eb
...
...
@@ -1103,7 +1103,7 @@ void Test3D_decit(const Box<3,float> & domain, long int k)
big_step
=
(
big_step
==
0
)
?
1
:
big_step
;
long
int
small_step
=
21
;
print_test
(
"Testing grid iterator from decomposition k<="
,
k
);
print_test
(
"Testing grid iterator from decomposition
subset
k<="
,
k
);
// 3D test
for
(
;
k
>=
2
;
k
-=
(
k
>
2
*
big_step
)
?
big_step
:
small_step
)
...
...
src/Vector/vector_dist_unit_test.hpp
View file @
3bbb86eb
...
...
@@ -1037,22 +1037,20 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_test_interacting_particles )
BOOST_AUTO_TEST_CASE
(
vector_dist_cell_verlet_test
)
{
size_
t
k
=
64
*
64
*
64
*
global_v_cluster
->
getProcessingUnits
();
long
in
t
k
=
64
*
64
*
64
*
global_v_cluster
->
getProcessingUnits
();
k
=
std
::
pow
(
k
,
1
/
3.
);
long
int
big_step
=
k
/
30
;
big_step
=
(
big_step
==
0
)
?
1
:
big_step
;
long
int
small_step
=
21
;
print_test
(
"
Vector
cell and verlet list
test
k<="
,
k
);
print_test
(
"
Testing
cell and verlet list k<="
,
k
);
// 3D test
for
(
;
k
>
=
2
;
k
-=
(
k
>
2
*
big_step
)
?
big_step
:
small_step
)
for
(
;
k
>
8
*
big_step
;
k
-=
(
k
>
2
*
big_step
)
?
big_step
:
small_step
)
{
typedef
Point
<
3
,
float
>
s
;
print_test
(
"Vector cell and verlet list test k<="
,
k
);
Vcluster
&
v_cl
=
*
global_v_cluster
;
const
size_t
Ng
=
k
;
...
...
@@ -1119,14 +1117,6 @@ BOOST_AUTO_TEST_CASE( vector_dist_cell_verlet_test )
vd
.
getVerlet
(
verlet
,
third_dist
);
//
if
(
v_cl
.
getProcessUnitID
()
==
0
)
{
Point
<
3
,
float
>
p1
=
vd
.
template
getPos
<
0
>(
verlet
.
get
(
0
).
get
(
4
));
Point
<
3
,
float
>
p2
=
vd
.
template
getPos
<
0
>(
verlet
.
get
(
0
).
get
(
5
));
std
::
cout
<<
"Point 1: "
<<
p1
.
toString
()
<<
"
\n
Point 2: "
<<
p2
.
toString
()
<<
"
\n
"
;
}
bool
correct
=
true
;
// for each particle
...
...
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