Assembler and SystemAssembler give different results

Bug #437392 reported by Garth Wells
38
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
Revision history for this message
Garth Wells (garth-wells) wrote :

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
n = V.cell().n
h = CellSize(mesh)
h_avg = (h('+') + h('-'))/2
f = Function(V, "500.0*exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)")

# Define parameters
alpha = 4.0
gamma = 8.0

# Define bilinear form
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_avg*dot(jump(v, n), jump(u, n))*dS \
   - 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
problem = VariationalProblem(a, L)
u = problem.solve()

_problem = VariationalProblem(a, L)
_problem.parameters["symmetric"] = True
_u = _problem.solve()

print "Assembler result: ", u.vector().norm("l2")
print "SystemAssembler result: ", _u.vector().norm("l2")

Revision history for this message
Garth Wells (garth-wells) wrote :

Looks like problem could be with RHS vector.

Changed in dolfin:
status: Confirmed → Fix Committed
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.