From: ndjinga Date: Wed, 16 Apr 2008 07:20:13 +0000 (+0000) Subject: Changed debug prints X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=972a10b3cd8a06bac4735c63b7b00f896a31d90e;p=tools%2Fmedcoupling.git Changed debug prints --- diff --git a/src/INTERP_KERNEL/Test/Interpolation3DTest.cxx b/src/INTERP_KERNEL/Test/Interpolation3DTest.cxx index eaeffd16e..1522cfac6 100644 --- a/src/INTERP_KERNEL/Test/Interpolation3DTest.cxx +++ b/src/INTERP_KERNEL/Test/Interpolation3DTest.cxx @@ -48,7 +48,7 @@ double Interpolation3DTest::sumCol(const IntersectionMatrix& m, int i) const const std::map& col = m[i]; for(map::const_iterator iter = col.begin() ; iter != col.end() ; ++iter) { - vol += std::abs(iter->second); + vol += std::fabs(iter->second); } return vol; } diff --git a/src/INTERP_KERNEL/TriangulationIntersector.txx b/src/INTERP_KERNEL/TriangulationIntersector.txx index 9780c4aac..8446a0052 100644 --- a/src/INTERP_KERNEL/TriangulationIntersector.txx +++ b/src/INTERP_KERNEL/TriangulationIntersector.txx @@ -25,7 +25,7 @@ namespace INTERP_KERNEL _coordsB = mesh_B.getCoordinatesPtr(); if(PlanarIntersector::_printLevel >= 1) { - std::cout << "_intersection_type = triangles " << std::endl; + std::cout << " - intersection type = triangles " << std::endl; if(SPACEDIM==3) std::cout << "_do_rotate = true"<< std::endl; } } @@ -34,8 +34,8 @@ namespace INTERP_KERNEL double TriangulationIntersector::intersectCells(ConnType icell_A, ConnType icell_B, int nb_NodesA, int nb_NodesB) { - double result=0; - + double result=0.; + //Obtain the coordinates of A and B std::vector Coords_A (SPACEDIM*nb_NodesA); std::vector Coords_B (SPACEDIM*nb_NodesB); @@ -53,6 +53,18 @@ namespace INTERP_KERNEL PlanarIntersector::_dimCaracteristic * PlanarIntersector::_precision, PlanarIntersector::_medianPlane, PlanarIntersector::_doRotate); + //DEBUG PRINTS + if(PlanarIntersector::_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(&inter[0],&inter[2*i],&inter[2*(i+1)],area); - result +=0.5*norm<2>(area); + result +=0.5*fabs(area[0]); } //DEBUG prints if(PlanarIntersector::_printLevel >= 3) @@ -80,18 +92,11 @@ namespace INTERP_KERNEL } } } - + + //DEBUG PRINTS if(PlanarIntersector::_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_NodesA; i_A++) - {for (int idim=0; idim