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
8aa4fe9f
Commit
8aa4fe9f
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Allow functions for Field.coordinate_transform
parent
e512cf88
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/field.py
+6
-2
6 additions, 2 deletions
pystencils/field.py
with
6 additions
and
2 deletions
pystencils/field.py
+
6
−
2
View file @
8aa4fe9f
...
@@ -15,7 +15,8 @@ import pystencils
...
@@ -15,7 +15,8 @@ import pystencils
from
pystencils.alignedarray
import
aligned_empty
from
pystencils.alignedarray
import
aligned_empty
from
pystencils.data_types
import
StructType
,
TypedSymbol
,
create_type
from
pystencils.data_types
import
StructType
,
TypedSymbol
,
create_type
from
pystencils.kernelparameters
import
FieldShapeSymbol
,
FieldStrideSymbol
from
pystencils.kernelparameters
import
FieldShapeSymbol
,
FieldStrideSymbol
from
pystencils.stencil
import
direction_string_to_offset
,
offset_to_direction_string
,
inverse_direction
from
pystencils.stencil
import
(
direction_string_to_offset
,
inverse_direction
,
offset_to_direction_string
)
from
pystencils.sympyextensions
import
is_integer_sequence
from
pystencils.sympyextensions
import
is_integer_sequence
__all__
=
[
'
Field
'
,
'
fields
'
,
'
FieldType
'
,
'
AbstractField
'
]
__all__
=
[
'
Field
'
,
'
fields
'
,
'
FieldType
'
,
'
AbstractField
'
]
...
@@ -613,7 +614,10 @@ class Field(AbstractField):
...
@@ -613,7 +614,10 @@ class Field(AbstractField):
@property
@property
def
physical_coordinates
(
self
):
def
physical_coordinates
(
self
):
return
self
.
coordinate_transform
@
(
self
.
coordinate_origin
+
pystencils
.
x_vector
(
self
.
spatial_dimensions
))
if
hasattr
(
self
.
coordinate_transform
,
'
__call__
'
):
return
self
.
coordinate_transform
(
self
.
coordinate_origin
+
pystencils
.
x_vector
(
self
.
spatial_dimensions
))
else
:
return
self
.
coordinate_transform
@
(
self
.
coordinate_origin
+
pystencils
.
x_vector
(
self
.
spatial_dimensions
))
@property
@property
def
physical_coordinates_staggered
(
self
):
def
physical_coordinates_staggered
(
self
):
...
...
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