_coordsB = mesh_B.getCoordinatesPtr();
if(PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_printLevel >= 1)
{
- std::cout << " _intersection_type = convex " << std::endl;
+ std::cout << " - intersection type = convex " << std::endl;
if(SPACEDIM==3){
if(PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_doRotate) std::cout << " _do_rotate = true" << std::endl;
else std::cout << " _do_rotate = false" << std::endl;
if(SPACEDIM==3) projection(Coords_A, Coords_B, nb_dist_NodesA, nb_dist_NodesB,_epsilon,
PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_medianPlane,
PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_doRotate);
+
+ //DEBUG PRINTS
+ if(PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_printLevel >= 3)
+ {
+ std::cout << std::endl << "Cell coordinates (possibly after projection)" << std::endl;
+ std::cout << std::endl << "icell_A= " << icell_A << ", nb nodes A= " << nb_NodesA << std::endl;
+ for(int i_A =0; i_A< nb_NodesA; i_A++)
+ {for (int idim=0; idim<SPACEDIM; idim++) std::cout << Coords_A[SPACEDIM*i_A+idim] << " "; std::cout << std::endl;}
+ std::cout << std::endl << "icell_B= " << icell_B << ", nb nodes B= " << nb_NodesB << std::endl;
+ for(int i_B =0; i_B< nb_NodesB; i_B++)
+ {for (int idim=0; idim<SPACEDIM; idim++) std::cout << Coords_B[SPACEDIM*i_B+idim]<< " "; std::cout << std::endl; }
+ }
+
/*** Compute the intersection area ***/
INTERP_KERNEL::PolygonAlgorithms<SPACEDIM> P(_epsilon, PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_precision);
std::deque<double> inter = P.intersect_convex_polygons(&Coords_A[0], &Coords_B[0],
//DEBUG prints
if(PlanarIntersector<SPACEDIM,MESHDIM,ConnType,numPol,MyMeshType>::_printLevel >= 3)
{
- std::cout << std::endl << "Cell coordinates after projection" << std::endl;
- std::cout << std::endl << "icell_A= " << icell_A << ", nb nodes A= " << nb_NodesA << std::endl;
- for(int i_A =0; i_A< nb_dist_NodesA; i_A++)
- {for (int idim=0; idim<SPACEDIM; idim++) std::cout << Coords_A[SPACEDIM*i_A+idim]<< " "; std::cout << std::endl; }
- std::cout <<std::endl<< "icell_B= " << icell_B << ", nb nodes B= " << nb_NodesB << std::endl;
- for(int i_B =0; i_B< nb_dist_NodesB; i_B++)
- {for (int idim=0; idim<SPACEDIM; idim++) std::cout << Coords_B[SPACEDIM*i_B+idim]<< " "; std::cout << std::endl; }
std::cout << std::endl << "Number of nodes of the intersection = "<< nb_inter << std::endl;
for(int i=0; i< nb_inter; i++)
{for (int idim=0; idim<SPACEDIM; idim++) std::cout << inter[SPACEDIM*i+idim]<< " "; std::cout << std::endl;}