Salome HOME
Update copyrights
[plugins/ghs3dplugin.git] / idl / GHS3DPlugin_Algorithm.idl
1 // Copyright (C) 2004-2019  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : GHS3D_Algorithm.idl
21 //  Author : Julia DOROVSKIKH
22 //
23 #ifndef _GHS3D_Algorithm_IDL_
24 #define _GHS3D_Algorithm_IDL_
25
26 #include "SALOME_Exception.idl"
27 #include "SMESH_Hypothesis.idl"
28 #include "SMESH_Mesh.idl"
29
30 /*!
31  * GHS3DPlugin: interfaces to GHS3D related hypotheses and algorithms
32  */
33 module GHS3DPlugin
34 {
35   typedef sequence<double,3> TCoords;
36   struct GHS3DEnforcedVertex {
37     string name;
38     string geomEntry;
39     boolean isCompound;
40     TCoords coords;
41     string groupName;
42     double size;
43   };
44   
45   typedef sequence<GHS3DEnforcedVertex> GHS3DEnforcedVertexList;
46
47   struct GHS3DEnforcedMesh {
48     string name;
49     string entry;
50     SMESH::ElementType elementType;
51     string groupName;
52   };
53   
54   typedef sequence<GHS3DEnforcedMesh> GHS3DEnforcedMeshList;
55
56   /*!
57    * GHS3DPlugin_GHS3D: interface of "MG-Tetra" algorithm
58    */
59   interface GHS3DPlugin_GHS3D : SMESH::SMESH_3D_Algo
60   {
61     SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
62   };
63
64   /*!
65    * Parameters of "MG-Tetra" algorithm
66    */
67   interface GHS3DPlugin_Hypothesis : SMESH::SMESH_Hypothesis
68   {
69     /*!
70      * To mesh "holes" in a solid or not. Default is to mesh.
71      */
72     void SetToMeshHoles(in boolean toMesh);
73     boolean GetToMeshHoles();
74     /*!
75      * To make groups of volumes of different domains when mesh is generated from skin.
76      * Default is to make groups.
77      * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
78      */
79     void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
80     boolean GetToMakeGroupsOfDomains();
81     /*!
82      * Maximal size of memory to be used by the algorithm (in Megabytes).
83      * Negative value means not to use this option
84      */
85     void SetMaximumMemory(in float MB) raises (SALOME::SALOME_Exception);
86     float GetMaximumMemory();
87     /*!
88      * Initial size of memory to be used by the algorithm (in Megabytes) in
89      * automatic memory adjustment mode. Default is zero.
90      * Negative value means not to use this option
91      */
92     void SetInitialMemory(in float MB) raises (SALOME::SALOME_Exception);
93     float GetInitialMemory();
94     /*!
95      * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
96      */
97     void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
98     short GetOptimizationLevel();
99     /*!
100      * Path to working directory
101      */
102     void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
103     string GetWorkingDirectory();
104     /*!
105      * To keep working files or remove them. Log file remains in case of errors anyway.
106      */
107     void SetKeepFiles(in boolean toKeep);
108     boolean GetKeepFiles();
109     /*!
110      * Verbose level [0-10]
111      *  0 - no standard output,
112      *  2 - prints the data, quality statistics of the skin and final meshes and
113      *     indicates when the final mesh is being saved. In addition the software
114      *     gives indication regarding the CPU time.
115      * 10 - same as 2 plus the main steps in the computation, quality statistics
116      *     histogram of the skin mesh, quality statistics histogram together with
117      *     the characteristics of the final mesh.
118      */
119     void SetVerboseLevel(in short level);
120     short GetVerboseLevel();
121     /*!
122      * To create new nodes
123      */
124     void SetToCreateNewNodes(in boolean toCreate);
125     boolean GetToCreateNewNodes();
126     /*!
127      * To use boundary recovery version which tries to create mesh on a very poor
128      * quality surface mesh
129      */
130     void SetToUseBoundaryRecoveryVersion(in boolean toUse);
131     boolean GetToUseBoundaryRecoveryVersion();
132     /*!
133      * Applies finite-element correction by replacing overconstrained elements where
134      * it is possible. The process is cutting first the overconstrained edges and
135      * second the overconstrained facets. This insure that no edges have two boundary
136      * vertices and that no facets have three boundary vertices.
137      */
138     void SetFEMCorrection(in boolean toUseFem);
139     boolean GetFEMCorrection();
140     /*!
141      * To removes initial central point.
142      */
143     void SetToRemoveCentralPoint(in boolean toRemove);
144     boolean GetToRemoveCentralPoint();
145     /*!
146      * To set hiden/undocumented/advanced options
147      */
148     void SetAdvancedOption(in string option);
149     string GetAdvancedOption();
150     void SetTextOption(in string option); // obsolete
151     string GetTextOption();
152     /*!
153      * To define the volumic gradation
154      */
155     void SetGradation(in double gradation);
156     double GetGradation();
157     /*!
158      * Print log in standard output
159      */
160     void SetStandardOutputLog(in boolean logInStandardOutput);
161     boolean GetStandardOutputLog();
162     /*!
163     * Remove log file on success
164     */
165     void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
166     boolean GetRemoveLogOnSuccess();
167     /*!
168      * To set an enforced vertex
169      */
170     boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
171     boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
172     boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
173     boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
174     boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
175     boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
176     double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
177     double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
178     boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
179     boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
180     GHS3DEnforcedVertexList GetEnforcedVertices();
181     void ClearEnforcedVertices();
182    /*!
183     * Set/get/unset an enforced vertex (private method for GUI)
184     */
185     boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
186                              in string theVertexName, in string theVertexEntry, in string groupName,
187                              in boolean isCompound) raises (SALOME::SALOME_Exception);
188     
189     boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
190     boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
191     
192     /* OBSOLETE FUNCTIONS */
193     boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
194     boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
195     /* OBSOLETE FUNCTIONS */
196     
197     GHS3DEnforcedMeshList GetEnforcedMeshes();
198     void ClearEnforcedMeshes();
199
200    /*!
201     * Set/get/unset an enforced vertex (private method for GUI)
202     */
203     boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
204   };
205
206   /*!
207    * GHS3DPlugin_Optimizer: interface of "MG-Tetra Optimization" algorithm
208    */
209   interface GHS3DPlugin_Optimizer : SMESH::SMESH_3D_Algo
210   {
211   };
212
213   enum PThreadsMode { SAFE, AGGRESSIVE, NONE };
214   enum Mode { NO, YES, ONLY };
215
216   /*!
217    * Parameters of "MG-Tetra Optimization" algorithm
218    *
219    * params inherited from GHS3DPlugin_Hypothesis:
220    * - create new nodes
221    * - optimization level
222    * - init and max memory
223    * - work dir
224    * - verbosity
225    * - log to file
226    * - keep work files
227    * - remove log file
228    * - advanced options
229    */
230   interface GHS3DPlugin_OptimizerHypothesis: GHS3DPlugin_Hypothesis
231   {
232     void SetOptimization( in Mode optMode );
233     Mode GetOptimization();
234
235     void SetSplitOverConstrained( in Mode ovcMode );
236     Mode GetSplitOverConstrained();
237
238     void SetSmoothOffSlivers( in boolean toSmooth );
239     boolean GetSmoothOffSlivers();
240
241     void SetPThreadsMode( in PThreadsMode mode );
242     PThreadsMode GetPThreadsMode();
243
244     void SetMaximalNumberOfThreads( in short nb );
245     short GetMaximalNumberOfThreads();
246   };
247
248 };
249
250 #endif