Salome HOME
updated copyright message
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPluginBuilder.py
1 # Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
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 ##
21 # @package NETGENPluginBuilder
22 # Python API for the NETGEN meshing plug-in module.
23
24 from salome.smesh.smesh_algorithm import Mesh_Algorithm
25 from salome.smesh.smeshBuilder import AssureGeomPublished, ParseParameters, IsEqual
26
27 # import NETGENPlugin module if possible
28 noNETGENPlugin = 0
29 try:
30     import NETGENPlugin
31 except ImportError:
32     noNETGENPlugin = 1
33     pass
34
35 LIBRARY = "libNETGENEngine.so"
36
37 NETGEN_VERSION_MAJOR = NETGENPlugin.NETGEN_VERSION_MAJOR
38
39 #----------------------------
40 # Mesh algo type identifiers
41 #----------------------------
42
43 ## Algorithm type: Netgen tetrahedron 3D algorithm, see NETGEN_3D_Algorithm
44 NETGEN_3D     = "NETGEN_3D"
45 NETGEN_3D_Remote     = "NETGEN_3D_Remote"
46 ## Algorithm type: Netgen tetrahedron 1D-2D-3D algorithm, see NETGEN_1D2D3D_Algorithm
47 NETGEN_1D2D3D = "NETGEN_2D3D"
48 ## Algorithm type: Netgen triangle 1D-2D algorithm, see NETGEN_1D2D_Algorithm
49 NETGEN_1D2D   = "NETGEN_2D"
50 ## Algorithm type: Netgen triangle 2D algorithm, see NETGEN_2D_Only_Algorithm
51 NETGEN_2D     = "NETGEN_2D_ONLY"
52 ## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
53 NETGEN_FULL   = NETGEN_1D2D3D
54 ## Algorithm type: Synonim of NETGEN_3D, see NETGEN_3D_Algorithm
55 NETGEN        = NETGEN_3D
56 ## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
57 FULL_NETGEN   = NETGEN_FULL
58
59 #----------------------------
60 # Hypothesis type enumeration
61 #----------------------------
62
63 ## Hypothesis type enumeration: complex hypothesis
64 #  (full set of parameters can be specified),
65 #  see NETGEN_Algorithm.Parameters()
66 SOLE   = 0
67 ## Hypothesis type enumeration: simple hypothesis
68 #  (only major parameters are specified),
69 #  see NETGEN_Algorithm.Parameters()
70 SIMPLE = 1
71
72 #----------------------
73 # Fineness enumeration
74 #----------------------
75
76 ## Fineness enumeration: very coarse quality of mesh,
77 #  see NETGEN_Algorithm.SetFineness()
78 VeryCoarse = 0
79 ## Fineness enumeration: coarse quality of mesh,
80 #  see NETGEN_Algorithm.SetFineness()
81 Coarse     = 1
82 ## Fineness enumeration: moderate quality of mesh,
83 #  see NETGEN_Algorithm.SetFineness()
84 Moderate   = 2
85 ## Fineness enumeration: fine quality of mesh,
86 #  see NETGEN_Algorithm.SetFineness()
87 Fine       = 3
88 ## Fineness enumeration: very fine quality of mesh,
89 #  see NETGEN_Algorithm.SetFineness()
90 VeryFine   = 4
91 ## Fineness enumeration: custom quality of mesh specified by other parameters),
92 #  see NETGEN_Algorithm.SetFineness()
93 Custom     = 5
94
95 #----------------------
96 # Algorithms
97 #----------------------
98
99 ## Base of all NETGEN algorithms.
100 #
101 #  This class provides common methods for all algorithms implemented by NETGEN plugin.
102 #  @note This class must not be instantiated directly.
103 class NETGEN_Algorithm(Mesh_Algorithm):
104
105     ## Private constructor
106     #  @param mesh parent mesh object algorithm is assigned to
107     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
108     #              if it is @c 0 (default), the algorithm is assigned to the main shape
109     def __init__(self, mesh, geom=0):
110         Mesh_Algorithm.__init__(self)
111         if noNETGENPlugin: print("Warning: NETGENPlugin module unavailable")
112         if not mesh.GetMesh().HasShapeToMesh() and \
113            self.meshMethod == "Triangle": # create a 2D remesher
114             self.Create(mesh, geom, "NETGEN_Remesher_2D", LIBRARY)
115         else:
116             self.Create(mesh, geom, self.algoType, LIBRARY)
117         self.params = None
118         pass
119
120     ## Sets @c MaxSize parameter
121     #  @param theSize new value of the @c MaxSize parameter
122     def SetMaxSize(self, theSize):
123         if self.Parameters(): self.params.SetMaxSize(theSize)
124         pass
125
126     ## Sets @c MinSize parameter
127     #  @param theSize new value of the @c MinSize parameter
128     def SetMinSize(self, theSize):
129         if self.Parameters(): self.params.SetMinSize(theSize)
130         pass
131
132     ## Sets @c Optimize flag
133     #  @param theVal new value of the @c Optimize parameter
134     def SetOptimize(self, theVal):
135         if self.Parameters(): self.params.SetOptimize(theVal)
136         pass
137
138     ## Sets @c Fineness parameter
139     #  @param theFineness new value of the @c Fineness parameter; it can be:
140     #  @ref VeryCoarse, @ref Coarse, @ref Moderate, @ref Fine, @ref VeryFine or @ref Custom
141     def SetFineness(self, theFineness):
142         if self.Parameters(): self.params.SetFineness(theFineness)
143         pass
144
145     ## Sets @c GrowthRate parameter
146     #  @param theRate new value of the @c GrowthRate parameter
147     def SetGrowthRate(self, theRate):
148         if self.Parameters(): self.params.SetGrowthRate(theRate)
149         pass
150
151     ## Sets @c NbThreads parameter
152     #  @param theRate new value of the @c NbThreads parameter
153     def SetNbThreads(self, theNumber):
154         if self.Parameters(): self.params.SetNbThreads(theNumber)
155         pass
156
157     ## Creates meshing hypothesis according to the chosen algorithm type
158     #  and initializes it with default parameters
159     #  @param which hypothesis type; can be either @ref SOLE (default) or @ref SIMPLE
160     #  @return hypothesis object
161     def Parameters(self, which=SOLE):
162         if self.algoType == NETGEN_1D2D:
163             if which == SIMPLE:
164                 hypType = "NETGEN_SimpleParameters_2D"
165             else:
166                 hypType = "NETGEN_Parameters_2D"
167         elif self.algoType == NETGEN_1D2D3D:
168             if which == SIMPLE:
169                 hypType = "NETGEN_SimpleParameters_3D"
170             else:
171                 hypType = "NETGEN_Parameters"
172         elif self.algoType == NETGEN_2D:
173             hypType = "NETGEN_Parameters_2D_ONLY"
174         else:
175             hypType = "NETGEN_Parameters_3D"
176
177         if self.algo.GetName() == "NETGEN_Remesher_2D":
178             hypType = "NETGEN_RemesherParameters_2D"
179
180         if self.params and self.params.GetName() != hypType:
181             self.mesh.RemoveHypothesis( self.params, self.geom )
182             self.params = None
183         if not self.params:
184             self.params = self.Hypothesis(hypType, [], LIBRARY, UseExisting=0)
185
186         return self.params
187
188     ## Defines a file specifying size of elements at points and lines
189     #  @param file name of the file
190     def SetMeshSizeFile(self, file):
191         self.Parameters().SetMeshSizeFile(file)
192         pass
193
194     ## Set size of elements on a shape
195     #  @param shape - geometry
196     #  @param size - element size
197     def SetLocalSizeOnShape(self, shape, size ):
198         self.Parameters().SetLocalSizeOnShape(shape, size)
199         pass
200
201
202     pass # end of NETGEN_Algorithm class
203
204
205 ## Tetrahedron 1D-2D-3D algorithm.
206 #
207 #  It can be created by calling smeshBuilder.Mesh.Tetrahedron( smeshBuilder.NETGEN_1D2D3D, geom=0 ).
208 #  This algorithm generates all 1D (edges), 2D (faces) and 3D (volumes) elements
209 #  for given geometrical shape.
210 class NETGEN_1D2D3D_Algorithm(NETGEN_Algorithm):
211
212     ## name of the dynamic method in smeshBuilder.Mesh class
213     #  @internal
214     meshMethod = "Tetrahedron"
215     ## type of algorithm used with helper function in smeshBuilder.Mesh class
216     #  @internal
217     algoType   = NETGEN_1D2D3D
218     ## doc string of the method
219     #  @internal
220     docHelper  = "Creates tetrahedron 3D algorithm for solids"
221
222     ## Private constructor.
223     #  @param mesh parent mesh object algorithm is assigned to
224     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
225     #              if it is @c 0 (default), the algorithm is assigned to the main shape
226     def __init__(self, mesh, geom=0):
227         NETGEN_Algorithm.__init__(self, mesh, geom)
228         pass
229
230     ## Sets @c SecondOrder flag
231     #  @param theVal new value of the @c SecondOrder parameter
232     def SetSecondOrder(self, theVal):
233         if self.Parameters(): self.params.SetSecondOrder(theVal)
234         pass
235
236     ## Sets @c NbSegPerEdge parameter
237     #  @param theVal new value of the @c NbSegPerEdge parameter
238     def SetNbSegPerEdge(self, theVal):
239         if self.Parameters(): self.params.SetNbSegPerEdge(theVal)
240         pass
241
242     ## Sets @c NbSegPerRadius parameter
243     #  @param theVal new value of the @c NbSegPerRadius parameter
244     def SetNbSegPerRadius(self, theVal):
245         if self.Parameters(): self.params.SetNbSegPerRadius(theVal)
246         pass
247
248     ## Sets @c ChordalError parameter
249     #  @param theVal new value of the @c ChordalError parameter
250     def SetChordalError(self, theVal):
251         if self.Parameters():
252             self.params.SetChordalError(theVal)
253             self.params.SetChordalErrorEnabled( theVal > 0 )
254         pass
255
256     ## Sets @c RidgeAngle parameter
257     #  @param theVal new value of the @c RidgeAngle parameter
258     def SetRidgeAngle(self, theVal):
259         if self.Parameters():
260             self.params.SetRidgeAngle(theVal)
261         pass
262
263     ## Sets @c QuadAllowed flag
264     #  @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
265     def SetQuadAllowed(self, toAllow=True):
266         if self.Parameters(): self.params.SetQuadAllowed(toAllow)
267         pass
268     ## Sets @c UseSurfaceCurvature flag
269     #  @param toUse new value of the @c UseSurfaceCurvature parameter (@c True by default)
270     def SetUseSurfaceCurvature(self, toUse=True):
271         if self.Parameters(): self.params.SetUseSurfaceCurvature(toUse)
272         pass
273     ## Sets @c FuseEdges flag
274     #  @param toFuse new value of the @c FuseEdges parameter (@c False by default)
275     def SetFuseEdges(self, toFuse=False):
276         if self.Parameters(): self.params.SetFuseEdges(toFuse)
277         pass
278
279     ## Sets number of segments overriding the value set by SetLocalLength()
280     #  @param theVal new value of number of segments parameter
281     def SetNumberOfSegments(self, theVal):
282         self.Parameters(SIMPLE).SetNumberOfSegments(theVal)
283         pass
284
285     ## Sets number of segments overriding the value set by SetNumberOfSegments()
286     #  @param theVal new value of local length parameter
287     def SetLocalLength(self, theVal):
288         self.Parameters(SIMPLE).SetLocalLength(theVal)
289         pass
290
291     ## Defines @c MaxElementArea parameter of @c NETGEN_SimpleParameters_3D hypothesis.
292     #  Overrides value set by LengthFromEdges()
293     #  @param area new value of @c MaxElementArea parameter
294     def MaxElementArea(self, area):
295         self.Parameters(SIMPLE).SetMaxElementArea(area)
296         pass
297
298     ## Defines @c LengthFromEdges parameter of @c NETGEN_SimpleParameters_3D hypothesis.
299     #  Overrides value set by MaxElementArea()
300     def LengthFromEdges(self):
301         self.Parameters(SIMPLE).LengthFromEdges()
302         pass
303
304     ## Defines @c LengthFromFaces parameter of @c NETGEN_SimpleParameters_3D hypothesis.
305     #  Overrides value set by MaxElementVolume()
306     def LengthFromFaces(self):
307         self.Parameters(SIMPLE).LengthFromFaces()
308         pass
309
310     ## Defines @c MaxElementVolume parameter of @c NETGEN_SimpleParameters_3D hypothesis.
311     #  Overrides value set by LengthFromFaces()
312     #  @param vol new value of @c MaxElementVolume parameter
313     def MaxElementVolume(self, vol):
314         self.Parameters(SIMPLE).SetMaxElementVolume(vol)
315         pass
316
317     pass # end of NETGEN_1D2D3D_Algorithm class
318
319
320 ## Triangle NETGEN 1D-2D algorithm.
321 #
322 #  It can be created by calling smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN_1D2D, geom=0 )
323 #
324 #  This algorithm generates 1D (edges) and 2D (faces) elements
325 #  for given geometrical shape.
326 class NETGEN_1D2D_Algorithm(NETGEN_1D2D3D_Algorithm):
327
328     ## name of the dynamic method in smeshBuilder.Mesh class
329     #  @internal
330     meshMethod = "Triangle"
331     ## type of algorithm used with helper function in smeshBuilder.Mesh class
332     #  @internal
333     algoType   = NETGEN_1D2D
334     ## doc string of the method
335     #  @internal
336     docHelper  = "Creates triangle 2D algorithm for faces"
337
338
339     ## Private constructor.
340     #  @param mesh parent mesh object algorithm is assigned to
341     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
342     #              if it is @c 0 (default), the algorithm is assigned to the main shape
343     def __init__(self, mesh, geom=0):
344         NETGEN_1D2D3D_Algorithm.__init__(self, mesh, geom)
345         pass
346
347     pass # end of NETGEN_1D2D_Algorithm class
348
349
350 ## Triangle NETGEN 2D algorithm
351 #
352 #  It can be created by calling smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN_2D, geom=0 )
353 #
354 #  This algorithm generates only 2D (faces) elements for given geometrical shape
355 #  and, in contrast to NETGEN_1D2D_Algorithm class, should be used in conjunction
356 #  with other 1D meshing algorithm.
357 class NETGEN_2D_Only_Algorithm(NETGEN_Algorithm):
358
359     ## name of the dynamic method in smeshBuilder.Mesh class
360     #  @internal
361     meshMethod = "Triangle"
362     ## type of algorithm used with helper function in smeshBuilder.Mesh class
363     #  @internal
364     algoType = NETGEN_2D
365     ## flag pointing whether this algorithm should be used by default in dynamic method
366     #  of smeshBuilder.Mesh class
367     isDefault  = True
368     ## doc string of the method
369     #  @internal
370     docHelper  = "Creates triangle 2D algorithm for faces"
371
372     isDefault = True
373
374     ## Private constructor.
375     #  @param mesh parent mesh object algorithm is assigned to
376     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
377     #              if it is @c 0 (default), the algorithm is assigned to the main shape
378     def __init__(self, mesh, geom=0):
379         NETGEN_Algorithm.__init__(self, mesh, geom)
380         pass
381
382     ## Defines @c MaxElementArea parameter of hypothesis basing on the definition of the
383     #  maximum area of each triangle
384     #  @param area maximum area value of each triangle
385     #  @param UseExisting if \c True - searches for an existing hypothesis created with the
386     #                     same parameters, else (default) - creates a new one
387     #  @return hypothesis object
388     def MaxElementArea(self, area, UseExisting=0):
389         compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementArea(), args[0])
390         hyp = self.Hypothesis("MaxElementArea", [area], UseExisting=UseExisting,
391                               CompareMethod=compFun)
392         hyp.SetMaxElementArea(area)
393         return hyp
394
395     ## Defines @c LengthFromEdges hypothesis to build triangles
396     #  based on the length of the edges taken from the wire
397     #  @return hypothesis object
398     def LengthFromEdges(self):
399         hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
400         return hyp
401
402     ## Sets @c UseSurfaceCurvature flag
403     #  @param toUse new value of the @c UseSurfaceCurvature parameter (@c True by default)
404     def SetUseSurfaceCurvature(self, toUse=True):
405         if self.Parameters(): self.params.SetUseSurfaceCurvature(toUse)
406         pass
407
408     ## Sets @c QuadAllowed flag.
409     #  @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
410     #  @return hypothesis object
411     def SetQuadAllowed(self, toAllow=True):
412         if not self.params:
413             # use simple hyps
414             hasSimpleHyps = False
415             simpleHyps = ["QuadranglePreference","LengthFromEdges","MaxElementArea"]
416             for hyp in self.mesh.GetHypothesisList( self.geom ):
417                 if hyp.GetName() in simpleHyps:
418                     hasSimpleHyps = True
419                     if hyp.GetName() == "QuadranglePreference":
420                         if not toAllow: # remove QuadranglePreference
421                             self.mesh.RemoveHypothesis( self.geom, hyp )
422                         else:
423                             return hyp
424                         return None
425                     pass
426                 pass
427             if hasSimpleHyps:
428                 if toAllow: # add QuadranglePreference
429                     return self.Hypothesis("QuadranglePreference", UseExisting=1, CompareMethod=self.CompareEqualHyp)
430                 return None
431             pass
432         self.Parameters().SetQuadAllowed( toAllow )
433         return self.params
434
435     pass # end of NETGEN_2D_Only_Algorithm class
436
437
438 ## Tetrahedron 3D algorithm
439 #
440 #  It can be created by calling smeshBuilder.Mesh.Tetrahedron() or smeshBuilder.Mesh.Tetrahedron( smeshBuilder.NETGEN, geom=0 )
441 #
442 #  This algorithm generates only 3D (volumes) elements for given geometrical shape
443 #  and, in contrast to NETGEN_1D2D3D_Algorithm class, should be used in conjunction
444 #  with other 1D and 2D meshing algorithms.
445 class NETGEN_3D_Algorithm(NETGEN_Algorithm):
446
447     ## name of the dynamic method in smeshBuilder.Mesh class
448     #  @internal
449     meshMethod = "Tetrahedron"
450     ## type of algorithm used with helper function in smeshBuilder.Mesh class
451     #  @internal
452     algoType   = NETGEN
453     ## flag pointing either this algorithm should be used by default in dynamic method
454     #  of smeshBuilder.Mesh class
455     #  @internal
456     isDefault  = True
457     ## doc string of the method
458     #  @internal
459     docHelper  = "Creates tetrahedron 3D algorithm for solids"
460
461     ## Private constructor.
462     #  @param mesh parent mesh object algorithm is assigned to
463     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
464     #              if it is @c 0 (default), the algorithm is assigned to the main shape
465     def __init__(self, mesh, geom=0):
466         NETGEN_Algorithm.__init__(self, mesh, geom)
467         pass
468
469     ## Defines @c MaxElementVolume hypothesis to specify the maximum volume value of each tetrahedron
470     #  @param vol maximum volume value of each tetrahedron
471     #  @param UseExisting if \c True - searches for the existing hypothesis created with
472     #                   the same parameters, else (default) - creates a new one
473     #  @return hypothesis object
474     def MaxElementVolume(self, vol, UseExisting=0):
475         compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementVolume(), args[0])
476         hyp = self.Hypothesis("MaxElementVolume", [vol], UseExisting=UseExisting,
477                               CompareMethod=compFun)
478         hyp.SetMaxElementVolume(vol)
479         return hyp
480
481     pass # end of NETGEN_3D_Algorithm class
482
483 ## Tetrahedron 3D algorithm
484 #
485 #  It can be created by calling smeshBuilder.Mesh.Tetrahedron() or smeshBuilder.Mesh.Tetrahedron( smeshBuilder.NETGEN, geom=0 )
486 #
487 #  This algorithm generates only 3D (volumes) elements for given geometrical shape
488 #  and, in contrast to NETGEN_1D2D3D_Algorithm class, should be used in conjunction
489 #  with other 1D and 2D meshing algorithms.
490 class NETGEN_3D_Remote_Algorithm(NETGEN_3D_Algorithm):
491
492     ## type of algorithm used with helper function in smeshBuilder.Mesh class
493     #  @internal
494     algoType   = NETGEN_3D_Remote
495     ## flag pointing either this algorithm should be used by default in dynamic method
496     #  of smeshBuilder.Mesh class
497     #  @internal
498     isDefault  = False
499     ## doc string of the method
500     #  @internal
501     docHelper  = "Remotely Creates tetrahedron 3D algorithm for solids"
502
503     ## Private constructor.
504     #  @param mesh parent mesh object algorithm is assigned to
505     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
506     #              if it is @c 0 (default), the algorithm is assigned to the main shape
507     def __init__(self, mesh, geom=0):
508         NETGEN_3D_Algorithm.__init__(self, mesh, geom)
509         pass
510
511     pass # end of NETGEN_3D_Remote_Algorithm class
512
513
514
515 ## Triangle (helper) 1D-2D algorithm
516 #
517 #  This is the helper class that is used just to allow creating of create NETGEN_1D2D algorithm
518 #  by calling smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN, geom=0 ); this is required for backward compatibility
519 #  with old Python scripts.
520 #
521 #  @note This class (and corresponding smeshBuilder.Mesh function) is obsolete;
522 #  use smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN_1D2D, geom=0 ) instead.
523 class NETGEN_1D2D_Algorithm_2(NETGEN_1D2D_Algorithm):
524
525     ## name of the dynamic method in smeshBuilder.Mesh class
526     #  @internal
527     algoType = NETGEN
528
529     ## Private constructor.
530     #  @param mesh parent mesh object algorithm is assigned to
531     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
532     #              if it is @c 0 (default), the algorithm is assigned to the main shape
533     def __init__(self, mesh, geom=0):
534         self.algoType = NETGEN_1D2D
535         NETGEN_1D2D_Algorithm.__init__(self,mesh, geom)
536         pass
537
538     pass # end of NETGEN_1D2D_Algorithm_2 class
539
540
541 ## Tetrahedron (helper) 1D-2D-3D algorithm.
542 #
543 #  This is the helper class that is used just to allow creating of create NETGEN_1D2D3D
544 #  by calling smeshBuilder.Mesh.Netgen(); this is required for backward compatibility with old Python scripts.
545 #
546 #  @note This class (and corresponding smeshBuilder.Mesh function) is obsolete;
547 #  use smeshBuilder.Mesh.Tetrahedron( smeshBuilder.NETGEN_1D2D3D, geom=0 ) instead.
548 class NETGEN_1D2D3D_Algorithm_2(NETGEN_1D2D3D_Algorithm):
549
550     ## name of the dynamic method in smeshBuilder.Mesh class
551     #  @internal
552     meshMethod = "Netgen"
553     ## doc string of the method
554     #  @internal
555     docHelper  = "Deprecated, used only for compatibility! See Tetrahedron() method."
556
557     ## Private constructor.
558     #  @param mesh parent mesh object algorithm is assigned to
559     #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
560     #              if it is @c 0 (default), the algorithm is assigned to the main shape
561     def __init__(self, mesh, geom=0):
562         NETGEN_1D2D3D_Algorithm.__init__(self,mesh, geom)
563         pass
564
565     pass # end of NETGEN_1D2D3D_Algorithm_2 class