Solver method for LUSolver for Epetra backends fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Critical
|
Anders Logg |
Bug Description
The following modified test script fails as the Epetra LUSolver does not get properly instantiated:
from dolfin import *
parameters.
# Create mesh and define function space
mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "Lagrange", 1)
# Define Dirichlet boundary (x = 0 or x = 1)
def boundary(x):
return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPS
# Define boundary condition
u0 = Constant(0.0)
bc = DirichletBC(V, u0, boundary)
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
f = Expression(
g = Expression(
a = inner(grad(u), grad(v))*dx
L = f*v*dx + g*v*ds
A = assemble(a)
b = assemble(L)
bc.apply(A, b)
# Both fails!
solver = LUSolver("mumps")
#solver = LUSolver("umfpack")
# Default works
#solver = LUSolver()
# Compute solution
u = Function(V)
solver.solve(A, u.vector(), b)
################
We need a unit test that iterate over all backends and possible solvers and try to solve a problem using the allowed options.
Changed in dolfin: | |
importance: | Undecided → Critical |
assignee: | nobody → Anders Logg (logg) |
milestone: | none → 1.0-rc1 |
Changed in dolfin: | |
status: | In Progress → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
The initialization of the solver object is now checked and an error message is displayed. Your problem is (I think) that your Epetra installation does not have UMFPACK. This bug is superseded by bug #891350.