Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Bindgen
pystencils
Commits
74a13c20
Commit
74a13c20
authored
Dec 07, 2020
by
Michael Kuron
Browse files
Merge branch 'FIX_Boundary_kwargs' into 'master'
Fixed duplicated kwargs in boundaryhandling See merge request
!193
parents
2c25776f
bf2786b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
74a13c20
...
@@ -14,3 +14,4 @@ _local_tmp
...
@@ -14,3 +14,4 @@ _local_tmp
RELEASE-VERSION
RELEASE-VERSION
test-report
test-report
pystencils/boundaries/createindexlistcython.c
pystencils/boundaries/createindexlistcython.c
pystencils/boundaries/createindexlistcython.*.so
pystencils/boundaries/boundaryhandling.py
View file @
74a13c20
...
@@ -312,7 +312,7 @@ class BoundaryHandling:
...
@@ -312,7 +312,7 @@ class BoundaryHandling:
def
_create_boundary_kernel
(
self
,
symbolic_field
,
symbolic_index_field
,
boundary_obj
):
def
_create_boundary_kernel
(
self
,
symbolic_field
,
symbolic_index_field
,
boundary_obj
):
return
create_boundary_kernel
(
symbolic_field
,
symbolic_index_field
,
self
.
stencil
,
boundary_obj
,
return
create_boundary_kernel
(
symbolic_field
,
symbolic_index_field
,
self
.
stencil
,
boundary_obj
,
target
=
self
.
_target
,
openmp
=
self
.
_openmp
)
target
=
self
.
_target
,
cpu_
openmp
=
self
.
_openmp
)
def
_create_index_fields
(
self
):
def
_create_index_fields
(
self
):
dh
=
self
.
_data_handling
dh
=
self
.
_data_handling
...
@@ -442,11 +442,10 @@ class BoundaryOffsetInfo(CustomCodeNode):
...
@@ -442,11 +442,10 @@ class BoundaryOffsetInfo(CustomCodeNode):
INV_DIR_SYMBOL
=
TypedSymbol
(
"invdir"
,
"int"
)
INV_DIR_SYMBOL
=
TypedSymbol
(
"invdir"
,
"int"
)
def
create_boundary_kernel
(
field
,
index_field
,
stencil
,
boundary_functor
,
target
=
'cpu'
,
openmp
=
True
,
def
create_boundary_kernel
(
field
,
index_field
,
stencil
,
boundary_functor
,
target
=
'cpu'
,
**
kernel_creation_args
):
**
kernel_creation_args
):
elements
=
[
BoundaryOffsetInfo
(
stencil
)]
elements
=
[
BoundaryOffsetInfo
(
stencil
)]
index_arr_dtype
=
index_field
.
dtype
.
numpy_dtype
index_arr_dtype
=
index_field
.
dtype
.
numpy_dtype
dir_symbol
=
TypedSymbol
(
"dir"
,
index_arr_dtype
.
fields
[
'dir'
][
0
])
dir_symbol
=
TypedSymbol
(
"dir"
,
index_arr_dtype
.
fields
[
'dir'
][
0
])
elements
+=
[
Assignment
(
dir_symbol
,
index_field
[
0
](
'dir'
))]
elements
+=
[
Assignment
(
dir_symbol
,
index_field
[
0
](
'dir'
))]
elements
+=
boundary_functor
(
field
,
direction_symbol
=
dir_symbol
,
index_field
=
index_field
)
elements
+=
boundary_functor
(
field
,
direction_symbol
=
dir_symbol
,
index_field
=
index_field
)
return
create_indexed_kernel
(
elements
,
[
index_field
],
target
=
target
,
cpu_openmp
=
openmp
,
**
kernel_creation_args
)
return
create_indexed_kernel
(
elements
,
[
index_field
],
target
=
target
,
**
kernel_creation_args
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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