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
cfed3318
Commit
cfed3318
authored
9 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Finish driver.py for now
parent
c44ec24a
No related branches found
Branches containing commit
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/driver.py
+8
-17
8 additions, 17 deletions
python/dune/perftool/driver.py
with
8 additions
and
17 deletions
python/dune/perftool/driver.py
+
8
−
17
View file @
cfed3318
"""
The module that drives the generation of the pdelab driver
"""
"""
The module that provides generating methods for all parts
of the pdelab driver.
Currently, these are hardcoded as strings. It would be possible
to switch these to cgen expression. OTOH, there is not much to be
gained there.
"""
from
dune.perftool.generation
import
dune_include
,
dune_preamble
,
dune_symbol
from
dune.perftool.generation
import
dune_include
,
dune_preamble
,
dune_symbol
...
@@ -302,14 +309,12 @@ def define_gfs(expr, name):
...
@@ -302,14 +309,12 @@ def define_gfs(expr, name):
if
isinstance
(
expr
,
RestrictedElement
):
if
isinstance
(
expr
,
RestrictedElement
):
raise
NotImplementedError
(
"
Dune does not support restricted elements!
"
)
raise
NotImplementedError
(
"
Dune does not support restricted elements!
"
)
@dune_symbol
@dune_symbol
def
name_gfs
(
expr
):
def
name_gfs
(
expr
):
name
=
"
{}_gfs
"
.
format
(
FEM_name_mangling
(
expr
)).
lower
()
name
=
"
{}_gfs
"
.
format
(
FEM_name_mangling
(
expr
)).
lower
()
define_gfs
(
expr
,
name
)
define_gfs
(
expr
,
name
)
return
name
return
name
@dune_preamble
@dune_preamble
def
define_dofestimate
(
name
):
def
define_dofestimate
(
name
):
# Provide a worstcase estimate for the number of entries per row based on the given gridfunction space and cell geometry
# Provide a worstcase estimate for the number of entries per row based on the given gridfunction space and cell geometry
...
@@ -531,17 +536,3 @@ def vtkoutput():
...
@@ -531,17 +536,3 @@ def vtkoutput():
dune_solve
()
dune_solve
()
return
[
"
Dune::PDELab::addSolutionToVTKWriter({}, {}, {});
"
.
format
(
vtkwriter
,
gfs
,
vec
),
return
[
"
Dune::PDELab::addSolutionToVTKWriter({}, {}, {});
"
.
format
(
vtkwriter
,
gfs
,
vec
),
"
{}.write({}, Dune::VTK::appendedraw);
"
.
format
(
vtkwriter
,
vtkfile
)]
"
{}.write({}, Dune::VTK::appendedraw);
"
.
format
(
vtkwriter
,
vtkfile
)]
def
generate_driver
(
formdata
):
# Set the global data:
global
_formdata
_formdata
=
formdata
# This should trigger everything IMO
vtkoutput
()
# Print the results:
from
dune.perftool.generation
import
cache_preambles
for
p
in
sorted
(
cache_preambles
(),
key
=
lambda
x
:
x
[
0
]):
print
p
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