Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Coulette
patapon
Commits
89abe5dd
Commit
89abe5dd
authored
Nov 19, 2017
by
ph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add transport solver
parent
41c39e44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
transport_cl.py
transport_cl.py
+2
-2
transport_kernels.cl
transport_kernels.cl
+10
-10
No files found.
transport_cl.py
View file @
89abe5dd
...
...
@@ -24,8 +24,8 @@ _m = 1
_wbord
=
0.
# grid size
_nx
=
102
4
_ny
=
102
4
_nx
=
6
4
_ny
=
6
4
Lx
=
1.
Ly
=
1.
...
...
transport_kernels.cl
View file @
89abe5dd
...
...
@@ -76,17 +76,17 @@ __kernel void time_step(__global float *wn, __global float *wnp1){
int
j
=
id
/
_NX
;
int
ngrid
=
_NX
*
_NY
;
float
wnow[_M]
;
float
wnext[_M]
;
int
ngrid
=
_NX
*
_NY
;
float
wnow[_M]
;
float
wnext[_M]
;
//
load
middle
value
for
(
int
iv
=
0
; iv < _M; iv++){
int
imem
=
i
+
j
*
_NX
+
iv
*
ngrid
;
wnow[iv]
=
wn[imem]
;
wnext[iv]
=
wnow[iv]
;
}
//
load
middle
value
for
(
int
iv
=
0
; iv < _M; iv++){
int
imem
=
i
+
j
*
_NX
+
iv
*
ngrid
;
wnow[iv]
=
wn[imem]
;
wnext[iv]
=
wnow[iv]
;
}
if
(
i
>
0
&&
i
<
_NX
-
1
&&
j
>
0
&&
j
<
_NY
-
1
)
{
float
flux[_M]
;
...
...
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