コード例 #1
0
    def set_mpl_tri(self, reset=False):
        """
        Build neighbours from matplotlib

        @param reset (boolean) Force computing neighbours
        """
        if reset or self.neighbours is None or self.edges is None:
            # from matplotlib.tri import Triangulation
            mpltri = Triangulation(self.meshx, self.meshy, self.ikle2)\
                        .get_cpp_triangulation()
            self.neighbours = mpltri.get_neighbors()
            self.edges = mpltri.get_edges()
コード例 #2
0
def getMPLTri(MESHX,MESHY,IKLE):
   from matplotlib.tri import Triangulation
   mpltri = Triangulation(MESHX,MESHY,IKLE).get_cpp_triangulation()
   return mpltri.get_neighbors(),mpltri.get_edges()
コード例 #3
0
 def setMPLTri(self,set=False):
    if set or self.neighbours == None or self.edges == None:
       #from matplotlib.tri import Triangulation
       mpltri = Triangulation(self.MESHX,self.MESHY,self.IKLE2).get_cpp_triangulation()
       self.neighbours = mpltri.get_neighbors()
       self.edges = mpltri.get_edges()