Salome HOME
Merge remote branch 'origin/V7_dev' into V7_dev
authorPaul RASCLE <paul.rascle@edf.fr>
Fri, 15 Apr 2016 15:52:29 +0000 (17:52 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Fri, 15 Apr 2016 15:52:29 +0000 (17:52 +0200)
1  2 
src/SMESH/memoire.h
src/StdMeshers/StdMeshers_Regular_1D.cxx

diff --combined src/SMESH/memoire.h
index 0b8a44b6e4f37c7e394339b1b3f917f311228342,b9d6415d14743ea48df853004a8e084d8d2de89c..51db0552ef42b7f892bb55c61ec28c2c4f44b569
@@@ -1,4 -1,4 +1,4 @@@
- // Copyright (C) 2010-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+ // Copyright (C) 2010-2016  CEA/DEN, EDF R&D, OPEN CASCADE
  //
  // This library is free software; you can redistribute it and/or
  // modify it under the terms of the GNU Lesser General Public
@@@ -30,14 -30,14 +30,14 @@@ void memostat(const char* f, int l
  #ifdef WIN32
          //rnv: TODO: find alternative of the malloc_stats() on windows platform
  #else
 -  /*  struct mallinfo mem = mallinfo(); */
 -  /*  std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " "  << mem.uordblks << " "  << mem.fordblks << " " << mem.keepcost << std::endl; */
 +  struct mallinfo mem = mallinfo();
 +  std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " "  << mem.uordblks << " "  << mem.fordblks << " " << mem.keepcost << std::endl;
    std::cerr << f << ":" << l << " --------------------------" << std::endl;
    malloc_stats();
    std::cerr << f << ":" << l << " --------------------------" << std::endl;
  #endif
  }
  
 -#define MEMOSTAT //memostat( __FILE__, __LINE__ )
 +#define MEMOSTAT memostat( __FILE__, __LINE__ )
  
  #endif
index e5c4d8eb2c8688340e1ce5fe521efda2692fd48e,3f3cb47ff8e1f2ee1981fe4a4e594863645892ee..939ceafde7e8bc9cbe96a547577ba566f311c29a
@@@ -1,4 -1,4 +1,4 @@@
- // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+ // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
  //
  // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
  // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@@ -184,7 -184,6 +184,7 @@@ bool StdMeshers_Regular_1D::CheckHypoth
  
    else if (hypName == "NumberOfSegments")
    {
 +      MESSAGE("CheckHypothesis: NumberOfSegments");
      const StdMeshers_NumberOfSegments * hyp =
        dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
      ASSERT(hyp);
@@@ -592,7 -591,6 +592,7 @@@ void StdMeshers_Regular_1D::redistribut
        }
        if ( _hypType == NB_SEGMENTS )
        {
 +      MESSAGE("redistributeNearVertices NB_SEGMENTS");
          compensateError(0, vertexLength, f, l, theLength, theC3d, theParameters, true );
        }
        else if ( nPar <= 3 )
@@@ -667,7 -665,6 +667,7 @@@ bool StdMeshers_Regular_1D::computeInte
                                                        const bool       theReverse,
                                                        bool             theConsiderPropagation)
  {
 +  MESSAGE("computeInternalParameters");
    theParams.clear();
  
    double f = theFirstU, l = theLastU;
      if ( ! SMESH_Algo::GetSortedNodesOnEdge( theMesh.GetMeshDS(), mainEdge, _quadraticMesh,
                                               mainEdgeParamsOfNodes, SMDSAbs_Edge ))
        return error("Bad node parameters on the source edge of Propagation Of Distribution");
 -
 +    MESSAGE("mainEdgeParamsOfNodes.size(): " << mainEdgeParamsOfNodes.size());
      vector< double > segLen( mainEdgeParamsOfNodes.size() - 1 );
      double totalLen = 0;
      BRepAdaptor_Curve mainEdgeCurve( mainEdge );
        ++nbParams;
      }
      if ( nbParams != segLen.size()-1 )
 -      return error( SMESH_Comment("Can't divide into ") << segLen.size() << " segements");
 +      return error( SMESH_Comment("Can't divide into ") << segLen.size() << " segments");
  
      compensateError( segLen[ theReverse ? segLen.size()-1 : 0 ],
                       segLen[ theReverse ? 0 : segLen.size()-1 ],
    case LOCAL_LENGTH:
    case MAX_LENGTH:
    case NB_SEGMENTS: {
 -
 +    MESSAGE("computeInternalParameters: LOCAL_LENGTH MAX_LENGTH NB_SEGMENTS");
      double eltSize = 1;
      int nbSegments;
      if ( _hypType == MAX_LENGTH )
            if (computed) {
              SMESHDS_SubMesh* smds = sm->GetSubMeshDS();
              int nb_segments = smds->NbElements();
 +            MESSAGE("nb_segments: "<<nb_segments);
              if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
                isFound = true;
                nbseg = nb_segments;
          break;
        case StdMeshers_NumberOfSegments::DT_Regular:
          eltSize = theLength / nbSegments;
 +        MESSAGE("eltSize = theLength / nbSegments " << eltSize << " = " << theLength << " / " << nbSegments );
          break;
        default:
          return false;
      for ( int i = 2; i < NbPoints; i++ ) // skip 1st and last points
      {
        double param = Discret.Parameter(i);
 +      MESSAGE("computeInternalParameters: theParams  " << i << " " <<  param);
        theParams.push_back( param );
      }
      compensateError( eltSize, eltSize, f, l, theLength, theC3d, theParams, true ); // for PAL9899
  
  bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & theShape)
  {
 +  MESSAGE("Compute");
    if ( _hypType == NONE )
      return false;
  
  
        //Add the Node in the DataStructure
        SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
 +      MESSAGE("meshDS->AddNode parameter " << param << " coords=" << "("<< P.X() <<", " << P.Y() << ", " << P.Z() << ")");
        meshDS->SetNodeOnEdge(node, shapeID, param);
  
        if(_quadraticMesh) {