Assembler and SystemAssembler give different results
Bug #437392 reported by
Garth Wells
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Computed results with Assembler and SystemAssembler differ slightly for the DG demos. Continuous demos seem OK.
Changed in dolfin: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
milestone: | none → 0.94 |
Changed in dolfin: | |
status: | Confirmed → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Code to reproduce:
from dolfin import *
# Create mesh and define function space
mesh = UnitSquare(24, 24)
V = FunctionSpace(mesh, "DG", 1)
# Define test and trial functions
v = TestFunction(V)
u = TrialFunction(V)
# Define normal component, mesh size and right-hand side exp(-(pow( x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)")
n = V.cell().n
h = CellSize(mesh)
h_avg = (h('+') + h('-'))/2
f = Function(V, "500.0*
# Define parameters
alpha = 4.0
gamma = 8.0
# Define bilinear form avg*dot( jump(v, n), jump(u, n))*dS \
a = dot(grad(v), grad(u))*dx \
- dot(avg(grad(v)), jump(u, n))*dS \
- dot(jump(v, n), avg(grad(u)))*dS \
+ alpha/h_
- dot(grad(v), u*n)*ds \
- dot(v*n, grad(u))*ds \
+ gamma/h*v*u*ds
# Define linear form
L = v*f*dx
# Compute solution lem(a, L)
problem = VariationalProb
u = problem.solve()
_problem = VariationalProb lem(a, L) parameters[ "symmetric" ] = True
_problem.
_u = _problem.solve()
print "Assembler result: ", u.vector( ).norm( "l2") ).norm( "l2")
print "SystemAssembler result: ", _u.vector(