Salome HOME
Generalize "Cancel Compute" mechanism to be able to report
[modules/smesh.git] / src / StdMeshers / StdMeshers_ViscousLayers.cxx
index 4952afab6744a71819f491aafc9bd27e586749c6..d9e2fe417b1e607de0f049718cfaa4b55f1a9ff4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -123,7 +123,9 @@ namespace VISCOUS
    */
   class _SrinkShapeListener : SMESH_subMeshEventListener
   {
-    _SrinkShapeListener(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    _SrinkShapeListener()
+      : SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                   "StdMeshers_ViscousLayers::_SrinkShapeListener") {}
     static SMESH_subMeshEventListener* Get() { static _SrinkShapeListener l; return &l; }
   public:
     virtual void ProcessEvent(const int                       event,
@@ -163,7 +165,9 @@ namespace VISCOUS
    */
   class _ViscousListener : SMESH_subMeshEventListener
   {
-    _ViscousListener(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    _ViscousListener():
+      SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                 "StdMeshers_ViscousLayers::_ViscousListener") {}
     static SMESH_subMeshEventListener* Get() { static _ViscousListener l; return &l; }
   public:
     virtual void ProcessEvent(const int                       event,
@@ -523,7 +527,8 @@ namespace VISCOUS
     virtual SMDSAbs_ElementType  GetType() const              { return SMDSAbs_Face; }
     virtual vtkIdType GetVtkType() const                      { return -1; }
     virtual SMDSAbs_EntityType   GetEntityType() const        { return SMDSEntity_Last; }
-    virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const
+    virtual SMDSAbs_GeometryType GetGeomType() const          { return SMDSGeom_TRIANGLE; }
+virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const
     { return SMDS_ElemIteratorPtr( new SMDS_NodeVectorElemIterator( _nn.begin(), _nn.end()));}
   };
   //--------------------------------------------------------------------------------
@@ -2508,8 +2513,8 @@ bool _ViscousBuilder::smoothAnalyticEdge( _SolidData&           data,
       gp_Vec2d vec1( center, uv1 );
       double uLast = vec0.Angle( vec1 ); // -PI - +PI
       double uMidl = vec0.Angle( vecM );
-      if ( uLast < 0 ) uLast += 2*PI; // 0.0 - 2*PI
-      if ( uMidl < 0 ) uMidl += 2*PI;
+      if ( uLast < 0 ) uLast += 2.*M_PI; // 0.0 - 2*PI
+      if ( uMidl < 0 ) uMidl += 2.*M_PI;
       const bool sense = ( uMidl < uLast );
       const double radius = 0.5 * ( vec0.Magnitude() + vec1.Magnitude() );