Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pySDC
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
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atml-ati
pySDC
Commits
7a63ca2c
Commit
7a63ca2c
authored
9 months ago
by
Thomas Baumann
Browse files
Options
Downloads
Patches
Plain Diff
Fixed GPU compatibility of polynomial test problem
parent
46b6d2b3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pySDC/implementations/problem_classes/polynomial_test_problem.py
+5
-5
5 additions, 5 deletions
...mplementations/problem_classes/polynomial_test_problem.py
with
5 additions
and
5 deletions
pySDC/implementations/problem_classes/polynomial_test_problem.py
+
5
−
5
View file @
7a63ca2c
...
...
@@ -28,8 +28,8 @@ class polynomial_testequation(Problem):
# invoke super init, passing number of dofs, dtype_u and dtype_f
super
().
__init__
(
init
=
(
1
,
None
,
np
.
dtype
(
'
float64
'
)))
self
.
rng
=
self
.
x
p
.
random
.
RandomState
(
seed
=
seed
)
self
.
poly
=
self
.
x
p
.
polynomial
.
Polynomial
(
self
.
rng
.
rand
(
degree
))
self
.
rng
=
n
p
.
random
.
RandomState
(
seed
=
seed
)
self
.
poly
=
n
p
.
polynomial
.
Polynomial
(
self
.
rng
.
rand
(
degree
))
self
.
_makeAttributeAndRegister
(
'
degree
'
,
'
seed
'
,
localVars
=
locals
(),
readOnly
=
True
)
def
eval_f
(
self
,
u
,
t
):
...
...
@@ -50,7 +50,7 @@ class polynomial_testequation(Problem):
"""
f
=
self
.
dtype_f
(
self
.
init
)
f
[:]
=
self
.
poly
.
deriv
(
m
=
1
)(
t
)
f
[:]
=
self
.
xp
.
array
(
self
.
poly
.
deriv
(
m
=
1
)(
t
)
)
return
f
def
solve_system
(
self
,
rhs
,
factor
,
u0
,
t
):
...
...
@@ -95,7 +95,7 @@ class polynomial_testequation(Problem):
The exact solution.
"""
me
=
self
.
dtype_u
(
self
.
init
)
me
[:]
=
self
.
poly
(
t
)
me
[:]
=
self
.
xp
.
array
(
self
.
poly
(
t
)
)
return
me
...
...
@@ -125,7 +125,7 @@ class polynomial_testequation_IMEX(polynomial_testequation):
"""
f
=
self
.
dtype_f
(
self
.
init
)
derivative
=
self
.
poly
.
deriv
(
m
=
1
)(
t
)
derivative
=
self
.
xp
.
array
(
self
.
poly
.
deriv
(
m
=
1
)(
t
)
)
f
.
impl
[:]
=
derivative
/
2
f
.
expl
[:]
=
derivative
/
2
return
f
This diff is collapsed.
Click to expand it.
Robert Speck
@speck1
mentioned in commit
d71c66e3
·
9 months ago
mentioned in commit
d71c66e3
mentioned in commit d71c66e308b9d5c3add428051bb9695a4842dcca
Toggle commit list
Robert Speck
@speck1
mentioned in commit
2825857e
·
9 months ago
mentioned in commit
2825857e
mentioned in commit 2825857eefd0014caaba260c78c1a4d33d8a2a2c
Toggle commit list
Robert Speck
@speck1
mentioned in commit
0add2776
·
9 months ago
mentioned in commit
0add2776
mentioned in commit 0add2776aad7ee07405803d6f170fe4e8f43af37
Toggle commit list
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