Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
openfpm
openfpm_pdata
Commits
473fad10
Commit
473fad10
authored
Apr 14, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing example compilation
parent
2289297b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
example/Grid/3_gray_scott_3d_vectorization/Makefile
example/Grid/3_gray_scott_3d_vectorization/Makefile
+2
-2
example/Grid/3_gray_scott_3d_vectorization/main.cpp
example/Grid/3_gray_scott_3d_vectorization/main.cpp
+6
-6
No files found.
example/Grid/3_gray_scott_3d_vectorization/Makefile
View file @
473fad10
...
...
@@ -10,10 +10,10 @@ OBJ = main.o update_new.o
mpif90
-ffree-line-length-none
-fno-range-check
-fno-second-underscore
-fimplicit-none
-mavx
-O3
-c
-g
-o
$@
$<
%.o
:
%.cpp
$(CC)
-O3
-mavx
-g
-c
--std
=
c++11
-Wno-ignored-attributes
-o
$@
$<
$(INCLUDE_PATH)
-I
/
home/i-bird/VC
/include
$(CC)
-O3
-mavx
-g
-c
--std
=
c++11
-Wno-ignored-attributes
-o
$@
$<
$(INCLUDE_PATH)
-I
/
where/is/vc/installation
/include
gray_scott
:
$(OBJ)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
-L
/
home/i-bird/VC
/lib
-lVc
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
-L
/
where/is/vc/installation
/lib
#
-lVc
(
Add
-lVc
if
you use VCDevel
)
all
:
gray_scott
...
...
example/Grid/3_gray_scott_3d_vectorization/main.cpp
View file @
473fad10
...
...
@@ -117,12 +117,15 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
&
NewU
,
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
&
NewV
,
grid_key_dx
<
3
>
(
&
star_stencil_3D
)[
7
],
Vc
::
double
_v
uFactor
,
Vc
::
double
_v
vFactor
,
double
deltaT
,
double
F
,
double
K
)
double
uFactor
_s
,
double
vFactor
_s
,
double
deltaT
,
double
F
,
double
K
)
{
#ifndef FORTRAN_UPDATE
//! \cond [cpp_update] \endcond
Vc
::
double
uFactor
=
uFactor_s
;
Vc
::
double
vFactor
=
vFactor_s
;
WHILE_M
(
OldU
,
star_stencil_3D
)
auto
&
U_old
=
GET_GRID_M
(
OldU
);
auto
&
V_old
=
GET_GRID_M
(
OldV
);
...
...
@@ -184,9 +187,6 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
//! \cond [fort_update] \endcond
double
uFactor_s
=
uFactor
[
0
];
double
vFactor_s
=
vFactor
[
0
];
auto
&
ginfo
=
OldU
.
getLocalGridsInfo
();
for
(
size_t
i
=
0
;
i
<
OldU
.
getN_loc_grid
()
;
i
++
)
...
...
@@ -294,8 +294,8 @@ int main(int argc, char* argv[])
// because we assume that spacing[x] == spacing[y] we use formula 2
// and we calculate the prefactor of Eq 2
Vc
::
double
_v
uFactor
=
deltaT
*
du
/
(
spacing
[
x
]
*
spacing
[
x
]);
Vc
::
double
_v
vFactor
=
deltaT
*
dv
/
(
spacing
[
x
]
*
spacing
[
x
]);
double
uFactor
=
deltaT
*
du
/
(
spacing
[
x
]
*
spacing
[
x
]);
double
vFactor
=
deltaT
*
dv
/
(
spacing
[
x
]
*
spacing
[
x
]);
timer
tot_sim
;
tot_sim
.
start
();
...
...
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