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
6168d187
Commit
6168d187
authored
Dec 17, 2017
by
incardon
Browse files
Latest modules
parent
dd5e3d21
Changes
2
Hide whitespace changes
Inline
Side-by-side
example/Grid/3_gray_scott_3d_vectorization/main.cpp
View file @
6168d187
...
...
@@ -264,53 +264,10 @@ int main(int argc, char* argv[])
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
OldU
(
sz
,
domain
,
g
,
bc
);
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
OldV
(
OldU
.
getDecomposition
(),
sz
,
g
);
OldU
.
getDecomposition
().
write
(
"Test"
);
// New grid with the decomposition of the old grid
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
NewU
(
OldU
.
getDecomposition
(),
sz
,
g
);
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
NewV
(
OldV
.
getDecomposition
(),
sz
,
g
);
//////////// DEBUG /////////////////////////
//
//
//
auto
debug_it
=
OldU
.
getDomainIterator
();
int
count_
=
0
;
while
(
debug_it
.
isNext
())
{
auto
key
=
debug_it
.
get
();
count_
++
;
++
debug_it
;
}
auto
debug_it2
=
OldU
.
getDomainGhostIterator
();
int
count_dg
=
0
;
while
(
debug_it2
.
isNext
())
{
auto
key
=
debug_it2
.
get
();
count_dg
++
;
++
debug_it2
;
}
auto
&
v_cl
=
create_vcluster
();
count_dg
-=
count_
;
v_cl
.
sum
(
count_dg
);
v_cl
.
execute
();
std
::
cout
<<
"Ghost points: "
<<
count_dg
<<
std
::
endl
;
//////////////////////////////////////////////
// spacing of the grid on x and y
double
spacing
[
3
]
=
{
OldU
.
spacing
(
0
),
OldU
.
spacing
(
1
),
OldU
.
spacing
(
2
)};
...
...
@@ -340,7 +297,7 @@ int main(int argc, char* argv[])
{
-
1
,
0
,
0
},
{
1
,
0
,
0
}};
for
(
size_t
i
=
0
;
i
<
1
/*
timeSteps
*/
;
++
i
)
for
(
size_t
i
=
0
;
i
<
timeSteps
;
++
i
)
{
if
(
i
%
300
==
0
)
std
::
cout
<<
"STEP: "
<<
i
<<
std
::
endl
;
...
...
@@ -371,11 +328,8 @@ int main(int argc, char* argv[])
{
step
(
OldU
,
OldV
,
NewU
,
NewV
,
star_stencil_3D
,
uFactor
,
vFactor
,
deltaT
,
F
,
K
);
for
(
size_t
i
=
0
;
i
<
10000
;
i
++
)
{
NewU
.
ghost_get
<
0
>
();
NewV
.
ghost_get
<
0
>
();
}
}
else
{
...
...
openfpm_io
@
89411e76
Subproject commit
fac23ddd992dc17d82904bd5083f5235416c2255
Subproject commit
89411e76fbed1ab098d2bfec13e7759aca51a14d
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