def edge():
        doc = "Edge legnths."

        def fget(self):
            if(self._edge is None or self._tangents is None):
                if(self.dim == 2):
                    xy = self.gridN
                    A, D = Utils.indexCube('AD', self.vnC+1, np.array([self.nCx, self.nNy]))
                    edge1 = xy[D, :] - xy[A, :]
                    A, B = Utils.indexCube('AB', self.vnC+1, np.array([self.nNx, self.nCy]))
                    edge2 = xy[B, :] - xy[A, :]
                    self._edge = np.r_[Utils.mkvc(length2D(edge1)), Utils.mkvc(length2D(edge2))]
                    self._tangents = np.r_[edge1, edge2]/np.c_[self._edge, self._edge]
                elif(self.dim == 3):
                    xyz = self.gridN
                    A, D = Utils.indexCube('AD', self.vnC+1, np.array([self.nCx, self.nNy, self.nNz]))
                    edge1 = xyz[D, :] - xyz[A, :]
                    A, B = Utils.indexCube('AB', self.vnC+1, np.array([self.nNx, self.nCy, self.nNz]))
                    edge2 = xyz[B, :] - xyz[A, :]
                    A, E = Utils.indexCube('AE', self.vnC+1, np.array([self.nNx, self.nNy, self.nCz]))
                    edge3 = xyz[E, :] - xyz[A, :]
                    self._edge = np.r_[Utils.mkvc(length3D(edge1)), Utils.mkvc(length3D(edge2)), Utils.mkvc(length3D(edge3))]
                    self._tangents = np.r_[edge1, edge2, edge3]/np.c_[self._edge, self._edge, self._edge]
            return self._edge
        return locals()
dataset/ETHPy150Open simpeg/simpeg/SimPEG/Mesh/CurvilinearMesh.py/CurvilinearMesh.edge/original