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
be233e54
Commit
be233e54
authored
9 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Put the code for numerical jacobian into a separate function
parent
da6a28f1
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/pdelab/localoperator.py
+10
-4
10 additions, 4 deletions
python/dune/perftool/pdelab/localoperator.py
with
10 additions
and
4 deletions
python/dune/perftool/pdelab/localoperator.py
+
10
−
4
View file @
be233e54
...
...
@@ -25,17 +25,21 @@ def measure_specific_details(measure):
# The return dictionary that this memoized method will grant direct access to.
ret
=
{}
if
measure
==
"
cell
"
:
base_class
(
'
Dune::PDELab::FullVolumePattern
'
)
def
numerical_jacobian
(
which
):
if
get_option
(
"
numerical_jacobian
"
):
# Add a base class
from
dune.perftool.pdelab.driver
import
type_localoperator
loptype
=
type_localoperator
()
base_class
(
"
Dune::PDELab::NumericalJacobian
Volume
<{}>
"
.
format
(
loptype
))
base_class
(
"
Dune::PDELab::NumericalJacobian
{}
<{}>
"
.
format
(
which
,
loptype
))
# Add the initializer list for that base class
ini
=
name_initree_constructor
()
initializer_list
(
"
Dune::PDELab::NumericalJacobianVolume<{}>({}.get(
\"
numerical_epsilon.volume
\"
, 1e-9))
"
.
format
(
loptype
,
ini
))
initializer_list
(
"
Dune::PDELab::NumericalJacobian{}<{}>({}.get(
\"
numerical_epsilon.{}
\"
, 1e-9))
"
.
format
(
which
,
loptype
,
ini
,
which
.
lower
()))
if
measure
==
"
cell
"
:
base_class
(
'
Dune::PDELab::FullVolumePattern
'
)
numerical_jacobian
(
"
Volume
"
)
ret
[
"
residual_signature
"
]
=
[
'
template<typename EG, typename LFSV0, typename X, typename LFSV1, typename R>
'
,
'
void alpha_volume(const EG& eg, const LFSV0& lfsv0, const X& x, const LFSV1& lfsv1, R& r) const
'
]
...
...
@@ -44,6 +48,7 @@ def measure_specific_details(measure):
if
measure
==
"
exterior_facet
"
:
base_class
(
'
Dune::PDELab::FullBoundaryPattern
'
)
numerical_jacobian
(
"
Boundary
"
)
ret
[
"
residual_signature
"
]
=
[
'
template<typename IG, typename LFSV0, typename X, typename LFSV1, typename R>
'
,
'
void alpha_boundary(const IG& ig, const LFSV0& lfsv0, const X& x, const LFSV1& lfsv1, R& r) const
'
]
...
...
@@ -52,6 +57,7 @@ def measure_specific_details(measure):
if
measure
==
"
interior_facet
"
:
base_class
(
'
Dune::PDELab::FullSkeletonPattern
'
)
numerical_jacobian
(
"
Skeleton
"
)
ret
[
"
residual_signature
"
]
=
[
'
template<typename IG, typename LFSV0_S, typename X, typename LFSV1_S, typename LFSV0_N, typename R, typename LFSV1_N>
'
,
'
void alpha_skeleton(const IG& ig, const LFSV0_S& lfsv0_s, const X& x_s, const LFSV1_S& lfsv1_s, const LFSV0_N& lfsv0_n, const X& x_n, const LFSV1_N& lfsv1_n, R& r_s, R& r_n) const
'
]
...
...
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