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
fd3fe07c
Commit
fd3fe07c
authored
6 years ago
by
Marcel Koch
Committed by
Dominic Kempf
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use mixin to get quadrature inames
parent
19588ec7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/codegen/blockstructured/geometry.py
+4
-4
4 additions, 4 deletions
python/dune/codegen/blockstructured/geometry.py
python/dune/codegen/blockstructured/quadrature.py
+6
-2
6 additions, 2 deletions
python/dune/codegen/blockstructured/quadrature.py
with
10 additions
and
6 deletions
python/dune/codegen/blockstructured/geometry.py
+
4
−
4
View file @
fd3fe07c
...
...
@@ -307,7 +307,7 @@ def name_jacobian_inverse_transposed(restriction):
# translate a point in the micro element into macro coordinates
def
define_point_in_macro
(
name
,
point_in_micro
):
def
define_point_in_macro
(
name
,
point_in_micro
,
visitor
):
dim
=
local_dimension
()
if
get_form_option
(
'
vectorization_blockstructured
'
):
temporary_variable
(
name
,
shape
=
(
dim
,),
managed
=
True
)
...
...
@@ -327,17 +327,17 @@ def define_point_in_macro(name, point_in_micro):
# TODO relax within inames
instruction
(
assignee
=
prim
.
Subscript
(
prim
.
Variable
(
name
),
(
i
,)),
expression
=
expr
,
within_inames
=
frozenset
(
subelem_inames
+
get_backend
(
interface
=
"
quad
_inames
"
)
()),
within_inames
=
frozenset
(
subelem_inames
+
visitor
.
quadrature
_inames
()),
tags
=
frozenset
({
subelem_inames
[
i
]})
)
# TODO add subelem inames if this function gets called
# TODO change input parameter to string
def
name_point_in_macro
(
point_in_micro
):
def
name_point_in_macro
(
point_in_micro
,
visitor
):
assert
isinstance
(
point_in_micro
,
prim
.
Expression
)
name
=
get_pymbolic_basename
(
point_in_micro
)
+
"
_macro
"
define_point_in_macro
(
name
,
point_in_micro
)
define_point_in_macro
(
name
,
point_in_micro
,
visitor
)
return
name
...
...
This diff is collapsed.
Click to expand it.
python/dune/codegen/blockstructured/quadrature.py
+
6
−
2
View file @
fd3fe07c
...
...
@@ -8,9 +8,13 @@ import pymbolic.primitives as prim
@quadrature_mixin
(
"
blockstructured
"
)
class
BlockstructuredQuadratureMixin
(
GenericQuadratureMixin
):
def
quadrature_position
(
self
):
def
quadrature_position
(
self
,
index
=
None
):
original
=
GenericQuadratureMixin
.
quadrature_position
(
self
)
return
prim
.
Variable
(
name_point_in_macro
(
original
))
qp
=
prim
.
Variable
(
name_point_in_macro
(
original
,
self
),
)
if
index
is
not
None
:
return
prim
.
Subscript
(
qp
,
(
index
,))
else
:
return
qp
#
# @backend(interface="quad_pos", name='blockstructured')
...
...
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