Skip to content
Snippets Groups Projects
Commit a4082aa6 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Equidistant PDELab geometrys and test adaption

parent b5b85e7d
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 7 deletions
...@@ -235,13 +235,16 @@ class AxiparallelGeometryMixin(GenericPDELabGeometryMixin): ...@@ -235,13 +235,16 @@ class AxiparallelGeometryMixin(GenericPDELabGeometryMixin):
# embedded into higher dimensional world space. # embedded into higher dimensional world space.
return self.jacobian_determinant(o) return self.jacobian_determinant(o)
@preamble
def define_facet_jacobian_determinant(self, name): def define_facet_jacobian_determinant(self, name):
valuearg(name)
self._define_facet_jacobian_determinant(name)
@preamble
def _define_facet_jacobian_determinant(self, name):
# NB: In the equidistant case, this might be optimized to store *d* values on the operator level # NB: In the equidistant case, this might be optimized to store *d* values on the operator level
# We don't do that right now for laziness. # We don't do that right now for laziness.
geo = name_geometry() geo = name_geometry()
pos = name_localcenter() pos = name_localcenter()
valuearg(name)
return "auto {} = {}.integrationElement({});".format(name, return "auto {} = {}.integrationElement({});".format(name,
geo, geo,
...@@ -251,16 +254,18 @@ class AxiparallelGeometryMixin(GenericPDELabGeometryMixin): ...@@ -251,16 +254,18 @@ class AxiparallelGeometryMixin(GenericPDELabGeometryMixin):
@geometry_mixin("equidistant") @geometry_mixin("equidistant")
class EquidistantGeometryMixin(AxiparallelGeometryMixin): class EquidistantGeometryMixin(AxiparallelGeometryMixin):
@class_member(classtag="operator")
def define_jacobian_determinant(self, name): def define_jacobian_determinant(self, name):
valuearg(name) valuearg(name)
self._define_jacobian_determinant_eval(name) self._define_jacobian_determinant(name)
@class_member(classtag="operator")
def _define_jacobian_determinant(self, name):
from dune.codegen.pdelab.localoperator import lop_template_ansatz_gfs from dune.codegen.pdelab.localoperator import lop_template_ansatz_gfs
gfst = lop_template_ansatz_gfs() gfst = lop_template_ansatz_gfs()
return "typename {}::Traits::GridView::template Codim<0>::Geometry::ctype {};".format(gfst, name) return "typename {}::Traits::GridView::template Codim<0>::Geometry::ctype {};".format(gfst, name)
@preamble(kernel="operator") @preamble(kernel="operator")
def _define_jacobian_determinant_eval(name): def _define_jacobian_determinant_eval(self, name):
from dune.codegen.pdelab.localoperator import name_ansatz_gfs_constructor_param, lop_template_range_field from dune.codegen.pdelab.localoperator import name_ansatz_gfs_constructor_param, lop_template_range_field
gfs = name_ansatz_gfs_constructor_param() gfs = name_ansatz_gfs_constructor_param()
rft = lop_template_range_field() rft = lop_template_range_field()
...@@ -276,7 +281,7 @@ class EquidistantGeometryMixin(AxiparallelGeometryMixin): ...@@ -276,7 +281,7 @@ class EquidistantGeometryMixin(AxiparallelGeometryMixin):
return "typename {}::Traits::GridView::template Codim<0>::Geometry::JacobianInverseTransposed {};".format(gfst, name) return "typename {}::Traits::GridView::template Codim<0>::Geometry::JacobianInverseTransposed {};".format(gfst, name)
@preamble(kernel="operator") @preamble(kernel="operator")
def _define_jacobian_inverse_transposed_eval(name): def _define_jacobian_inverse_transposed_eval(self, name):
from dune.codegen.pdelab.localoperator import name_ansatz_gfs_constructor_param, lop_template_range_field from dune.codegen.pdelab.localoperator import name_ansatz_gfs_constructor_param, lop_template_range_field
gfs = name_ansatz_gfs_constructor_param() gfs = name_ansatz_gfs_constructor_param()
rft = lop_template_range_field() rft = lop_template_range_field()
......
...@@ -15,6 +15,7 @@ extension = vtu ...@@ -15,6 +15,7 @@ extension = vtu
[formcompiler] [formcompiler]
explicit_time_stepping = 1 explicit_time_stepping = 1
operators = mass, r operators = mass, r
geometry_mixins = equidistant
[formcompiler.mass] [formcompiler.mass]
numerical_jacobian = 1 numerical_jacobian = 1
......
...@@ -23,6 +23,7 @@ l2error_tree_path = 1, 1, 0 ...@@ -23,6 +23,7 @@ l2error_tree_path = 1, 1, 0
explicit_time_stepping = 0 explicit_time_stepping = 0
yaspgrid_offset = 1 yaspgrid_offset = 1
overlapping = 1 overlapping = 1
geometry_mixins = equidistant
[formcompiler.mass] [formcompiler.mass]
numerical_jacobian = 0, 1 | expand num numerical_jacobian = 0, 1 | expand num
......
...@@ -18,6 +18,7 @@ compare_l2errorsquared = 5e-4 ...@@ -18,6 +18,7 @@ compare_l2errorsquared = 5e-4
# Only calculate error for the velocity part # Only calculate error for the velocity part
l2error_tree_path = 1, 1, 1, 0 l2error_tree_path = 1, 1, 1, 0
operators = mass, r operators = mass, r
geometry_mixins = equidistant
[formcompiler.mass] [formcompiler.mass]
numerical_jacobian = 0, 1 | expand num numerical_jacobian = 0, 1 | expand num
......
...@@ -15,6 +15,7 @@ T = 0.01 ...@@ -15,6 +15,7 @@ T = 0.01
[formcompiler] [formcompiler]
operators = mass, poisson operators = mass, poisson
geometry_mixins = equidistant
[formcompiler.mass] [formcompiler.mass]
sumfact = 0, 1 | expand sf sumfact = 0, 1 | expand sf
......
...@@ -9,3 +9,4 @@ extension = vtu ...@@ -9,3 +9,4 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 9e-8 compare_l2errorsquared = 9e-8
geometry_mixins = equidistant
...@@ -9,3 +9,4 @@ extension = vtu ...@@ -9,3 +9,4 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 6e-7 compare_l2errorsquared = 6e-7
geometry_mixins = equidistant
...@@ -9,3 +9,4 @@ extension = vtu ...@@ -9,3 +9,4 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 9e-5 compare_l2errorsquared = 9e-5
geometry_mixins = equidistant
...@@ -9,3 +9,4 @@ extension = vtu ...@@ -9,3 +9,4 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 1e-4 compare_l2errorsquared = 1e-4
geometry_mixins = equidistant
...@@ -10,3 +10,4 @@ extension = vtu ...@@ -10,3 +10,4 @@ extension = vtu
[formcompiler] [formcompiler]
opcounter = 1 opcounter = 1
instrumentation_level = 3 instrumentation_level = 3
geometry_mixins = equidistant
...@@ -11,7 +11,7 @@ extension = vtu ...@@ -11,7 +11,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 7e-7 compare_l2errorsquared = 7e-7
geometry = equidistant geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 1, 0 | expand num numerical_jacobian = 1, 0 | expand num
...@@ -13,6 +13,7 @@ extension = vtu ...@@ -13,6 +13,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 4e-6 compare_l2errorsquared = 4e-6
geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 1, 0 | expand num numerical_jacobian = 1, 0 | expand num
\ No newline at end of file
...@@ -11,6 +11,7 @@ extension = vtu ...@@ -11,6 +11,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 6e-8 compare_l2errorsquared = 6e-8
geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 0, 1 | expand num numerical_jacobian = 0, 1 | expand num
...@@ -12,6 +12,7 @@ extension = vtu ...@@ -12,6 +12,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 1e-10 compare_l2errorsquared = 1e-10
geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 1, 0 | expand num numerical_jacobian = 1, 0 | expand num
...@@ -11,6 +11,7 @@ extension = vtu ...@@ -11,6 +11,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 1e-8 compare_l2errorsquared = 1e-8
geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 0, 1 | expand num numerical_jacobian = 0, 1 | expand num
...@@ -12,6 +12,7 @@ extension = vtu ...@@ -12,6 +12,7 @@ extension = vtu
[formcompiler] [formcompiler]
compare_l2errorsquared = 1e-10 compare_l2errorsquared = 1e-10
geometry_mixins = equidistant
[formcompiler.r] [formcompiler.r]
numerical_jacobian = 1, 0 | expand num numerical_jacobian = 1, 0 | expand num
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment