← Back to team overview

dolfin team mailing list archive

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

 

Public bug reported:

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)

** Affects: dolfin
     Importance: Undecided
         Status: New

-- 
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:
  New

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)





Follow ups

References