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
Sebastian Bindgen
pystencils
Commits
f4abda02
Commit
f4abda02
authored
5 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
Fix in boundary handling - check for GPU_LIKE_TARGETS
parent
050107e0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/boundaries/boundaryhandling.py
+9
-6
9 additions, 6 deletions
pystencils/boundaries/boundaryhandling.py
with
9 additions
and
6 deletions
pystencils/boundaries/boundaryhandling.py
+
9
−
6
View file @
f4abda02
...
...
@@ -105,7 +105,8 @@ class BoundaryHandling:
class_
=
self
.
IndexFieldBlockData
class_
.
to_cpu
=
to_cpu
class_
.
to_gpu
=
to_gpu
data_handling
.
add_custom_class
(
self
.
_index_array_name
,
class_
)
gpu
=
self
.
_target
in
data_handling
.
_GPU_LIKE_TARGETS
data_handling
.
add_custom_class
(
self
.
_index_array_name
,
class_
,
cpu
=
True
,
gpu
=
gpu
)
@property
def
data_handling
(
self
):
...
...
@@ -253,11 +254,13 @@ class BoundaryHandling:
"""
Writes a VTK field where each cell with the given boundary is marked with 1, other cells are 0
This can be used to display the simulation geometry in Paraview
:param file_name: vtk filename
:param boundaries: boundary object, or special string
'
domain
'
for domain cells or special string
'
all
'
for all
boundary conditions.
can also be a sequence, to write multiple boundaries to VTK file
:param ghost_layers: number of ghost layers to write, or True for all, False for none
Params:
file_name: vtk filename
boundaries: boundary object, or special string
'
domain
'
for domain cells or special string
'
all
'
for all
boundary conditions.
can also be a sequence, to write multiple boundaries to VTK file
ghost_layers: number of ghost layers to write, or True for all, False for none
"""
if
boundaries
==
'
all
'
:
boundaries
=
list
(
self
.
_boundary_object_to_boundary_info
.
keys
())
+
[
'
domain
'
]
...
...
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