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

Have quadrature caches for different order

parent 63c0ce6b
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,8 @@ def name_quadrature_points():
"""Name of vector storing quadrature points as class member"""
from dune.perftool.pdelab.geometry import local_dimension
dim = local_dimension()
name = "qp_dim" + str(dim)
order = quadrature_order()
name = "qp_dim{}_order{}".format(dim, order)
shape = (name_quadrature_bound(), dim)
globalarg(name, shape=shape, dtype=numpy.float64, managed=False)
define_quadrature_points(name)
......@@ -166,7 +167,8 @@ def name_quadrature_weights():
""""Name of vector storing quadrature weights as class member"""
from dune.perftool.pdelab.geometry import local_dimension
dim = local_dimension()
name = "qw_dim" + str(dim)
order = quadrature_order()
name = "qw_dim{}_order{}".format(dim, order)
define_quadrature_weights(name)
fill_quadrature_weights_cache(name)
......
f = Expression("Dune::FieldVector<double,2> c(0.5); c-= x; return 4.*(1.-c.two_norm2())*std::exp(-1.*c.two_norm2());")
g = Expression("Dune::FieldVector<double,2> c(0.5); c-= x; return std::exp(-1.*c.two_norm2());", on_intersection=True)
cell = triangle
x = SpatialCoordinate(cell)
c = (0.5-x[0])**2 + (0.5-x[1])**2
g = exp(-1.*c)
f = 4*(1.-c)*g
V = FiniteElement("DG", cell, 1)
u = TrialFunction(V)
......
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