This seems to be a symptom of issue #89, see https://bitbucket.org/fenics-project/dolfin/issue/89.
As a workaround, call mesh.bounding_box_tree().build(mesh) every time after moving a mesh. Jan On Thu, 11 Jun 2015 12:31:06 +0200 (CEST) Bjoern Baran <[email protected]> wrote: > Hi, > > when evaluating a function at arbitrary points inside certain cells I > often get the following error message: > > --------------------------------------------------------------------------- > RuntimeError Traceback (most recent call last) > /scratch/baran/master_thesis/stefan_problem/minimal_example.py in > <module>() 15 > 16 mesh.move(V_all_acc) > ---> 17 v(cell.midpoint()) # eval fails > > /afs/mpi-magdeburg.mpg.de/data/csc/software/64bit/fenics-1.5.0-ubuntu1204/lib/python2.7/site-packages/dolfin/functions/function.pyc > in __call__(self, *args, **kwargs) 603 > 604 # The actual evaluation > --> 605 self.eval(values, x) > 606 > 607 # If scalar return statement, return scalar value. > > RuntimeError: > > *** > ------------------------------------------------------------------------- > *** DOLFIN encountered an error. If you are not able to resolve this > issue *** using the information listed below, you can ask for help at > *** *** [email protected] > *** > *** Remember to include the error message listed below and, if > possible, *** include a *minimal* running example to reproduce the > error. *** > *** > ------------------------------------------------------------------------- > *** Error: Unable to evaluate function at point. *** Reason: The > point is not inside the domain. Consider setting > "allow_extrapolation" to allow extrapolation. *** Where: This error > was encountered inside Function.cpp. *** Process: unknown *** > *** DOLFIN version: 1.5.0 > *** Git changeset: > *** > ------------------------------------------------------------------------- > > This only happens after moving the mesh with "mesh.move()". When > setting "allow_extrapolation" the message changes to: > > Building point search tree to accelerate distance queries. > Computed bounding box tree with 2707 nodes for 1354 points. > --------------------------------------------------------------------------- > RuntimeError Traceback (most recent call last) > /scratch/baran/master_thesis/stefan_problem/minimal_example.py in > <module>() 15 > 16 mesh.move(V_all_acc) > ---> 17 v(cell.midpoint()) # eval fails > > /afs/mpi-magdeburg.mpg.de/data/csc/software/64bit/fenics-1.5.0-ubuntu1204/lib/python2.7/site-packages/dolfin/functions/function.pyc > in __call__(self, *args, **kwargs) 603 > 604 # The actual evaluation > --> 605 self.eval(values, x) > 606 > 607 # If scalar return statement, return scalar value. > > RuntimeError: > > *** > ------------------------------------------------------------------------- > *** DOLFIN encountered an error. If you are not able to resolve this > issue *** using the information listed below, you can ask for help at > *** *** [email protected] > *** > *** Remember to include the error message listed below and, if > possible, *** include a *minimal* running example to reproduce the > error. *** > *** > ------------------------------------------------------------------------- > *** Error: Unable to create mesh entity. *** Reason: Mesh entity > index -1 out of range [0, 1354] for entity of dimension 2. *** Where: > This error was encountered inside MeshEntity.cpp. *** Process: > unknown *** > *** DOLFIN version: 1.5.0 > *** Git changeset: > *** > ------------------------------------------------------------------------- > > If I export the mesh into a .xml file and load it again the error > disappeared. > > I hope you can help me with this issue. > > Sincerely, > Björn _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
