Salome HOME
Fix bos #26435 MG-Tetra_HPC failed with new licence mechanism:
[plugins/ghs3dprlplugin.git] / src / GHS3DPRLPlugin / GHS3DPRLPlugin_Hypothesis.hxx
old mode 100755 (executable)
new mode 100644 (file)
index 7dd85b3..5051e56
@@ -1,40 +1,53 @@
-//  Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021  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.
+// 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, 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
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // ---
 // File   : GHS3DPRLPlugin_Hypothesis.hxx
 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
 // ---
-
+//
 #ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
 #define _GHS3DPRLPlugin_Hypothesis_HXX_
 
+#include "GHS3DPRLPlugin_Defs.hxx"
+
 #include "SMESH_Hypothesis.hxx"
 #include "Utils_SALOME_Exception.hxx"
+#include <TCollection_AsciiString.hxx>
 
 //  Parameters for work of GHS3DPRL
 //
 
-class GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
+class GHS3DPRLPLUGIN_EXPORT GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
 {
 public:
 
-  GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
+  GHS3DPRLPlugin_Hypothesis(int hypId, SMESH_Gen* gen);
+
+  static const char* GetHypType() { return "MG-Tetra Parallel Parameters"; }
+
+  static std::string DefaultWorkingDirectory();
+
+  /*!
+   * \brief Return a unique file name
+   */
+  static std::string GetFileName(const GHS3DPRLPlugin_Hypothesis* hyp);
 
   void                  SetMEDName(std::string theVal);
   std::string           GetMEDName() const { return _MEDName; }
@@ -48,8 +61,21 @@ public:
   void                  SetBackground(bool theVal);
   bool                  GetBackground() const { return _Background; }
 
-  void                  SetToMeshHoles(bool theVal);
-  bool                  GetToMeshHoles() const { return _ToMeshHoles; }
+  void                  SetMultithread(bool theVal);
+  bool                  GetMultithread() const { return _Multithread; }
+
+  //ToMergeSubdomains ToTagSubdomains ToOutputInterfaces ToDiscardSubdomains
+  void                  SetGradation(float theVal);
+  float                 GetGradation() const { return _Gradation; }
+
+  void                  SetMinSize(float theVal);
+  float                 GetMinSize() const { return _MinSize; }
+
+  void                  SetMaxSize(float theVal);
+  float                 GetMaxSize() const { return _MaxSize; }
+
+  void                  SetAdvancedOption(const char* theOptAndVals );
+  std::string           GetAdvancedOption() const { return _AdvOptions; }
 
   // the parameters default values
 
@@ -57,13 +83,14 @@ public:
   static int            GetDefaultNbPart();
   static bool           GetDefaultKeepFiles();
   static bool           GetDefaultBackground();
-  static bool           GetDefaultToMeshHoles();
+  static bool           GetDefaultMultithread();
+  static float          GetDefaultGradation();
+  static float          GetDefaultMinSize();
+  static float          GetDefaultMaxSize();
 
   // Persistence
   virtual std::ostream& SaveTo(std::ostream& save);
   virtual std::istream& LoadFrom(std::istream& load);
-  friend std::ostream&  operator <<(std::ostream& save, GHS3DPRLPlugin_Hypothesis& hyp);
-  friend std::istream&  operator >>(std::istream& load, GHS3DPRLPlugin_Hypothesis& hyp);
 
   /*!
    * \brief Does nothing
@@ -79,15 +106,19 @@ public:
   virtual bool          SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
 
 private:
-  int          _countSubMesh;
-  int          _countTotal;
-  int          _nodeRefNumber;
-
-  std::string  _MEDName;     // generic path/name of med files
-  int          _NbPart;      // number of partitions
-  bool         _KeepFiles;   // keep intermediates tepal files or not
-  bool         _Background;  // tepal in background
-  bool         _ToMeshHoles;
-};
+  int         _countSubMesh;
+  int         _countTotal;
+  int         _nodeRefNumber;
+
+  std::string _MEDName;     // generic path/name of med files
+  int         _NbPart;      // number of partitions
+  bool        _KeepFiles;   // keep intermediates tepal files or not
+  bool        _Background;  // mg-tetra_hpc in background
+  bool        _Multithread; // launch mg-tetra_hpc multithread version, else mpi version
+  float       _Gradation;
+  float       _MinSize;
+  float       _MaxSize;
+  std::string _AdvOptions;
+  };
 
 #endif