1 // Copyright (C) 2004-2023 CEA, EDF
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
20 // File : GHS3D_Algorithm.idl
21 // Author : Julia DOROVSKIKH
23 #ifndef _GHS3D_Algorithm_IDL_
24 #define _GHS3D_Algorithm_IDL_
26 #include "SALOME_Exception.idl"
27 #include "SMESH_Hypothesis.idl"
28 #include "SMESH_Mesh.idl"
31 * GHS3DPlugin: interfaces to GHS3D related hypotheses and algorithms
35 typedef sequence<string> string_array;
37 typedef sequence<double,3> TCoords;
38 struct GHS3DEnforcedVertex {
47 typedef sequence<GHS3DEnforcedVertex> GHS3DEnforcedVertexList;
49 struct GHS3DEnforcedMesh {
52 SMESH::ElementType elementType;
56 typedef sequence<GHS3DEnforcedMesh> GHS3DEnforcedMeshList;
59 * GHS3DPlugin_GHS3D: interface of "MG-Tetra" algorithm
61 interface GHS3DPlugin_GHS3D : SMESH::SMESH_3D_Algo
63 SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
67 * Parameters of "MG-Tetra" algorithm
69 interface GHS3DPlugin_Hypothesis : SMESH::SMESH_Hypothesis
72 * To mesh "holes" in a solid or not. Default is to mesh.
74 void SetToMeshHoles(in boolean toMesh);
75 boolean GetToMeshHoles();
77 *Set lower boundary of mesh element size
79 void SetMinSize(in double theMinSize);
82 *Set upper boundary of mesh element size
84 void SetMaxSize(in double theMaxSize);
87 * Activate/deactivate volume proximity computation
89 void SetVolumeProximity( in boolean toUse );
90 boolean GetVolumeProximity();
92 * Set number of surface element layers to be generated due to volume proximity
94 void SetNbVolumeProximityLayers( in short nbLayers );
95 short GetNbVolumeProximityLayers();
97 * To make groups of volumes of different domains when mesh is generated from skin.
98 * Default is to make groups.
99 * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
101 void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
102 boolean GetToMakeGroupsOfDomains();
104 * Maximal size of memory to be used by the algorithm (in Megabytes).
105 * Negative value means not to use this option
107 void SetMaximumMemory(in float MB) raises (SALOME::SALOME_Exception);
108 float GetMaximumMemory();
110 * Initial size of memory to be used by the algorithm (in Megabytes) in
111 * automatic memory adjustment mode. Default is zero.
112 * Negative value means not to use this option
114 void SetInitialMemory(in float MB) raises (SALOME::SALOME_Exception);
115 float GetInitialMemory();
117 * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
119 void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
120 short GetOptimizationLevel();
122 * Algorithm selection: 0-MGTetra HPC, 1-MGTetra
124 void SetAlgorithm(in short level) raises (SALOME::SALOME_Exception);
125 short GetAlgorithm();
127 * Set use number of threads
129 void SetUseNumOfThreads(in boolean setThread) raises (SALOME::SALOME_Exception);
130 boolean GetUseNumOfThreads();
132 * Set number of threads to use
134 void SetNumOfThreads(in short numThreads);
135 short GetNumOfThreads();
137 * PThreadMode defined for MGTetra
139 void SetPthreadMode(in short pThreadMode) raises (SALOME::SALOME_Exception);
140 short GetPthreadMode();
142 * ParallelMode defined for MGTetra HPC
144 void SetParallelMode(in short parallelMode) raises (SALOME::SALOME_Exception);
145 short GetParallelMode();
147 * Path to working directory
149 void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
150 string GetWorkingDirectory();
152 * To keep working files or remove them. Log file remains in case of errors anyway.
154 void SetKeepFiles(in boolean toKeep);
155 boolean GetKeepFiles();
157 * Verbose level [0-10]
158 * 0 - no standard output,
159 * 2 - prints the data, quality statistics of the skin and final meshes and
160 * indicates when the final mesh is being saved. In addition the software
161 * gives indication regarding the CPU time.
162 * 10 - same as 2 plus the main steps in the computation, quality statistics
163 * histogram of the skin mesh, quality statistics histogram together with
164 * the characteristics of the final mesh.
166 void SetVerboseLevel(in short level);
167 short GetVerboseLevel();
169 * To create new nodes
171 void SetToCreateNewNodes(in boolean toCreate);
172 boolean GetToCreateNewNodes();
174 * To use boundary recovery version which tries to create mesh on a very poor
175 * quality surface mesh
177 void SetToUseBoundaryRecoveryVersion(in boolean toUse);
178 boolean GetToUseBoundaryRecoveryVersion();
180 * Applies finite-element correction by replacing overconstrained elements where
181 * it is possible. The process is cutting first the overconstrained edges and
182 * second the overconstrained facets. This insure that no edges have two boundary
183 * vertices and that no facets have three boundary vertices.
185 void SetFEMCorrection(in boolean toUseFem);
186 boolean GetFEMCorrection();
188 * To removes initial central point.
190 void SetToRemoveCentralPoint(in boolean toRemove);
191 boolean GetToRemoveCentralPoint();
193 * To define the volumic gradation
195 void SetGradation(in double gradation);
196 double GetGradation();
198 * Print log in standard output
200 void SetStandardOutputLog(in boolean logInStandardOutput);
201 boolean GetStandardOutputLog();
203 * Remove log file on success
205 void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
206 boolean GetRemoveLogOnSuccess();
208 * Set advanced option value
210 void SetOptionValue(in string optionName,
211 in string optionValue) raises (SALOME::SALOME_Exception);
212 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
213 void UnsetOption(in string optionName);
215 * Adds custom advanced option and its value
217 void SetAdvancedOption(in string optionsAndValues) // in a form "option_1 v1 option_2 v2'"
218 raises (SALOME::SALOME_Exception);
219 string GetAdvancedOption();
220 void AddOption(in string optionName, in string optionValue);
221 string GetOption(in string optionName);
222 void SetTextOption(in string option); // obsolete
223 string GetTextOption(); // obsolete
225 * Return array of strings each of which is option name concatenated
226 * with option value devided by semicolon - "option_name:option_value:option_type".
227 * Option value is empty if an option is not set.
228 * option_type: 1 if user-define, 0 if default
229 * Note: the method is mostly for interaction with GUI.
231 string_array GetOptionValues();
232 string_array GetAdvancedOptionValues();
234 * Set option values each in the form "option_name[:option_value][:option_type]".
235 * Note: the method is mostly for interaction with GUI.
237 void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
238 void SetAdvancedOptionValues(in string_array options);
241 * To set an enforced vertex
243 boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
244 boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
245 boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
246 boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
247 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
248 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
249 double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
250 double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
251 boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
252 boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
253 GHS3DEnforcedVertexList GetEnforcedVertices();
254 void ClearEnforcedVertices();
256 * Set/get/unset an enforced vertex (private method for GUI)
258 boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
259 in string theVertexName, in string theVertexEntry, in string groupName,
260 in boolean isCompound) raises (SALOME::SALOME_Exception);
262 boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
263 boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
265 /* OBSOLETE FUNCTIONS */
266 boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
267 boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
268 /* OBSOLETE FUNCTIONS */
270 GHS3DEnforcedMeshList GetEnforcedMeshes();
271 void ClearEnforcedMeshes();
274 * Set/get/unset an enforced vertex (private method for GUI)
276 boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
279 double GetMaxSizeDefault();
280 double GetMinSizeDefault();
281 void SetMinMaxSizeDefault( in double theMinSize, in double theMaxSize );
285 * GHS3DPlugin_Optimizer: interface of "MG-Tetra Optimization" algorithm
287 interface GHS3DPlugin_Optimizer : SMESH::SMESH_3D_Algo
291 enum PThreadsMode { SAFE, AGGRESSIVE, NONE };
292 enum Mode { NO, YES, ONLY };
295 * Parameters of "MG-Tetra Optimization" algorithm
297 * params inherited from GHS3DPlugin_Hypothesis:
299 * - optimization level
300 * - init and max memory
308 interface GHS3DPlugin_OptimizerHypothesis: GHS3DPlugin_Hypothesis
310 void SetOptimization( in Mode optMode );
311 Mode GetOptimization();
313 void SetSplitOverConstrained( in Mode ovcMode );
314 Mode GetSplitOverConstrained();
316 void SetSmoothOffSlivers( in boolean toSmooth );
317 boolean GetSmoothOffSlivers();
319 void SetPThreadsMode( in PThreadsMode mode );
320 PThreadsMode GetPThreadsMode();
322 void SetMaximalNumberOfThreads( in short nb );
323 short GetMaximalNumberOfThreads();