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
Tom Harke
pystencils
Commits
bcc92b60
Commit
bcc92b60
authored
Apr 09, 2018
by
Martin Bauer
Browse files
Added data handling tests for VTK output and reduction
parent
20897779
Changes
2
Hide whitespace changes
Inline
Side-by-side
datahandling/serial_datahandling.py
View file @
bcc92b60
...
...
@@ -318,7 +318,7 @@ class SerialDataHandling(DataHandling):
for
name
in
data_names
:
field
=
self
.
_get_field_with_given_number_of_ghost_layers
(
name
,
ghost_layers
)
if
self
.
dim
==
2
:
cell_data
[
name
]
=
field
[:,
:,
np
.
newaxis
]
field
=
field
[:,
:,
np
.
newaxis
]
if
len
(
field
.
shape
)
==
3
:
cell_data
[
name
]
=
np
.
ascontiguousarray
(
field
)
elif
len
(
field
.
shape
)
==
4
:
...
...
@@ -344,7 +344,7 @@ class SerialDataHandling(DataHandling):
field
=
self
.
_get_field_with_given_number_of_ghost_layers
(
data_name
,
ghost_layers
)
if
self
.
dim
==
2
:
field
=
field
[:,
:,
np
.
newaxis
]
cell_data
=
{
name
:
np
.
ascontiguousarray
(
np
.
bitwise_and
(
field
,
mask
)
>
0
,
dtype
=
np
.
uint8
)
cell_data
=
{
name
:
np
.
ascontiguousarray
(
np
.
bitwise_and
(
field
,
field
.
dtype
.
type
(
mask
)
)
>
0
,
dtype
=
np
.
uint8
)
for
mask
,
name
in
masks_to_name
.
items
()}
image_to_vtk
(
full_file_name
,
cell_data
=
cell_data
)
...
...
transformations/transformations.py
View file @
bcc92b60
from
collections
import
defaultdict
,
OrderedDict
from
operator
import
attrgetter
from
copy
import
deepcopy
import
functools
import
sympy
as
sp
from
sympy.logic.boolalg
import
Boolean
...
...
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