Point inside mesh

307
views
0
7 months ago by
Hello,

I want to evaluate a function at certain points only if they are inside the mesh corresponding to that function.

I am wondering how I can check whether a point is inside a mesh.

Yours,
Nick
Community: FEniCS Project

1
7 months ago by

You can check if a fenics.Point is within the domain of a fenics.Mesh with mesh.bounding_box_tree().collides_entity(point)

Personally I've only used this with MPI to check if the point is within the worker's part of the decomposed domain; but I imagine this handles your case as well.

Yes, it works. Many Thanks! :)
written 6 months ago by Nick
You're welcome. That's great to hear. Would you please mark the answer as accepted? I'm new to this AllAnswered system; but I think it's the original poster who has to do this.
written 6 months ago by Alexander G. Zimmerman