def __init__(self, name='mesh', filename=None,
                 prefix_dir=None, **kwargs):
        """Create a Mesh.

        Parameters
        ----------
        name : str
            Object name.
        filename : str
            Loads a mesh from the specified file, if not None.
        prefix_dir : str
            If not None, the filename is relative to that directory.
        """
        Struct.__init__(self, name=name, **kwargs)

        if filename is None:
            self.io = None
            self.setup_done = 0

        else:
            io = MeshIO.any_from_filename(filename, prefix_dir=prefix_dir)
            output( 'reading mesh (%s)...' % (io.filename) )
            tt = time.clock()
            io.read(self)
            output( '...done in %.2f s' % (time.clock() - tt) )
            self._set_shape_info()
def __init__ ( self , name = 'mesh' , filename = None , prefix_dir = None , ** kwargs ) : Struct . __init__ ( self , name = name , ** kwargs ) if filename is None : self . io = None self . setup_done = 0 else : io = MeshIO . any_from_filename ( filename , prefix_dir = prefix_dir ) output ( 'reading mesh (%s)...' % ( io . filename ) ) tt = time . clock ( ) io . read ( self ) output ( '...done in %.2f s' % ( time . clock ( ) - tt ) ) self . _set_shape_info ( )
Create a Mesh.

        Parameters
        ----------
        name : str
            Object name.
        filename : str
            Loads a mesh from the specified file, if not None.
        prefix_dir : str
            If not None, the filename is relative to that directory.