Dear developers,

I think I found a problem in the PointLocator.

I run the following simple code:

#include "libmesh/mesh.h"
#include "libmesh/gmsh_io.h"
#include "libmesh/libmesh.h"
#include "libmesh/point.h"
#include "libmesh/point_locator_tree.h"
#include "libmesh/elem.h"
int main (int argc, char ** argv)
{
   MPI_Init(&argc, &argv);
   {
     libMesh::LibMeshInit init(argc, argv,MPI_COMM_WORLD);
     libMesh::Parallel::Communicator comm;
     libMesh::Mesh mesh(comm);
     std::string mesh_file("domain.msh");
     libMesh::GmshIO(mesh).read(mesh_file);
     libMesh::PointLocatorTree locator(mesh);
     libMesh::Point p(771.091,   999.52,        0);

     if (locator(p) == NULL)
       std::cout << "not found\n";
     else
       std::cout << "found\n";
   }
   MPI_Finalize();
   return 0;
}

The mesh is generated in gmsh. If I produce the 1st order mesh, the 
element is found. If I produce the 2nd order mesh of the same geometry, 
the element is not found, which is incorrect.

Since the list does not allow to add attachments, I post here the gmsh 
script. If you would like the actual mesh file, just give the e-mail 
address. Thank you!

length = 6000;
height = 8000;
dL = 800;
film_thickness = 50;
film_height = 4000;

absorber_width = 1500;
r1 = 300;
r2 = 40;

Point(1) = {0, 0, 0, r1};
Point(2) = {0, height, 0, r1};
Point(3) = {length, height, 0, r1};
Point(4) = {length, 0, 0, r1};
Point(5) = {0+absorber_width, 0, 0, r1};
Point(6) = {0+absorber_width, height-absorber_width, 0, r1};
Point(7) = {length-absorber_width, height-absorber_width, 0, r1};
Point(8) = {length-absorber_width, 0, 0, r1};
Point(9) = {0+absorber_width+400, film_height, 0, r2};
lineX[] = Extrude{length - 2*absorber_width - dL, length - 
2*absorber_width- dL, 0} { Point{9}; Layers{100}; };
fi[] = Extrude{-film_thickness, film_thickness, 0} { Line{lineX[1]}; 
Layers{10}; };
//+
Line(5) = {1, 2};
//+
Line(6) = {2, 3};
//+
Line(7) = {3, 4};
//+
Line(8) = {8, 4};
//+
Line(9) = {8, 7};
//+
Line(10) = {7, 6};
//+
Line(11) = {6, 5};
//+
Line(12) = {5, 1};
//+
Line(13) = {5, 8};
//+
Curve Loop(1) = {11, 12, 5, 6, 7, -8, 9, 10};
//+
Plane Surface(6) = {1};
//+
Curve Loop(2) = {13, 9, 10, 11};
//+
Curve Loop(3) = {2, -4, -1, 3};
//+
Plane Surface(7) = {2, 3};
Physical Surface("film") = {5};
Physical Surface("PML") = {6};
Physical Surface("air") = {7};



_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to