← Back to team overview

dolfin team mailing list archive

[Bug 702408] Re: RHS assembly fails for DG(0) elements

 

Should be fixed now. The problem has that the degree was automatically
set to 0 for the Expression which doesn't work for Lagrange elements.
The minimal degree is now 1.

** Changed in: dolfin
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/702408

Title:
  RHS assembly fails for DG(0) elements

Status in DOLFIN:
  Fix Committed

Bug description:
  The following code throws "numpy.linalg.linalg.LinAlgError: Array must
  be square". It works with f=Constant(1), and with other function
  spaces (including DG(0) as part of a mixed space). The same happens
  with project(f, DG).

  from dolfin import *
  mesh = UnitSquare(4, 4)
  DG = FunctionSpace(mesh, "DG", 0)

  f = Expression("1")

  v   = TestFunction(DG)
  L  = f * v * dx
  assemble(L)





References