dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #14477
Re: Issues with errornorm
On Saturday 01 August 2009 04:43:40 Marie Rognes wrote:
> Hellu,
>
> errornorm.py seems to not work properly.
>
> This
>
> from dolfin import *
> mesh = UnitSquare(2,2)
> V = FunctionSpace(mesh, "CG", 1)
> u = Function(V, "1.0")
> v = Function(V, "2.0")
> error = errornorm(u, v, "l2")
>
> gives
>
>
> Traceback (most recent call last):
> File "test_errornorm.py", line 8, in <module>
> error = errornorm(u, v, "l2")
> File
> "/home/meg/local/lib64/python2.6/site-packages/dolfin/errornorm.py",
> line 51, in errornorm
> if not isinstance(u, cpp.Function):
> NameError: global name 'cpp' is not defined
This one was easy. A recent changed caused this.
> Also value_rank() does not exist in my fenics installation.
> rank() does however.
This one was worse. In the errornorm function a function is supposed to have
the value_rank method. As Marie points out, this methode does only excist in
the FiniteElement class. This means that the error function has not worked
properly for at least the last 6 month. Has no one used this function?
unittests, unittests, unittests... ;)
Johan
> (I have packages from the repository as of 5 minutes ago.)
>
> --
> Marie
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References