Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
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
pycodegen
pystencils-sfg
Commits
a0b5f900
Commit
a0b5f900
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into build_tools
parents
4f032da9
a9598b19
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
tests/cmake_integration/kernels.py
+6
-6
6 additions, 6 deletions
tests/cmake_integration/kernels.py
tests/cmake_integration/more_kernels.py
+6
-6
6 additions, 6 deletions
tests/cmake_integration/more_kernels.py
with
12 additions
and
12 deletions
tests/cmake_integration/kernels.py
+
6
−
6
View file @
a0b5f900
# type: ignore
import
sympy
as
sp
import
numpy
as
np
from
pystencils
.session
import
*
from
pystencils
import
fields
,
kernel
from
pystencilssfg
import
SourceFileGenerator
from
pystencilssfg.source_concepts.cpp
import
std_mdspan
with
SourceFileGenerator
()
as
sfg
:
src
,
dst
=
ps
.
fields
(
"
src, dst(1) : double[2D]
"
)
src
,
dst
=
fields
(
"
src, dst(1) : double[2D]
"
)
h
=
sp
.
Symbol
(
'
h
'
)
@
ps.
kernel
@kernel
def
poisson_jacobi
():
dst
[
0
,
0
]
@=
(
src
[
1
,
0
]
+
src
[
-
1
,
0
]
+
src
[
0
,
1
]
+
src
[
0
,
-
1
])
/
4
dst
[
0
,
0
]
@=
(
src
[
1
,
0
]
+
src
[
-
1
,
0
]
+
src
[
0
,
1
]
+
src
[
0
,
-
1
])
/
4
poisson_kernel
=
sfg
.
kernels
.
create
(
poisson_jacobi
)
...
...
This diff is collapsed.
Click to expand it.
tests/cmake_integration/more_kernels.py
+
6
−
6
View file @
a0b5f900
# type: ignore
import
sympy
as
sp
import
numpy
as
np
from
pystencils
.session
import
*
from
pystencils
import
fields
,
kernel
,
Field
from
pystencilssfg
import
SourceFileGenerator
from
pystencilssfg.source_concepts.cpp
import
std_mdspan
with
SourceFileGenerator
()
as
sfg
:
src
=
ps
.
fields
(
"
src: double[2D]
"
)
src
:
Field
=
fields
(
"
src: double[2D]
"
)
h
=
sp
.
Symbol
(
'
h
'
)
@
ps.
kernel
@kernel
def
poisson_gs
():
src
[
0
,
0
]
@=
(
src
[
1
,
0
]
+
src
[
-
1
,
0
]
+
src
[
0
,
1
]
+
src
[
0
,
-
1
])
/
4
src
[
0
,
0
]
@=
(
src
[
1
,
0
]
+
src
[
-
1
,
0
]
+
src
[
0
,
1
]
+
src
[
0
,
-
1
])
/
4
poisson_kernel
=
sfg
.
kernels
.
create
(
poisson_gs
)
...
...
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