1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : GHS3DPRLPlugin_Hypothesis.hxx
22 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
25 #ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
26 #define _GHS3DPRLPlugin_Hypothesis_HXX_
28 #include "GHS3DPRLPlugin_Defs.hxx"
30 #include "SMESH_Hypothesis.hxx"
31 #include "Utils_SALOME_Exception.hxx"
33 // Parameters for work of GHS3DPRL
36 class GHS3DPRLPLUGIN_EXPORT GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
40 GHS3DPRLPlugin_Hypothesis(int hypId, SMESH_Gen* gen);
42 static const char* GetHypType() { return "MG-Tetra Parallel Parameters"; }
44 void SetMEDName(std::string theVal);
45 std::string GetMEDName() const { return _MEDName; }
47 void SetNbPart(int theVal);
48 int GetNbPart() const { return _NbPart; }
50 void SetKeepFiles(bool theVal);
51 bool GetKeepFiles() const { return _KeepFiles; }
53 void SetBackground(bool theVal);
54 bool GetBackground() const { return _Background; }
56 void SetMultithread(bool theVal);
57 bool GetMultithread() const { return _Multithread; }
59 //ToMergeSubdomains ToTagSubdomains ToOutputInterfaces ToDiscardSubdomains
60 void SetGradation(float theVal);
61 float GetGradation() const { return _Gradation; }
63 void SetMinSize(float theVal);
64 float GetMinSize() const { return _MinSize; }
66 void SetMaxSize(float theVal);
67 float GetMaxSize() const { return _MaxSize; }
69 void SetAdvancedOption(const char* theOptAndVals );
70 std::string GetAdvancedOption() const { return _AdvOptions; }
72 // the parameters default values
74 static std::string GetDefaultMEDName();
75 static int GetDefaultNbPart();
76 static bool GetDefaultKeepFiles();
77 static bool GetDefaultBackground();
78 static bool GetDefaultMultithread();
79 static float GetDefaultGradation();
80 static float GetDefaultMinSize();
81 static float GetDefaultMaxSize();
84 virtual std::ostream& SaveTo(std::ostream& save);
85 virtual std::istream& LoadFrom(std::istream& load);
89 * \param theMesh - the built mesh
90 * \param theShape - the geometry of interest
91 * \retval bool - always false
93 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
95 * \brief Initialize my parameter values by default parameters.
96 * \retval bool - true if parameter values have been successfully defined
98 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
105 std::string _MEDName; // generic path/name of med files
106 int _NbPart; // number of partitions
107 bool _KeepFiles; // keep intermediates tepal files or not
108 bool _Background; // mg-tetra_hpc in background
109 bool _Multithread; // launch mg-tetra_hpc multithread version, else mpi version
113 std::string _AdvOptions;