Salome HOME
updated copyright message
[plugins/ghs3dplugin.git] / idl / GHS3DPlugin_Algorithm.idl
index 8af4f1e746900b8f30cea2f87e1497f5f85c022a..9638c13772a8c9c1bc1e5087f319590fee9f1045 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2004-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2004-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
@@ -19,7 +19,6 @@
 
 //  File   : GHS3D_Algorithm.idl
 //  Author : Julia DOROVSKIKH
-//  $Header$
 //
 #ifndef _GHS3D_Algorithm_IDL_
 #define _GHS3D_Algorithm_IDL_
@@ -33,6 +32,8 @@
  */
 module GHS3DPlugin
 {
+  typedef sequence<string> string_array;
+
   typedef sequence<double,3> TCoords;
   struct GHS3DEnforcedVertex {
     string name;
@@ -50,13 +51,12 @@ module GHS3DPlugin
     string entry;
     SMESH::ElementType elementType;
     string groupName;
-    double size;
   };
   
   typedef sequence<GHS3DEnforcedMesh> GHS3DEnforcedMeshList;
 
   /*!
-   * GHS3DPlugin_GHS3D: interface of "Tetrahedron (GHS3D)" algorithm
+   * GHS3DPlugin_GHS3D: interface of "MG-Tetra" algorithm
    */
   interface GHS3DPlugin_GHS3D : SMESH::SMESH_3D_Algo
   {
@@ -64,7 +64,7 @@ module GHS3DPlugin
   };
 
   /*!
-   * Parameters of "Tetrahedron (GHS3D)" algorithm
+   * Parameters of "MG-Tetra" algorithm
    */
   interface GHS3DPlugin_Hypothesis : SMESH::SMESH_Hypothesis
   {
@@ -73,24 +73,76 @@ module GHS3DPlugin
      */
     void SetToMeshHoles(in boolean toMesh);
     boolean GetToMeshHoles();
+    /*!
+     *Set lower boundary of mesh element size
+     */
+    void SetMinSize(in double theMinSize);
+    double GetMinSize();
+    /*!
+     *Set upper boundary of mesh element size
+     */
+    void SetMaxSize(in double theMaxSize);
+    double GetMaxSize();
+    /*!
+     *  Activate/deactivate volume proximity computation
+     */
+    void SetVolumeProximity( in boolean toUse );
+    boolean GetVolumeProximity();
+    /*!
+     * Set number of surface element layers to be generated due to volume proximity
+     */
+    void SetNbVolumeProximityLayers( in short nbLayers );
+    short GetNbVolumeProximityLayers();
+    /*!
+     * To make groups of volumes of different domains when mesh is generated from skin.
+     * Default is to make groups.
+     * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
+     */
+    void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
+    boolean GetToMakeGroupsOfDomains();
     /*!
      * Maximal size of memory to be used by the algorithm (in Megabytes).
      * Negative value means not to use this option
      */
-    void SetMaximumMemory(in short MB) raises (SALOME::SALOME_Exception);
-    short GetMaximumMemory();
+    void SetMaximumMemory(in float MB) raises (SALOME::SALOME_Exception);
+    float GetMaximumMemory();
     /*!
      * Initial size of memory to be used by the algorithm (in Megabytes) in
      * automatic memory adjustment mode. Default is zero.
      * Negative value means not to use this option
      */
-    void SetInitialMemory(in short MB) raises (SALOME::SALOME_Exception);
-    short GetInitialMemory();
+    void SetInitialMemory(in float MB) raises (SALOME::SALOME_Exception);
+    float GetInitialMemory();
     /*!
      * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
      */
     void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
     short GetOptimizationLevel();
+    /*!
+     * Algorithm selection: 0-MGTetra HPC, 1-MGTetra
+     */
+    void SetAlgorithm(in short level) raises (SALOME::SALOME_Exception);
+    short GetAlgorithm();
+    /*!
+     * Set use number of threads
+     */
+    void SetUseNumOfThreads(in boolean setThread) raises (SALOME::SALOME_Exception);
+    boolean GetUseNumOfThreads();
+    /*!
+     * Set number of threads to use
+     */
+    void SetNumOfThreads(in short numThreads);
+    short GetNumOfThreads();
+     /*!
+     * PThreadMode defined for MGTetra
+     */
+    void SetPthreadMode(in short pThreadMode) raises (SALOME::SALOME_Exception);
+    short GetPthreadMode();
+     /*!
+     * ParallelMode defined for MGTetra HPC
+     */
+    void SetParallelMode(in short parallelMode) raises (SALOME::SALOME_Exception);
+    short GetParallelMode();
     /*!
      * Path to working directory
      */
@@ -138,10 +190,53 @@ module GHS3DPlugin
     void SetToRemoveCentralPoint(in boolean toRemove);
     boolean GetToRemoveCentralPoint();
     /*!
-     * To set hiden/undocumented/advanced options
+     * To define the volumic gradation
      */
-    void SetTextOption(in string option);
-    string GetTextOption();
+    void SetGradation(in double gradation);
+    double GetGradation();
+    /*!
+     * Print log in standard output
+     */
+    void SetStandardOutputLog(in boolean logInStandardOutput);
+    boolean GetStandardOutputLog();
+    /*!
+    * Remove log file on success
+    */
+    void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
+    boolean GetRemoveLogOnSuccess();
+    /*!
+     * Set advanced option value
+     */
+    void SetOptionValue(in string optionName,
+                        in string optionValue) raises (SALOME::SALOME_Exception);
+    string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
+    void UnsetOption(in string optionName);
+    /*!
+     * Adds custom advanced option and its value
+     */
+    void SetAdvancedOption(in string optionsAndValues) // in a form "option_1 v1 option_2 v2'"
+      raises (SALOME::SALOME_Exception);
+    string GetAdvancedOption();
+    void AddOption(in string optionName, in string optionValue);
+    string GetOption(in string optionName);
+    void SetTextOption(in string option); // obsolete
+    string GetTextOption(); // obsolete
+    /*!
+     * Return array of strings each of which is option name concatenated
+     * with option value devided by semicolon - "option_name:option_value:option_type".
+     * Option value is empty if an option is not set.
+     * option_type: 1 if user-define, 0 if default
+     * Note: the method is mostly for interaction with GUI.
+     */
+    string_array GetOptionValues();
+    string_array GetAdvancedOptionValues();
+    /*!
+     * Set option values each in the form "option_name[:option_value][:option_type]".
+     * Note: the method is mostly for interaction with GUI.
+     */
+    void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
+    void SetAdvancedOptionValues(in string_array options);
+
     /*!
      * To set an enforced vertex
      */
@@ -166,16 +261,68 @@ module GHS3DPlugin
     
     boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
     boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
+    
+    /* OBSOLETE FUNCTIONS */
     boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
     boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
+    /* OBSOLETE FUNCTIONS */
+    
     GHS3DEnforcedMeshList GetEnforcedMeshes();
     void ClearEnforcedMeshes();
+
    /*!
     * Set/get/unset an enforced vertex (private method for GUI)
     */
-    boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType,
-                             in double size,  in string groupName) raises (SALOME::SALOME_Exception);
+    boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
+
+    // GUI methods
+    double GetMaxSizeDefault();
+    double GetMinSizeDefault();
+    void SetMinMaxSizeDefault( in double theMinSize, in double theMaxSize );
+  };
+
+  /*!
+   * GHS3DPlugin_Optimizer: interface of "MG-Tetra Optimization" algorithm
+   */
+  interface GHS3DPlugin_Optimizer : SMESH::SMESH_3D_Algo
+  {
   };
+
+  enum PThreadsMode { SAFE, AGGRESSIVE, NONE };
+  enum Mode { NO, YES, ONLY };
+
+  /*!
+   * Parameters of "MG-Tetra Optimization" algorithm
+   *
+   * params inherited from GHS3DPlugin_Hypothesis:
+   * - create new nodes
+   * - optimization level
+   * - init and max memory
+   * - work dir
+   * - verbosity
+   * - log to file
+   * - keep work files
+   * - remove log file
+   * - advanced options
+   */
+  interface GHS3DPlugin_OptimizerHypothesis: GHS3DPlugin_Hypothesis
+  {
+    void SetOptimization( in Mode optMode );
+    Mode GetOptimization();
+
+    void SetSplitOverConstrained( in Mode ovcMode );
+    Mode GetSplitOverConstrained();
+
+    void SetSmoothOffSlivers( in boolean toSmooth );
+    boolean GetSmoothOffSlivers();
+
+    void SetPThreadsMode( in PThreadsMode mode );
+    PThreadsMode GetPThreadsMode();
+
+    void SetMaximalNumberOfThreads( in short nb );
+    short GetMaximalNumberOfThreads();
+  };
+
 };
 
 #endif