Package esys :: Package pycad :: Module Triangle :: Class Design
[hide private]
[frames] | no frames]

Class Design

   object --+    
            |    
design.Design --+
                |
               Design

Design for Triangle.

Instance Methods [hide private]
 
__del__(self)
Cleans up.
 
__getAngle(self, v, w)
 
__getVector(self, A, B)
 
__init__(self, dim=2, keep_files=False)
Initializes the Triangle design.
 
getCommandString(self)
Returns the Triangle command line:
 
getMeshFileName(self)
Returns the name of the Triangle mesh file.
 
getMeshHandler(self)
Returns a handle to a mesh meshing the design.
 
getScriptFileName(self)
Returns the name of the gmsh script file.
 
getScriptString(self)
Returns the Triangle script to generate the mesh.
 
setMeshFileName(self, name=None)
Sets the name of the Triangle mesh file.
 
setOptions(self, cmdLineArgs='')
Sets command line options for the mesh generator:
 
setScriptFileName(self, name=None)
Sets the filename for the Triangle input script.

Inherited from design.Design: addItems, clearItems, getAllPrimitives, getDim, getElementOrder, getElementSize, getItems, getTagMap, keepFiles, setDim, setElementOrder, setElementSize, setKeepFilesOff, setKeepFilesOn

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dim=2, keep_files=False)
(Constructor)

 

Initializes the Triangle design.

Parameters:
  • dim - spatial dimension
  • keep_files - flag to keep work files
Overrides: object.__init__

getCommandString(self)

 

Returns the Triangle command line:

   triangle [-prq__a__uAcDjevngBPNEIOXzo_YS__iFlsCQVh] input_file

   see U{http://www.cs.cmu.edu/~quake/triangle.switch.html}

getMeshHandler(self)

 

Returns a handle to a mesh meshing the design. In the current implementation a mesh file name in Triangle format is returned.

Overrides: design.Design.getMeshHandler

setOptions(self, cmdLineArgs='')

 

Sets command line options for the mesh generator:

   triangle [-prq__a__uAcDjevngBPNEIOXzo_YS__iFlsCQVh] input_file

       see U{http://www.cs.cmu.edu/~quake/triangle.switch.html}
Parameters:
  • cmdLineArgs - the switches you would ordinarily use at the command line (e.g. cmdLineArgs="pq25a7.5")
Overrides: design.Design.setOptions

setScriptFileName(self, name=None)

 

Sets the filename for the Triangle input script. If no name is given a name with extension poly is generated.