Von: firedrake-bounces@imperial.ac.uk [mailto:firedrake-bounces@imperial.ac.uk] Im Auftrag von Buesing, Henrik Gesendet: 24 March 2017 14:52 An: firedrake@imperial.ac.uk Betreff: Re: [firedrake] Nonlinear solve did not converge due to DIVERGED_FNORM_NAN If what you need is just the area of the facet, why not just use FacetArea? [Buesing, Henrik] Yes! Did not know this. This makes no difference, but shortens the notation considerably. Thank you! [Buesing, Henrik] Hmm... FacetArea seems not to be the same as my Delta_h_facet. At least I get divergence for some of my problems. I guess I will stick with the old one then. On 24/03/17 12:08, Buesing, Henrik wrote: Oh, your space 'DG1' is actually the space of piecewise constants? If so, ignore what I said. [Buesing, Henrik] Yes, sorry. Maybe should have named that different. It is a problem with two unknowns. That's why I named this DG1 and DG2 (which are both DQ0). Therefore, this should just be the area of the facet. On 24 Mar 2017 11:57 am, "Andrew McRae" <A.T.T.McRae@bath.ac.uk<mailto:A.T.T.McRae@bath.ac.uk>> wrote: "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<mailto: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) _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake