74 |
returns the name of the file for the gmsh msh |
returns the name of the file for the gmsh msh |
75 |
""" |
""" |
76 |
return self.__mshname |
return self.__mshname |
77 |
def setOptions(self,algorithm=None,optimize_quality=True,smoothing=1): |
def setOptions(self,algorithm=None,optimize_quality=True,smoothing=1, curvature_based_element_size=False): |
78 |
""" |
""" |
79 |
sets options for the mesh generator |
sets options for the mesh generator |
80 |
""" |
""" |
81 |
if algorithm==None: algorithm=self.DELAUNAY |
if algorithm==None: algorithm=self.DELAUNAY |
82 |
|
self.__curvature_based_element_size=curvature_based_element_size |
83 |
self.__algo=algorithm |
self.__algo=algorithm |
84 |
self.__optimize_quality=optimize_quality |
self.__optimize_quality=optimize_quality |
85 |
self.__smoothing=smoothing |
self.__smoothing=smoothing |
107 |
opt="-optimize " |
opt="-optimize " |
108 |
else: |
else: |
109 |
opt="" |
opt="" |
110 |
exe="gmsh -%s -algo %s -clcurv -smooth %s %s -v 0 -order %s -o %s %s"%(self.getDim(), |
if self.__curvature_based_element_size: |
111 |
|
clcurv="-clcurv " |
112 |
|
else: |
113 |
|
clcurv="" |
114 |
|
|
115 |
|
exe="gmsh -%s -algo %s %s-smooth %s %s-v 0 -order %s -o %s %s"%(self.getDim(), |
116 |
self.__algo, |
self.__algo, |
117 |
|
clcurv, |
118 |
self.__smoothing, |
self.__smoothing, |
119 |
opt, |
opt, |
120 |
self.getElementOrder(), |
self.getElementOrder(), |