class Mesh_Algorithm:
# @class Mesh_Algorithm
# @brief Class Mesh_Algorithm
- def __init__(self,smesh):
- self.smesh=smesh
- self.mesh = 0
- self.geom = 0
- self.subm = 0
- self.algo = 0
- hypos = {}
+
+ hypos = {}
+
+ #def __init__(self,smesh):
+ # self.smesh=smesh
+ def __init__(self):
+ self.mesh = None
+ self.geom = None
+ self.subm = None
+ self.algo = None
def FindHypothesis(self,hypname, args):
key = "%s %s %s" % (self.__class__.__name__, hypname, args)
def Create(self, mesh, geom, hypo, so="libStdMeshersEngine.so"):
if geom is None:
raise RuntimeError, "Attemp to create " + hypo + " algoritm on None shape"
- algo = self.mesh.smeshpyD.CreateHypothesis(hypo, so)
+ algo = mesh.smeshpyD.CreateHypothesis(hypo, so)
self.Assign(algo, mesh, geom)
return self.algo
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Segment.algo:
Mesh_Segment.algo = self.Create(mesh, geom, "Regular_1D")
else:
## Private constructor.
def __init__(self, mesh, algoType, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if algoType == MEFISTO:
if not Mesh_Triangle.algoMEF:
Mesh_Triangle.algoMEF = self.Create(mesh, geom, "MEFISTO_2D")
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Quadrangle.algo:
Mesh_Quadrangle.algo = self.Create(mesh, geom, "Quadrangle_2D")
else:
## Private constructor.
def __init__(self, mesh, algoType, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if algoType == NETGEN:
if not Mesh_Tetrahedron.algoNET:
Mesh_Tetrahedron.algoNET = self.Create(mesh, geom, "NETGEN_3D", "libNETGENEngine.so")
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Hexahedron.algo:
Mesh_Hexahedron.algo = self.Create(mesh, geom, "Hexa_3D")
else:
## Private constructor.
def __init__(self, mesh, is3D, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if noNETGENPlugin:
print "Warning: NETGENPlugin module has not been imported."
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Projection1D.algo:
Mesh_Projection1D.algo = self.Create(mesh, geom, "Projection_1D")
else:
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Projection2D.algo:
Mesh_Projection2D.algo = self.Create(mesh, geom, "Projection_2D")
else:
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Projection3D.algo:
Mesh_Projection3D.algo = self.Create(mesh, geom, "Projection_3D")
else:
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_Prism3D.algo:
Mesh_Prism3D.algo = self.Create(mesh, geom, "Prism_3D")
else:
## Private constructor.
def __init__(self, mesh, geom=0):
+ Mesh_Algorithm.__init__(self)
+
if not Mesh_RadialPrism3D.algo:
Mesh_RadialPrism3D.algo = self.Create(mesh, geom, "RadialPrism_3D")
else: