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
600e6397
Commit
600e6397
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
fixed typos
parent
d912efd2
No related branches found
No related tags found
No related merge requests found
Pipeline
#57472
passed
1 year ago
Stage: pretest
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/index.md
+3
-3
3 additions, 3 deletions
docs/index.md
with
3 additions
and
3 deletions
docs/index.md
+
3
−
3
View file @
600e6397
...
@@ -23,8 +23,8 @@ Not yet available.
...
@@ -23,8 +23,8 @@ Not yet available.
## Primer
## Primer
With
*pystencils-sfg*
, including your
*pystencils*
-generated kernels with handwritten code becomes straightforward
With
*pystencils-sfg*
, including your
*pystencils*
-generated kernels with handwritten code becomes straightforward
and intuitive. To illustrate, generating a Jacobi smoother for the two-dimensional Poisson equation
,
and intuitive. To illustrate, generating a Jacobi smoother for the two-dimensional Poisson equation
using the awesome
C++23
`std::mdspan`
,
takes just a few lines of code:
and mapping it onto
C++23
`std::mdspan`
s
takes just a few lines of code:
```
python
```
python
import
sympy
as
sp
import
sympy
as
sp
...
@@ -40,7 +40,7 @@ with SourceFileGenerator() as sfg:
...
@@ -40,7 +40,7 @@ with SourceFileGenerator() as sfg:
@kernel
@kernel
def
poisson_jacobi
():
def
poisson_jacobi
():
u_dst
[
0
,
0
]
@=
(
h
**
2
*
f
[
0
,
0
]
*
u_src
[
1
,
0
]
+
u_src
[
-
1
,
0
]
+
u_src
[
0
,
1
]
+
u_src
[
0
,
-
1
])
/
4
u_dst
[
0
,
0
]
@=
(
h
**
2
*
f
[
0
,
0
]
+
u_src
[
1
,
0
]
+
u_src
[
-
1
,
0
]
+
u_src
[
0
,
1
]
+
u_src
[
0
,
-
1
])
/
4
poisson_kernel
=
sfg
.
kernels
.
create
(
poisson_jacobi
)
poisson_kernel
=
sfg
.
kernels
.
create
(
poisson_jacobi
)
...
...
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