Salome HOME
Impressions de DEBUG
authorGerald NICOLAS <gerald.nicolas@edf.fr>
Tue, 17 Oct 2017 12:41:06 +0000 (14:41 +0200)
committerGerald NICOLAS <gerald.nicolas@edf.fr>
Tue, 17 Oct 2017 12:41:06 +0000 (14:41 +0200)
src/FrontTrack/FrontTrack.cxx
src/FrontTrack/FrontTrack_NodeGroups.cxx
src/FrontTrack/FrontTrack_NodesOnGeom.cxx

index 98974c1c909fbb48d1667403037236fccb1a30d0..7c0706c3e6e4b2e981730b01a570d763a4e5e0eb 100755 (executable)
@@ -55,7 +55,7 @@ void FrontTrack::track( const std::string&                 theInputMedFile,
   for ( size_t i = 0; i < theNodeFiles.size(); ++i )
   {
 #ifdef _DEBUG_
-    std::cout << "Fichier" << theNodeFiles[i] << std::endl;
+    std::cout << "Input node file:" << theNodeFiles[i] << std::endl;
 #endif
     if ( !FT_Utils::fileExists( theNodeFiles[i] ))
       throw std::invalid_argument( "Input node file does not exist: " + theNodeFiles[i] );
@@ -92,6 +92,9 @@ void FrontTrack::track( const std::string&                 theInputMedFile,
   if ( !xao.importXAO( theXaoFileName ) || !xao.getGeometry() )
     throw std::invalid_argument( "Failed to read the XAO input file: " + theXaoFileName );
 
+#ifdef _DEBUG_
+  std::cout << "Conversion en BREP" << std::endl;
+#endif
   XAO::BrepGeometry* xaoGeom = dynamic_cast<XAO::BrepGeometry*>( xao.getGeometry() );
   if ( !xaoGeom || xaoGeom->getTopoDS_Shape().IsNull() )
     throw std::invalid_argument( "Failed to get a BREP shape from the XAO input file" );
@@ -104,17 +107,22 @@ void FrontTrack::track( const std::string&                 theInputMedFile,
 #endif
   FT_NodeGroups nodeGroups;
   nodeGroups.read( theNodeFiles, &xao, nodeCoords );
-
+#ifdef _DEBUG_
+  std::cout << "Nombre de groupes : " << nodeGroups.nbOfGroups() << std::endl;
+#endif
 
   // project nodes to the boundary shapes and change their coordinates
 
 #ifdef _DEBUG_
-  std::cout << "Projection des noeuds" << std::endl;
+  std::cout << "Projection des noeuds, theIsParallel=" << theIsParallel << std::endl;
 #endif
   OSD_Parallel::For( 0, nodeGroups.nbOfGroups(), nodeGroups, !theIsParallel );
 
   // save the modified mesh
 
+#ifdef _DEBUG_
+  std::cout << "Ecriture du maillage" << std::endl;
+#endif
   const int erase = 2;
   mfMesh->write( theOutputMedFile, /*mode=*/erase );
 
index 917a056a8541a2ff59dc50f3c14e96da33271765..9c8f6b3680b8ceda6f02688d5142805533f17dd3 100755 (executable)
@@ -34,6 +34,9 @@ namespace
   {
     TopTools_IndexedMapOfShape subShapes;
     TopExp::MapShapes( theMainShape, theSubType, subShapes );
+#ifdef _DEBUG_
+    std::cout << ". Nombre de subShapes : " << subShapes.Size() << std::endl;
+#endif
 
     theProjectors.resize( subShapes.Size() );
     for ( int i = 1; i <= subShapes.Size(); ++i )
index d150c8871d84460fc532d5ea9447acb5400a8c6c..ed385fd908828fcbae3577dfe456166654fa4a7a 100755 (executable)
@@ -236,6 +236,10 @@ void FT_NodesOnGeom::projectAndMove()
   size_t iP, iProjector;
   gp_Pnt newXyz;
 
+#ifdef _DEBUG_
+    std::cout << ".. _projectors.size() = " << _projectors.size() << std::endl;
+    std::cout << ".. _nodesOrder.size() = " << _nodesOrder.size() << std::endl;
+#endif
   if ( _projectors.size() > 1 )
   {
     // the nodes are to be projected onto several boundary shapes;
@@ -288,6 +292,8 @@ void FT_NodesOnGeom::projectAndMove()
       gp_Pnt        xyz = getPoint( nn._nodeToMove );
       gp_Pnt       xyz1 = getPoint( nn._neighborNodes[0] );
       gp_Pnt       xyz2 = getPoint( nn._neighborNodes[1] );
+
+// maxDist2 : le quart du carré de la distance entre les deux voisins du noued à bouger
       double   maxDist2 = xyz1.SquareDistance( xyz2 ) / 4.;
       if ( _projectors[ 0 ].project( xyz, maxDist2, newXyz,
                                      nn._params, nn._nearParams ))