Skip to content
Snippets Groups Projects
Commit 02874b0e authored by René Heß's avatar René Heß
Browse files

Fix typos, add assertion and fix small bug

parent 55e7cc0b
No related branches found
No related tags found
No related merge requests found
......@@ -137,16 +137,21 @@ def typedef_fem(element, name):
# of the same type ('CG' or 'DG')
assert(len(set(subel._short_name for subel in element.sub_elements())) == 1)
# Anisotropic degree is not yet supported in Dune
degrees = element.degree()
for deg in degrees:
assert (deg == degrees[0])
# TensorProductElements have Qk structure -> no Pk
if isLagrange(element.sub_elements()[0]):
include_file("dune/pdelab/finiteelementmap/qkfem.hh", filetag="driver")
return "using {} = Dune::PDELab::QkLocalFiniteElementMap<{}, {}, {}, {}>;" \
.format(name, gv, df, r, max(element.degree()))
.format(name, gv, df, r, degrees[0])
elif isDG(element.sub_elements()[0]):
include_file("dune/pdelab/finiteelementmap/qkdg.hh", filetag="driver")
# TODO allow switching the basis here!
return "using {} = Dune::PDELab::QkDGLocalFiniteElementMap<{}, {}, {}, {}>;" \
.format(name, df, r, max(element.degree()), dim)
.format(name, df, r, degrees[0], dim)
raise NotImplementedError("FEM not implemented in dune-perftool")
elif isQk(element):
include_file("dune/pdelab/finiteelementmap/qkfem.hh", filetag="driver")
......
......@@ -218,9 +218,9 @@ def quadrature_order():
Notes:
- In PDELab quadrature order m means that integration of
polynomials of degree m is excat.
polynomials of degree m is exact.
- If you sue sum factorization and TensorProductElement it is
- If you use sum factorization and TensorProductElement it is
possible to use a different quadrature_order per direction.
"""
if get_option("quadrature_order"):
......
......@@ -105,7 +105,8 @@ def _basis_functions_per_direction(element):
basis_size = tuple(deg + 1 for deg in degree)
# Anisotropic finite elements are not (yet) supported by Dune
assert(size == basis_size[0] for size in basis_size)
for size in basis_size:
assert(size == basis_size[0])
return basis_size
......
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