예제 #1
0
    def plotMesh(self, filename=None):
        self._plot()

        faceVertexIDs = self.mesh.faceVertexIDs
        vertexCoords = self.mesh.vertexCoords

        x0 = numerix.take(vertexCoords[0], faceVertexIDs[0])
        y0 = numerix.take(vertexCoords[1], faceVertexIDs[0])
        x1 = numerix.take(vertexCoords[0], faceVertexIDs[1])
        y1 = numerix.take(vertexCoords[1], faceVertexIDs[1])

        import gist

        gist.pldj(x0, y0, x1, y1)

        if filename is not None:
            import os.path
            root, ext = os.path.splitext(filename)
            if ext.lower() in (".eps", ".epsi"):
                gist.eps(root)
            else:
                gist.hcp_file(filename, dump=1)
                gist.hcp()
                gist.hcp_finish(-1)

        gist.fma()
예제 #2
0
    def plotMesh(self, filename = None):
        self._plot()
        
        faceVertexIDs = self.mesh.faceVertexIDs
        vertexCoords = self.mesh.vertexCoords
        
        x0 = numerix.take(vertexCoords[0], faceVertexIDs[0])
        y0 = numerix.take(vertexCoords[1], faceVertexIDs[0])
        x1 = numerix.take(vertexCoords[0], faceVertexIDs[1])
        y1 = numerix.take(vertexCoords[1], faceVertexIDs[1])
        
        import gist
        
        gist.pldj(x0, y0, x1, y1)

        if filename is not None:
            import os.path
            root, ext = os.path.splitext(filename)
            if ext.lower() in (".eps", ".epsi"):
                gist.eps(root)
            else:
                gist.hcp_file(filename, dump = 1)
                gist.hcp()
                gist.hcp_finish(-1)

        gist.fma()
예제 #3
0
파일: gistViewer.py 프로젝트: regmi/fipy
 def plot(self, filename=None):
     import gist
 
     if filename is not None:
         import os.path
         root, ext = os.path.splitext(filename)
         if ext.lower() in (".eps", ".epsi"):
             gist.eps(root)
         else:
             gist.hcp_file(filename, dump = 1)
             gist.hcp()
             gist.hcp_finish(-1)
     gist.fma()
예제 #4
0
    def plot(self, filename=None):
        import gist

        if filename is not None:
            import os.path
            root, ext = os.path.splitext(filename)
            if ext.lower() in (".eps", ".epsi"):
                gist.eps(root)
            else:
                gist.hcp_file(filename, dump=1)
                gist.hcp()
                gist.hcp_finish(-1)
        gist.fma()