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()
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()
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()