Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaNs with mixed quadrature degree and coffee #88

Closed
FabioLuporini opened this issue Aug 4, 2016 · 0 comments · Fixed by #89
Closed

NaNs with mixed quadrature degree and coffee #88

FabioLuporini opened this issue Aug 4, 2016 · 0 comments · Fixed by #89

Comments

@FabioLuporini
Copy link
Contributor

So this one is turning out a little tricky to reproduce. But with the following code:

from firedrake import *
#parameters['coffee'] = {}
mesh = UnitSquareMesh(1,1)
V = FunctionSpace(mesh, "RT", 2)
P1 = FunctionSpace(mesh, "CG", 1)
v = TestFunction(V)
u = Function(V)
c1 = Function(P1)
c1.assign(0.001)
c2 = Constant(1e-6)
dt = Constant(1.0)
dx2 = dx(degree=5)
F = inner(v,u)*dx - dt*(- c2*inner(v,u)*dx2 - c1*(-u[1]*v[0] + u[0]*v[1])*dx2)
print assemble(derivative(F,u)).M.values.sum()

I'm getting NaNs in the assembled matrix (most of the time!) if I leave COFFEE optimisations switched on. I say most of the times, as running the script multiple times I sometimes get different answers (sometimes the correct one), so I expect some sort of initialised value bug? It seems to be also very sensitive to the precise form of the equation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant