"jump" gives the 'jump' in a discontinuous function across a facet of the mesh (to be used inside an interior facet integral).  But since you interpolate "x[0]", "x[1]" and "x[2]" (which are obviously continuous) into the discontinuous space, I would expect all the jump terms to evaluate to 0, so Delta_h_facet is 0.

If you're dividing by that, this probably explains your problem!

I suspect you were trying to do something different... so, what is it that you're trying to do?

On 24 March 2017 at 11:52, Buesing, Henrik <HBuesing@eonerc.rwth-aachen.de> wrote:

Initial thought: could you be generating a NaN in your own code as the mesh is refined?  E.g. if you're interpolating some expression that leads to a 0/0 at some points in the domain.

 

[Buesing, Henrik] I am dividing by Delta_h_facet (see [1]). So for the cell in the origin, the node should move closer to zero. But, since I am using DQ0 it should not be zero, right?


I am also dividing by dt. Should I reformulate s.t. I multiply by dt?

Thank you!

Henrik

 

 

[1]

x_func_expr = Expression("x[0]")

y_func_expr = Expression("x[1]")

z_func_expr = Expression("x[2]")

 

x_func = interpolate(x_func_expr, DG1)

y_func = interpolate(y_func_expr, DG1)

z_func = interpolate(z_func_expr, DG1)

Delta_h_facet = sqrt(jump(x_func)**2

                   + jump(y_func)**2

                   + jump(z_func)**2)