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
70cc6a68
Commit
70cc6a68
authored
8 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
Copy coefficients to input buffer
parent
c722dffb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/perftool/pdelab/argument.py
+1
-1
1 addition, 1 deletion
python/dune/perftool/pdelab/argument.py
python/dune/perftool/sumfact/sumfact.py
+16
-4
16 additions, 4 deletions
python/dune/perftool/sumfact/sumfact.py
with
17 additions
and
5 deletions
python/dune/perftool/pdelab/argument.py
+
1
−
1
View file @
70cc6a68
...
...
@@ -103,7 +103,7 @@ def name_trialfunction_gradient(element, restriction, component):
# anything.
if
get_option
(
"
sumfact
"
)
and
restriction
==
Restriction
.
NONE
:
from
dune.perftool.sumfact
import
start_sumfactorization
start_sumfactorization
()
start_sumfactorization
(
element
,
container
,
restriction
,
component
)
evaluate_coefficient_gradient
(
element
,
name
,
container
,
restriction
,
component
)
return
name
...
...
This diff is collapsed.
Click to expand it.
python/dune/perftool/sumfact/sumfact.py
+
16
−
4
View file @
70cc6a68
from
dune.perftool.pdelab.argument
import
pymbolic_coefficient
from
dune.perftool.generation
import
(
domain
,
get_counter
,
iname
,
...
...
@@ -8,6 +9,7 @@ from dune.perftool.loopy.buffer import (get_buffer_temporary,
initialize_buffer
,
switch_base_storage
,
)
from
dune.perftool.pdelab.spaces
import
name_lfs
from
pymbolic.primitives
import
(
Product
,
Subscript
,
Variable
,
...
...
@@ -32,7 +34,7 @@ def sumfact_iname(bound, _type):
# TODO this code is WIP and mainly used for experiments.
def
start_sumfactorization
():
def
start_sumfactorization
(
element
,
container
,
restriction
,
component
):
from
dune.perftool.sumfact.amatrix
import
(
AMatrix
,
quadrature_points_per_direction
,
basis_functions_per_direction
,
...
...
@@ -50,12 +52,22 @@ def start_sumfactorization():
num
=
2
)
shape
=
(
a_matrices
[
0
].
n
,
product
(
mat
.
n
for
mat
in
a_matrices
[
1
:]))
number_basis
=
product
(
mat
.
n
for
mat
in
a_matrices
)
shape
=
(
n
,)
inp
=
get_buffer_temporary
(
"
buffer
"
,
shape
=
shape
,
dim_tags
=
"
f,f
"
)
shape
=
shape
)
silenced_warning
(
'
read_no_write({})
'
.
format
(
inp
))
# Write initial coefficients into buffer
basisiname
=
sumfact_iname
(
number_basis
,
"
basis
"
)
lfs
=
name_lfs
(
element
,
restriction
,
component
)
coeff
=
pymbolic_coefficient
(
container
,
lfs
,
basisiname
)
assignee
=
Subscript
(
Variable
(
inp
),
(
Variable
(
basisiname
),))
instruction
(
assignee
=
assignee
,
expression
=
coeff
,
)
return
sum_factorization_kernel
(
a_matrices
,
inp
,
"
buffer
"
)
...
...
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