コード例 #1
0
ファイル: gist2DViewer.py プロジェクト: xinxinboss/fipy
    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
ファイル: gist2DViewer.py プロジェクト: LWhitson2/fipy
    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
ファイル: gistViewer.py プロジェクト: xinxinboss/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()