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
884f5579
Commit
884f5579
authored
6 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Add missing include and AD support
parent
59afe332
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/preprocess.py
+5
-0
5 additions, 0 deletions
python/dune/perftool/ufl/preprocess.py
with
5 additions
and
0 deletions
python/dune/perftool/ufl/preprocess.py
+
5
−
0
View file @
884f5579
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
import
ufl.classes
as
uc
import
ufl.classes
as
uc
import
ufl.algorithms.apply_function_pullbacks
as
afp
import
ufl.algorithms.apply_function_pullbacks
as
afp
import
ufl.algorithms.apply_algebra_lowering
as
aal
import
ufl.algorithms.apply_algebra_lowering
as
aal
import
ufl.algorithms.apply_derivatives
as
ad
from
dune.perftool.options
import
get_form_option
from
pytools
import
memoize
from
pytools
import
memoize
...
@@ -60,4 +63,6 @@ def apply_default_transformations(form):
...
@@ -60,4 +63,6 @@ def apply_default_transformations(form):
# Monkey patch UFL, such that we invert matrices in C++ instead of Python.
# Monkey patch UFL, such that we invert matrices in C++ instead of Python.
# The latter only works for very small matrices. If this causes a problem at
# The latter only works for very small matrices. If this causes a problem at
# some point, we should guard this monkey patch with an option.
# some point, we should guard this monkey patch with an option.
aal
.
LowerCompoundAlgebra
.
inverse
=
lambda
s
,
o
,
A
:
s
.
reuse_if_untouched
(
o
,
A
)
aal
.
LowerCompoundAlgebra
.
inverse
=
lambda
s
,
o
,
A
:
s
.
reuse_if_untouched
(
o
,
A
)
ad
.
GenericDerivativeRuleset
.
inverse
=
lambda
s
,
o
,
A
:
-
uc
.
Dot
(
uc
.
Dot
(
o
,
A
),
o
)
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