shape (3,1) vs. shape (3,)

Issue #77 invalid
Marco Morandini created an issue

Shape (3,1) is different than shape (3,), see attached file. Don't know whether this is a bug or not.

Comments (4)

  1. Martin Sandve Alnæs

    Well, the shapes (3,1) and (3,) are different. I looked over and all the errors are correct, albeit could use with clearer error messages.

    To get consistent behaviour between 1D and 2/3D, grad(u) adds the (1,) dimension such that e.g. n = FacetNormal(interval); un = dot(grad(u), n) will work consistently.

    If you want the scalar valued derivative, use u.dx(0) instead.

  2. Log in to comment