Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
de39c4d2
Commit
de39c4d2
authored
7 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
Reserve count 2 for time variable
parent
005d3848
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
python/dune/perftool/ufl/execution.py
+7
-5
7 additions, 5 deletions
python/dune/perftool/ufl/execution.py
with
7 additions
and
5 deletions
python/dune/perftool/ufl/execution.py
+
7
−
5
View file @
de39c4d2
...
...
@@ -12,7 +12,7 @@ from ufl import *
class
TrialFunction
(
ufl
.
Coefficient
):
"""
A coefficient that always takes the reserved index 0
"""
def
__init__
(
self
,
element
,
count
=
None
):
if
count
and
count
is
not
0
:
if
count
is
not
None
and
count
!=
0
:
raise
PerftoolUFLError
(
"
The trial function must be the coefficient of index 0 in uflpdelab
"
)
ufl
.
Coefficient
.
__init__
(
self
,
element
,
count
=
0
)
...
...
@@ -20,12 +20,14 @@ class TrialFunction(ufl.Coefficient):
class
Coefficient
(
ufl
.
Coefficient
):
"""
A coefficient that honors the reserved index 0.
"""
def
__init__
(
self
,
element
,
count
=
None
):
if
count
and
count
is
0
:
if
count
==
0
:
raise
PerftoolUFLError
(
"
The coefficient of index 0 is reserved for the trial function in uflpdelab
"
)
if
count
and
count
is
1
:
if
count
==
1
:
raise
PerftoolUFLError
(
"
The coefficient of index 1 is reserved for the jacobian apply vector in uflpdelab
"
)
if
not
count
and
ufl
.
Coefficient
.
_globalcount
<
2
:
count
=
2
if
count
==
2
:
raise
PerftoolUFLError
(
"
The coefficient of index 2 is reserved for the time variable in uflpdelab
"
)
if
count
is
None
and
ufl
.
Coefficient
.
_globalcount
<
3
:
count
=
3
ufl
.
Coefficient
.
__init__
(
self
,
element
,
count
)
...
...
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