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
b93524e2
Commit
b93524e2
authored
7 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Fixup generation of ordering tags
parent
ab7c277b
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/pdelab/driver/gridfunctionspace.py
+15
-15
15 additions, 15 deletions
python/dune/perftool/pdelab/driver/gridfunctionspace.py
with
15 additions
and
15 deletions
python/dune/perftool/pdelab/driver/gridfunctionspace.py
+
15
−
15
View file @
b93524e2
...
...
@@ -223,31 +223,31 @@ def name_test_gfs():
return
name_gfs
(
element
,
is_dirichlet
)
def
name_gfs
(
element
,
is_dirichlet
,
treepath
=
()):
def
name_gfs
(
element
,
is_dirichlet
,
treepath
=
()
,
root
=
True
):
if
isinstance
(
element
,
(
VectorElement
,
TensorElement
)):
subel
=
element
.
sub_elements
()[
0
]
subgfs
=
name_gfs
(
subel
,
is_dirichlet
[:
subel
.
value_size
()],
treepath
=
treepath
+
(
0
,))
subgfs
=
name_gfs
(
subel
,
is_dirichlet
[:
subel
.
value_size
()],
treepath
=
treepath
+
(
0
,)
,
root
=
False
)
name
=
"
{}_pow{}gfs_{}
"
.
format
(
subgfs
,
element
.
num_sub_elements
(),
"
_
"
.
join
(
str
(
t
)
for
t
in
treepath
))
define_power_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
)
define_power_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
,
root
)
return
name
elif
isinstance
(
element
,
MixedElement
):
k
=
0
subgfs
=
[]
for
i
,
subel
in
enumerate
(
element
.
sub_elements
()):
subgfs
.
append
(
name_gfs
(
subel
,
is_dirichlet
[
k
:
k
+
subel
.
value_size
()],
treepath
=
treepath
+
(
i
,)))
subgfs
.
append
(
name_gfs
(
subel
,
is_dirichlet
[
k
:
k
+
subel
.
value_size
()],
treepath
=
treepath
+
(
i
,)
,
root
=
False
))
k
=
k
+
subel
.
value_size
()
name
=
"
_
"
.
join
(
subgfs
)
name
=
"
{}_{}
"
.
format
(
name
,
"
_
"
.
join
(
str
(
t
)
for
t
in
treepath
))
define_composite_gfs
(
element
,
is_dirichlet
,
name
,
tuple
(
subgfs
))
define_composite_gfs
(
element
,
is_dirichlet
,
name
,
tuple
(
subgfs
)
,
root
)
return
name
else
:
assert
isinstance
(
element
,
(
FiniteElement
,
TensorProductElement
))
name
=
"
{}{}_gfs_{}
"
.
format
(
FEM_name_mangling
(
element
).
lower
(),
"
_dirichlet
"
if
is_dirichlet
[
0
]
else
""
,
"
_
"
.
join
(
str
(
t
)
for
t
in
treepath
))
define_gfs
(
element
,
is_dirichlet
,
name
)
define_gfs
(
element
,
is_dirichlet
,
name
,
root
)
return
name
...
...
@@ -289,8 +289,8 @@ def type_gfs(element, is_dirichlet, root=True):
@preamble
def
define_gfs
(
element
,
is_dirichlet
,
name
):
gfstype
=
type_gfs
(
element
,
is_dirichlet
)
def
define_gfs
(
element
,
is_dirichlet
,
name
,
root
):
gfstype
=
type_gfs
(
element
,
is_dirichlet
,
root
=
root
)
gv
=
name_leafview
()
fem
=
name_fem
(
element
)
return
[
"
{} {}({}, {});
"
.
format
(
gfstype
,
name
,
gv
,
fem
),
...
...
@@ -298,17 +298,17 @@ def define_gfs(element, is_dirichlet, name):
@preamble
def
define_power_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
):
gv
=
name_leafview
()
fem
=
name_fem
(
element
.
sub_elements
()[
0
])
gfstype
=
type_gfs
(
element
,
is_dirichlet
)
return
[
"
{} {}(
{},
{});
"
.
format
(
gfstype
,
name
,
gv
,
fem
),
def
define_power_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
,
root
):
#
gv = name_leafview()
#
fem = name_fem(element.sub_elements()[0])
gfstype
=
type_gfs
(
element
,
is_dirichlet
,
root
=
root
)
return
[
"
{} {}({});
"
.
format
(
gfstype
,
name
,
subgfs
),
"
{}.name(
\"
{}
\"
);
"
.
format
(
name
,
name
)]
@preamble
def
define_composite_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
):
gfstype
=
type_gfs
(
element
,
is_dirichlet
)
def
define_composite_gfs
(
element
,
is_dirichlet
,
name
,
subgfs
,
root
):
gfstype
=
type_gfs
(
element
,
is_dirichlet
,
root
=
root
)
return
[
"
{} {}({});
"
.
format
(
gfstype
,
name
,
"
,
"
.
join
(
subgfs
)),
"
{}.update();
"
.
format
(
name
)]
...
...
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