Salome HOME
updated copyright message
[plugins/hybridplugin.git] / src / HYBRIDPlugin / HYBRIDPlugin_HYBRID.hxx
index 0dc458e243583afb39c365bf099fca6935c2b6cb..b289f247daa5e8ccdc6ca0ec089c2427c0825e68 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2004-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D
 //
 // 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
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//=============================================================================
-// File      : GHS3DPlugin_GHS3D.hxx
-// Author    : Edward AGAPOV, modified by Lioka RAZAFINDRAZAKA (CEA) 09/02/2007
-// Project   : SALOME
-//=============================================================================
+// ---
+// File   : HYBRIDPlugin_HYBRID.hxx
+// Author : Christian VAN WAMBEKE (CEA) (from GHS3D plugin V730)
+// ---
 //
-#ifndef _GHS3DPlugin_GHS3D_HXX_
-#define _GHS3DPlugin_GHS3D_HXX_
+#ifndef _HYBRIDPlugin_HYBRID_HXX_
+#define _HYBRIDPlugin_HYBRID_HXX_
 
 #include "SMESH_Algo.hxx"
 #include "SMESH_Gen.hxx"
 #include <map>
 #include <vector>
 
-extern "C"
-{
-  #include "libmesh5.h"
-}
-
-#ifndef GMFVERSION
-#define GMFVERSION GmfDouble
-#endif
-#define GMFDIMENSION 3
-
-class GHS3DPlugin_Hypothesis;
+class HYBRIDPlugin_Hypothesis;
 class SMDS_MeshNode;
 class SMESH_Mesh;
 class StdMeshers_ViscousLayers;
@@ -51,11 +40,11 @@ class TCollection_AsciiString;
 class _Ghs2smdsConvertor;
 class TopoDS_Shape;
 
-class GHS3DPlugin_GHS3D: public SMESH_3D_Algo
+class HYBRIDPlugin_HYBRID: public SMESH_3D_Algo
 {
 public:
-  GHS3DPlugin_GHS3D(int hypId, int studyId, SMESH_Gen* gen);
-  virtual ~GHS3DPlugin_GHS3D();
+  HYBRIDPlugin_HYBRID(int hypId, SMESH_Gen* gen);
+  virtual ~HYBRIDPlugin_HYBRID();
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
                                const TopoDS_Shape& aShape,
@@ -65,7 +54,7 @@ public:
                        const TopoDS_Shape& aShape);
 
   virtual void CancelCompute();
-  bool         computeCanceled() { return _compute_canceled;};
+  bool         computeCanceled() { return _computeCanceled; }
 
   virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
                         MapShapeNbElems& aResMap);
@@ -79,17 +68,20 @@ public:
 
   bool         importGMFMesh(const char* aGMFFileName, SMESH_Mesh& aMesh);
 
-  static const char* Name() { return "GHS3D_3D"; }
+  static const char* Name() { return "HYBRID_3D"; }
+
+  const HYBRIDPlugin_Hypothesis* getHyp() {return _hyp ;}
 
 protected:
-  const GHS3DPlugin_Hypothesis*   _hyp;
-  const StdMeshers_ViscousLayers* _viscousLayersHyp;
+  const HYBRIDPlugin_Hypothesis*   _hyp;
+  //const StdMeshers_ViscousLayers* _viscousLayersHyp;
   std::string                     _genericName;
    
 private:
 
-  bool         storeErrorDescription(const TCollection_AsciiString& logFile,
-                                     const _Ghs2smdsConvertor &     toSmdsConvertor );
+  bool         storeErrorDescription(const char*                logFile,
+                                     const std::string&         log,
+                                     const _Ghs2smdsConvertor & toSmdsConvertor );
   TopoDS_Shape entryToShape(std::string entry);
   
   int  _iShape;
@@ -97,14 +89,10 @@ private:
   bool _keepFiles;
   bool _removeLogOnSuccess;
   bool _logInStandardOutput;
-  SALOMEDS::Study_var myStudy;
-  SMESH_Gen_i* smeshGen_i;
-
-  volatile bool _compute_canceled;
 };
 
 /*!
- * \brief Convertor of GHS3D elements to SMDS ones
+ * \brief Convertor of HYBRID elements to SMDS ones
  */
 class _Ghs2smdsConvertor
 {