Hello! I can reproduce this and it looks like a bug in the bounding box search tree. As far as I can see, should the following return a non-empty array:
from dolfin import * mesh = UnitCubeMesh(14,14,14) mesh.bounding_box_tree().compute_entity_collisions(Point(0.75,0.25,0.125)) but the array is empty... Johan On Wed, Dec 4, 2013 at 5:46 PM, Torsten Wendav <[email protected]>wrote: > Hi! > > I just started using FEniCS and tried to extend the example for solving > the Poisson eq. to 3D (FEniCS book page 5). When I try to evaluate the > calculated function at a specific point WITHIN the domain, I get the > following 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: 0 > *** > *** DOLFIN version: 1.2.0+ > *** Git changeset: 3fccc245c4f7d4f35503d0112ec2966b4946a311 > *** > ------------------------------------------------------------------------- > > I have tried various versions of calculating the function value at this > point, but didn't succeed. Other points (like (0.5, 0.5, 0.5)) work. What > am I doing wrong? I hope it's not some trivial mistake. > > Thank you very much! > > -- > from dolfin import * > import numpy > > # Mesh > mesh = UnitCubeMesh(14,14,14) > V = FunctionSpace(mesh, "Lagrange", 1) > > # BC > u0 = Expression("1 + x[0]*x[0] + 2*x[1]*x[1] + x[2]*x[2]") > bc = DirichletBC(V,u0,DomainBoundary()) > > # Define variational problem > u, v = TrialFunction(V), TestFunction(V) > f = Constant(-6.0) > a = inner(nabla_grad(u), nabla_grad(v))*dx > L = f*v*dx > > # Compute solution > u = Function(V) > set_log_level(PROGRESS) > solve(a==L,u,bc) > > x = numpy.array([0.75, 0.25, 0.125]) > print u(x) > > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
