← Back to team overview

dolfin team mailing list archive

Stokes form and viscosity, Part III

 

I could narrow it down even more:

It seems that with this form:

P1 = FiniteElement("Lagrange", "triangle", 1)
P2 = FiniteElement("Vector Lagrange", "triangle", 2)
linear_scalar = FiniteElement("Lagrange", "triangle", 1)
TH = P2 + P1

(v, q) = BasisFunctions(TH)
(U, P) = BasisFunctions(TH)
nu = Function(linear_scalar)
f = Function(P2)

a = (dot(nu*grad(U), grad(v)) - P*div(v) + div(U)*q)*dx
L = dot(f, v)*dx

a Krylov iterative solver like this:

KrylovSolver solver(Preconditioner::ilu);
solver.set("Krylov shift nonzero", 1e-14);
solver.set("Krylov relative tolerance", 1e-14);
solver.solve(A, x, b);

works whereas a LU solver:

LU solver;
solver.solve(A, x, b);

does not produce the correct velocity, but the right pressure. So who do I get the LU solver to get velocity and pressure right?

Thanks for all help and tips

Alex