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
1
Merge Requests
1
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
174d2cbe
Commit
174d2cbe
authored
Oct 04, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes for GPU
parent
a2f5c182
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
28 deletions
+48
-28
example/Grid/3_gray_scott_3d/Makefile
example/Grid/3_gray_scott_3d/Makefile
+1
-1
example/Grid/3_gray_scott_3d/main.cpp
example/Grid/3_gray_scott_3d/main.cpp
+44
-24
openfpm_data
openfpm_data
+1
-1
src/Vector/vector_dist_cell_list_tests.hpp
src/Vector/vector_dist_cell_list_tests.hpp
+2
-2
No files found.
example/Grid/3_gray_scott_3d/Makefile
View file @
174d2cbe
...
...
@@ -7,7 +7,7 @@ LDIR =
OBJ
=
main.o
%.o
:
%.cpp
$(CC)
-O
3
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
$(CC)
-O
0
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
gray_scott
:
$(OBJ)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
...
...
example/Grid/3_gray_scott_3d/main.cpp
View file @
174d2cbe
...
...
@@ -107,8 +107,8 @@ int main(int argc, char* argv[])
size_t
timeSteps
=
5000
;
// K and F (Physical constant in the equation)
double
K
=
0.0
14
;
double
F
=
0.0
53
;
double
K
=
0.0
53
;
double
F
=
0.0
14
;
//! \cond [init lib] \endcond
...
...
@@ -149,41 +149,61 @@ int main(int argc, char* argv[])
timer
tot_sim
;
tot_sim
.
start
();
grid_key_dx
<
3
>
star_stencil_3D
[
7
]
=
{{
0
,
0
,
0
},
{
0
,
0
,
-
1
},
{
0
,
0
,
1
},
{
0
,
-
1
,
0
},
{
0
,
1
,
0
},
{
-
1
,
0
,
0
},
{
1
,
0
,
0
}};
for
(
size_t
i
=
0
;
i
<
timeSteps
;
++
i
)
{
if
(
i
%
300
==
0
)
std
::
cout
<<
"STEP: "
<<
i
<<
std
::
endl
;
auto
it
=
Old
.
getDomainIterator
()
;
auto
it
=
Old
.
getDomainIterator
Stencil
(
star_stencil_3D
);
;
while
(
it
.
isNext
())
{
auto
key
=
it
.
get
();
// center point
auto
Cp
=
it
.
getStencil
<
0
>
();
// plus,minus X,Y,Z
auto
mx
=
it
.
getStencil
<
1
>
();
auto
px
=
it
.
getStencil
<
2
>
();
auto
my
=
it
.
getStencil
<
3
>
();
auto
py
=
it
.
getStencil
<
4
>
();
auto
mz
=
it
.
getStencil
<
5
>
();
auto
pz
=
it
.
getStencil
<
6
>
();
std
::
cout
<<
&
New
.
get
<
U
>
(
Cp
)
<<
std
::
endl
;
// update based on Eq 2
New
.
get
<
U
>
(
key
)
=
Old
.
get
<
U
>
(
key
)
+
uFactor
*
(
Old
.
get
<
U
>
(
key
.
move
(
x
,
1
)
)
+
Old
.
get
<
U
>
(
key
.
move
(
x
,
-
1
)
)
+
Old
.
get
<
U
>
(
key
.
move
(
y
,
1
)
)
+
Old
.
get
<
U
>
(
key
.
move
(
y
,
-
1
)
)
+
Old
.
get
<
U
>
(
key
.
move
(
z
,
1
)
)
+
Old
.
get
<
U
>
(
key
.
move
(
z
,
-
1
)
)
-
6.0
*
Old
.
get
<
U
>
(
key
))
+
-
deltaT
*
Old
.
get
<
U
>
(
key
)
*
Old
.
get
<
V
>
(
key
)
*
Old
.
get
<
V
>
(
key
)
+
-
deltaT
*
F
*
(
Old
.
get
<
U
>
(
key
)
-
1.0
);
New
.
get
<
U
>
(
Cp
)
=
Old
.
get
<
U
>
(
Cp
)
+
uFactor
*
(
Old
.
get
<
U
>
(
px
)
+
Old
.
get
<
U
>
(
mx
)
+
Old
.
get
<
U
>
(
py
)
+
Old
.
get
<
U
>
(
my
)
+
Old
.
get
<
U
>
(
pz
)
+
Old
.
get
<
U
>
(
mz
)
-
6.0
*
Old
.
get
<
U
>
(
Cp
))
+
-
deltaT
*
Old
.
get
<
U
>
(
Cp
)
*
Old
.
get
<
V
>
(
Cp
)
*
Old
.
get
<
V
>
(
Cp
)
+
-
deltaT
*
F
*
(
Old
.
get
<
U
>
(
Cp
)
-
1.0
);
// update based on Eq 2
New
.
get
<
V
>
(
key
)
=
Old
.
get
<
V
>
(
key
)
+
vFactor
*
(
Old
.
get
<
V
>
(
key
.
move
(
x
,
1
)
)
+
Old
.
get
<
V
>
(
key
.
move
(
x
,
-
1
)
)
+
Old
.
get
<
V
>
(
key
.
move
(
y
,
1
)
)
+
Old
.
get
<
V
>
(
key
.
move
(
y
,
-
1
)
)
+
Old
.
get
<
V
>
(
key
.
move
(
z
,
1
)
)
+
Old
.
get
<
V
>
(
key
.
move
(
z
,
-
1
)
)
-
6
*
Old
.
get
<
V
>
(
key
))
+
deltaT
*
Old
.
get
<
U
>
(
key
)
*
Old
.
get
<
V
>
(
key
)
*
Old
.
get
<
V
>
(
key
)
+
-
deltaT
*
(
F
+
K
)
*
Old
.
get
<
V
>
(
key
);
New
.
get
<
V
>
(
Cp
)
=
Old
.
get
<
V
>
(
Cp
)
+
vFactor
*
(
Old
.
get
<
V
>
(
px
)
+
Old
.
get
<
V
>
(
mx
)
+
Old
.
get
<
V
>
(
py
)
+
Old
.
get
<
V
>
(
my
)
+
Old
.
get
<
V
>
(
pz
)
+
Old
.
get
<
V
>
(
mz
)
-
6
*
Old
.
get
<
V
>
(
Cp
))
+
deltaT
*
Old
.
get
<
U
>
(
Cp
)
*
Old
.
get
<
V
>
(
Cp
)
*
Old
.
get
<
V
>
(
Cp
)
+
-
deltaT
*
(
F
+
K
)
*
Old
.
get
<
V
>
(
Cp
);
// Next point in the grid
++
it
;
...
...
openfpm_data
@
c98064f1
Subproject commit
261069dff2b91021d274d0db1fe71191633f1ef6
Subproject commit
c98064f14227be31eba3c1e7a03dea3af82ebb14
src/Vector/vector_dist_cell_list_tests.hpp
View file @
174d2cbe
...
...
@@ -524,8 +524,8 @@ BOOST_AUTO_TEST_CASE( vector_dist_symmetric_cell_list )
ret
&=
vd
.
getPropRead
<
1
>
(
p
)
==
vd
.
getPropRead
<
0
>
(
p
);
vd
.
getProp
Read
<
3
>
(
p
).
sort
();
vd
.
getProp
Read
<
4
>
(
p
).
sort
();
vd
.
getProp
Write
<
3
>
(
p
).
sort
();
vd
.
getProp
Write
<
4
>
(
p
).
sort
();
ret
&=
vd
.
getPropRead
<
3
>
(
p
).
size
()
==
vd
.
getPropRead
<
4
>
(
p
).
size
();
...
...
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