Salome HOME
Copyright update: 2016
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPlugin_Hypothesis.cxx
index ad439a25d88aed03660e6e215a8d90a4d7df1663..42ea851db7469ddb1808dfcb15944b342e9c4ec2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -216,15 +216,15 @@ void NETGENPlugin_Hypothesis::SetNbSegPerRadius(double theVal)
 void NETGENPlugin_Hypothesis::SetLocalSizeOnEntry(const std::string& entry, double localSize)
 {
   if(_localSize[entry] != localSize)
-    {
-      _localSize[entry] = localSize;
-      NotifySubMeshesHypothesisModification();
-    }
+  {
+    _localSize[entry] = localSize;
+    NotifySubMeshesHypothesisModification();
+  }
 }
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 double NETGENPlugin_Hypothesis::GetLocalSizeOnEntry(const std::string& entry)
@@ -316,7 +316,7 @@ void NETGENPlugin_Hypothesis::SetFuseEdges(bool theVal)
 //=============================================================================
 bool NETGENPlugin_Hypothesis::GetDefaultFuseEdges()
 {
-  return false;
+  return true; // false; -- for SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_05/F6
 }
 
 //=============================================================================
@@ -361,13 +361,13 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
   int is;
   double val;
 
-  isOK = (load >> val);
+  isOK = static_cast<bool>(load >> val);
   if (isOK)
     _maxSize = val;
   else
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> is);
+  isOK = static_cast<bool>(load >> is);
   if (isOK)
     SetFineness((Fineness) is);
   else
@@ -375,32 +375,32 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
 
   if (_fineness == UserDefined)
   {
-    isOK = (load >> val);
+    isOK = static_cast<bool>(load >> val);
     if (isOK)
       _growthRate = val;
     else
       load.clear(ios::badbit | load.rdstate());
 
-    isOK = (load >> val);
+    isOK = static_cast<bool>(load >> val);
     if (isOK)
       _nbSegPerEdge = val;
     else
       load.clear(ios::badbit | load.rdstate());
 
-    isOK = (load >> val);
+    isOK = static_cast<bool>(load >> val);
     if (isOK)
       _nbSegPerRadius = val;
     else
       load.clear(ios::badbit | load.rdstate());
   }
 
-  isOK = (load >> is);
+  isOK = static_cast<bool>(load >> is);
   if (isOK)
     _secondOrder = (bool) is;
   else
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> is);
+  isOK = static_cast<bool>(load >> is);
   if (isOK)
     _optimize = (bool) is;
   else
@@ -409,18 +409,18 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
   std::string option_or_sm;
   bool hasLocalSize = false;
 
-  isOK = (load >> option_or_sm);
+  isOK = static_cast<bool>(load >> option_or_sm);
   if (isOK)
     if (option_or_sm == "__LOCALSIZE_BEGIN__")
       hasLocalSize = true;
 
   std::string smEntry, smValue;
   while (isOK && hasLocalSize) {
-    isOK = (load >> smEntry);
+    isOK = static_cast<bool>(load >> smEntry);
     if (isOK) {
       if (smEntry == "__LOCALSIZE_END__")
         break;
-      isOK = (load >> smValue);
+      isOK = static_cast<bool>(load >> smValue);
     }
     if (isOK) {
       std::istringstream tmp(smValue);
@@ -433,15 +433,15 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
   if ( !hasLocalSize && !option_or_sm.empty() )
     _minSize = atof( option_or_sm.c_str() );
 
-  isOK = ( load >> _quadAllowed );
+  isOK = static_cast<bool>( load >> _quadAllowed );
   if ( !isOK )
     _quadAllowed = GetDefaultQuadAllowed();
 
-  isOK = ( load >> _surfaceCurvature );
+  isOK = static_cast<bool>( load >> _surfaceCurvature );
   if ( !isOK )
     _surfaceCurvature = GetDefaultSurfaceCurvature();
 
-  isOK = ( load >> _fuseEdges );
+  isOK = static_cast<bool>( load >> _fuseEdges );
   if ( !isOK )
     _fuseEdges = GetDefaultFuseEdges();