Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Alt
pystencils
Commits
ea943334
Commit
ea943334
authored
3 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Fix flake8
parent
1386091a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pystencils/boundaries/createindexlist.py
+4
-4
4 additions, 4 deletions
pystencils/boundaries/createindexlist.py
pystencils/cpu/kernelcreation.py
+1
-2
1 addition, 2 deletions
pystencils/cpu/kernelcreation.py
with
5 additions
and
6 deletions
pystencils/boundaries/createindexlist.py
+
4
−
4
View file @
ea943334
...
@@ -46,8 +46,8 @@ def _create_index_list_python(flag_field_arr, boundary_mask,
...
@@ -46,8 +46,8 @@ def _create_index_list_python(flag_field_arr, boundary_mask,
nr_of_ghost_layers
=
0
nr_of_ghost_layers
=
0
coordinate_names
=
boundary_index_array_coordinate_names
[:
len
(
flag_field_arr
.
shape
)]
coordinate_names
=
boundary_index_array_coordinate_names
[:
len
(
flag_field_arr
.
shape
)]
index_arr_dtype
=
np
.
dtype
([(
name
,
default_index_array_dtype
)
for
name
in
coordinate_names
]
+
index_arr_dtype
=
np
.
dtype
([(
name
,
default_index_array_dtype
)
for
name
in
coordinate_names
]
[(
direction_member_name
,
default_index_array_dtype
)])
+
[(
direction_member_name
,
default_index_array_dtype
)])
# boundary cells are extracted via np.where. To ensure continous memory access in the compute kernel these cells
# boundary cells are extracted via np.where. To ensure continous memory access in the compute kernel these cells
# have to be sorted.
# have to be sorted.
...
@@ -119,8 +119,8 @@ def create_boundary_index_list(flag_field, stencil, boundary_mask, fluid_mask,
...
@@ -119,8 +119,8 @@ def create_boundary_index_list(flag_field, stencil, boundary_mask, fluid_mask,
"""
"""
dim
=
len
(
flag_field
.
shape
)
dim
=
len
(
flag_field
.
shape
)
coordinate_names
=
boundary_index_array_coordinate_names
[:
dim
]
coordinate_names
=
boundary_index_array_coordinate_names
[:
dim
]
index_arr_dtype
=
np
.
dtype
([(
name
,
default_index_array_dtype
)
for
name
in
coordinate_names
]
+
index_arr_dtype
=
np
.
dtype
([(
name
,
default_index_array_dtype
)
for
name
in
coordinate_names
]
[(
direction_member_name
,
default_index_array_dtype
)])
+
[(
direction_member_name
,
default_index_array_dtype
)])
stencil
=
np
.
array
(
stencil
,
dtype
=
default_index_array_dtype
)
stencil
=
np
.
array
(
stencil
,
dtype
=
default_index_array_dtype
)
args
=
(
flag_field
,
nr_of_ghost_layers
,
boundary_mask
,
fluid_mask
,
stencil
,
single_link
)
args
=
(
flag_field
,
nr_of_ghost_layers
,
boundary_mask
,
fluid_mask
,
stencil
,
single_link
)
...
...
This diff is collapsed.
Click to expand it.
pystencils/cpu/kernelcreation.py
+
1
−
2
View file @
ea943334
from
typing
import
Union
from
typing
import
Union
import
sympy
as
sp
import
sympy
as
sp
import
numpy
as
np
import
pystencils.astnodes
as
ast
import
pystencils.astnodes
as
ast
from
pystencils.simp.assignment_collection
import
AssignmentCollection
from
pystencils.simp.assignment_collection
import
AssignmentCollection
...
@@ -9,7 +8,7 @@ from pystencils.config import CreateKernelConfig
...
@@ -9,7 +8,7 @@ from pystencils.config import CreateKernelConfig
from
pystencils.enums
import
Target
,
Backend
from
pystencils.enums
import
Target
,
Backend
from
pystencils.astnodes
import
Block
,
KernelFunction
,
LoopOverCoordinate
,
SympyAssignment
from
pystencils.astnodes
import
Block
,
KernelFunction
,
LoopOverCoordinate
,
SympyAssignment
from
pystencils.cpu.cpujit
import
make_python_function
from
pystencils.cpu.cpujit
import
make_python_function
from
pystencils.typing
import
StructType
,
TypedSymbol
,
create_type
,
get_type_of_expression
from
pystencils.typing
import
StructType
,
TypedSymbol
,
create_type
from
pystencils.typing.transformations
import
add_types
from
pystencils.typing.transformations
import
add_types
from
pystencils.field
import
Field
,
FieldType
from
pystencils.field
import
Field
,
FieldType
from
pystencils.node_collection
import
NodeCollection
from
pystencils.node_collection
import
NodeCollection
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment