(self, levels)
Refine the mesh.

        Parameters
        ----------
        levels : int
            Number of refinement levels.
Refine the mesh.
Refine the mesh .
def refine(self, levels):
        """Refine the mesh.

        Parameters
        ----------
        levels : int
            Number of refinement levels.
        """
        self.V2 = None
        self.E2 = None
        self.Edges = None
        self.newID = None
        for _ in range(levels):
            self.V, self.E = refine2dtri(self.V, self.E)
        self.nv = self.V.shape[0]
        self.ne = self.E.shape[0]
        self.h = diameter(self.V, self.E)
        self.X = self.V[:, 0]
        self.Y = self.V[:, 1]

        if self.degree == 2:
            self.generate_quadratic()
def refine ( self , levels ) : self . V2 = None self . E2 = None self . Edges = None self . newID = None for _ in range ( levels ) : self . V , self . E = refine2dtri ( self . V , self . E ) self . nv = self . V . shape [ 0 ] self . ne = self . E . shape [ 0 ] self . h = diameter ( self . V , self . E ) self . X = self . V [ : , 0 ] self . Y = self . V [ : , 1 ] if self . degree == 2 : self . generate_quadratic ( )