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

Address all the comments

parent ca547479
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ from loopy.kernel.creation import parse_domains
from loopy.symbolic import pw_aff_to_expr
from loopy.match import Tagged
from pymbolic.mapper.dependency import DependencyMapper
from loopy.symbolic import DependencyMapper
import pymbolic.primitives as prim
import loopy as lp
......
......@@ -131,10 +131,7 @@ def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id):
a_matrices, buffer, input, index = get_vectorization_info(a_matrices, restriction)
# Initialize a base storage for this buffer and get a temporay pointing to it
try:
shape = tuple(mat.cols for mat in a_matrices if mat.cols != 1)
except:
from pudb import set_trace; set_trace()
shape = tuple(mat.cols for mat in a_matrices if mat.cols != 1)
dim_tags = ",".join(['f'] * local_dimension())
if index is not None:
shape = shape + (4,)
......
......@@ -56,7 +56,7 @@ def decide_if_kernel_is_necessary(facedir_s, facemod_s, facedir_n, facemod_n):
if not get_option("diagonal_transformation_matrix"):
return True
# A codim1 entity is can never be on the upper resp. lower side of the ref element
# A codim1 entity can never be on the upper resp. lower side of the ref element
# in both inside and outside cell in a YaspGrid
if facemod_n == facemod_s:
return False
......
cell = "quadrilateral"
f = Expression("return -2.0*x.size();", cell=cell)
g = Expression("return x.two_norm2();", on_intersection=True, cell=cell)
V = FiniteElement("DG", cell, 1)
u = TrialFunction(V)
v = TestFunction(V)
n = FacetNormal(cell)('+')
gamma = 1.0
theta = 1.0
r = inner(grad(u), grad(v))*dx \
+ inner(n, avg(grad(u)))*jump(v)*dS \
+ gamma*jump(u)*jump(v)*dS \
+ theta*jump(u)*inner(avg(grad(v)), n)*dS \
- inner(n, grad(u))*v*ds \
+ gamma*u*v*ds \
- theta*u*inner(grad(v), n)*ds \
- f*v*dx \
+ theta*g*inner(grad(v), n)*ds \
- gamma*g*v*ds
forms = [r]
__name = poisson_dg_quadrilateral_{__exec_suffix}
__exec_suffix = numdiff, symdiff | expand num
extension = 1.0 1.0
cells = 32 32
[wrapper.vtkcompare]
name = {__name}
extension = vtu
[formcompiler]
numerical_jacobian = 1, 0 | expand num
exact_solution_expression = g
compare_l2errorsquared = 2e-5
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