pc4bims/slope.py
def defineBoundary(self):
        '''Method to obtain the coordinates of the boundary vertices of the
        slope and plot it if it is wanted.

        The origin of the coordinates is in the corner of the bottom with the\
        back of the slope. The coordinates define a close polygon, ie, the\
        first pair of coordinates is the same than the last one.

        Returns:
            (`numpy.ndarray`): Coordinates of the boundary vertices of the\
                slope.

        Examples:
            >>> from numpy import array
            >>> surfaceCoords = array([[  0.        ,  16.57142857],
                                       [ 10.        ,  16.57142857],
                                       [ 18.        ,   4.57142857],
                                       [ 28.        ,   4.57142857]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.        ,   0.        ],
                   [  0.        ,  16.57142857],
                   [ 10.        ,  16.57142857],
                   [ 18.        ,   4.57142857],
                   [ 28.        ,   4.57142857],
                   [ 28.        ,   0.        ],
                   [  0.        ,   0.        ]])

            >>> from numpy import array
            >>> surfaceCoords = array([[-2.4900, 18.1614],
                                       [0.1022, 17.8824],
                                       [1.6975, 17.2845],
                                       [3.8909, 15.7301],
                                       [5.8963, 14.3090],
                                       [8.1183, 13.5779],
                                       [9.8663, 13.0027],
                                       [13.2865, 3.6058],
                                       [20.2865, 3.6058],
                                       [21.4347, 3.3231],
                                       [22.2823, 2.7114],
                                       [23.4751, 2.2252],
                                       [24.6522, 1.2056],
                                       [25.1701, 0.2488]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.00000000e+00,   0.00000000e+00],
                   [  0.00000000e+00,   1.96301237e+01],
                   [  2.59220000e+00,   1.93511237e+01],
                   [  4.18750000e+00,   1.87532237e+01],
                   [  6.38090000e+00,   1.71988237e+01],
                   [  8.38630000e+00,   1.57777237e+01],
                   [  1.06083000e+01,   1.50466237e+01],
                   [  1.23563000e+01,   1.44714237e+01],
                   [  1.57765000e+01,   5.07452373e+00],
                   [  2.27765000e+01,   5.07452373e+00],
                   [  2.39247000e+01,   4.79182373e+00],
                   [  2.47723000e+01,   4.18012373e+00],
                   [  2.59651000e+01,   3.69392373e+00],
                   [  2.71422000e+01,   2.67432373e+00],
                   [  2.76601000e+01,   1.71752373e+00],
                   [  2.76601000e+01,   6.66133815e-16],
                   [  0.00000000e+00,   0.00000000e+00]])
        '''

        # Obtaining the origin vector to move the surface
        originVec = np.array([self.surfaceCoords[0, 0],
                              self.surfaceCoords[0, 1] -
                              self.slopeHeight - self.maxDepth])

        # Creating the contour
        extraCoords = np.array([
                [self.surfaceCoords[-1, 0],
                 self.surfaceCoords[-1, 1] - self.maxDepth],
                [self.surfaceCoords[0, 0],
                 self.surfaceCoords[0, 1] - self.slopeHeight - self.maxDepth]])
        boundCoords = \
            np.vstack((self.surfaceCoords, extraCoords)) - originVec
        boundCoords = np.vstack(([0, 0], boundCoords))

        # Setting the attribute to the instanced object.
        setattr(self, 'boundCoords', boundCoords)

        return boundCoords
Method to obtain the coordinates of the boundary vertices of the
        slope and plot it if it is wanted.

        The origin of the coordinates is in the corner of the bottom with the\
        back of the slope. The coordinates define a close polygon, ie, the\
        first pair of coordinates is the same than the last one.

        Returns:
            (`numpy.ndarray`): Coordinates of the boundary vertices of the\
                slope.

        Examples:
            >>> from numpy import array
            >>> surfaceCoords = array([[  0.        ,  16.57142857],
                                       [ 10.        ,  16.57142857],
                                       [ 18.        ,   4.57142857],
                                       [ 28.        ,   4.57142857]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.        ,   0.        ],
                   [  0.        ,  16.57142857],
                   [ 10.        ,  16.57142857],
                   [ 18.        ,   4.57142857],
                   [ 28.        ,   4.57142857],
                   [ 28.        ,   0.        ],
                   [  0.        ,   0.        ]])

            >>> from numpy import array
            >>> surfaceCoords = array([[-2.4900, 18.1614],
                                       [0.1022, 17.8824],
                                       [1.6975, 17.2845],
                                       [3.8909, 15.7301],
                                       [5.8963, 14.3090],
                                       [8.1183, 13.5779],
                                       [9.8663, 13.0027],
                                       [13.2865, 3.6058],
                                       [20.2865, 3.6058],
                                       [21.4347, 3.3231],
                                       [22.2823, 2.7114],
                                       [23.4751, 2.2252],
                                       [24.6522, 1.2056],
                                       [25.1701, 0.2488]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.00000000e+00,   0.00000000e+00],
                   [  0.00000000e+00,   1.96301237e+01],
                   [  2.59220000e+00,   1.93511237e+01],
                   [  4.18750000e+00,   1.87532237e+01],
                   [  6.38090000e+00,   1.71988237e+01],
                   [  8.38630000e+00,   1.57777237e+01],
                   [  1.06083000e+01,   1.50466237e+01],
                   [  1.23563000e+01,   1.44714237e+01],
                   [  1.57765000e+01,   5.07452373e+00],
                   [  2.27765000e+01,   5.07452373e+00],
                   [  2.39247000e+01,   4.79182373e+00],
                   [  2.47723000e+01,   4.18012373e+00],
                   [  2.59651000e+01,   3.69392373e+00],
                   [  2.71422000e+01,   2.67432373e+00],
                   [  2.76601000e+01,   1.71752373e+00],
                   [  2.76601000e+01,   6.66133815e-16],
                   [  0.00000000e+00,   0.00000000e+00]])
        
Method to obtain the coordinates of the boundary vertices of the
slope and plot it if it is wanted.

The origin of the coordinates is in the corner of the bottom with the\
back of the slope. The coordinates define a close polygon, ie, the\
first pair of coordinates is the same than the last one.
Method to obtain the coordinates of the boundary vertices of the slope and plot it if it is wanted . The origin of the coordinates is in the corner of the bottom with the \ back of the slope . The coordinates define a close polygon ie the \ first pair of coordinates is the same than the last one .
def defineBoundary(self):
        originVec = np.array([self.surfaceCoords[0, 0],
                              self.surfaceCoords[0, 1] -
                              self.slopeHeight - self.maxDepth])
        extraCoords = np.array([
                [self.surfaceCoords[-1, 0],
                 self.surfaceCoords[-1, 1] - self.maxDepth],
                [self.surfaceCoords[0, 0],
                 self.surfaceCoords[0, 1] - self.slopeHeight - self.maxDepth]])
        boundCoords = \
            np.vstack((self.surfaceCoords, extraCoords)) - originVec
        boundCoords = np.vstack(([0, 0], boundCoords))
        setattr(self, 'boundCoords', boundCoords)
        return boundCoords
def defineBoundary ( self ) : originVec = np . array ( [ self . surfaceCoords [ 0 , 0 ] , self . surfaceCoords [ 0 , 1 ] - self . slopeHeight - self . maxDepth ] ) extraCoords = np . array ( [ [ self . surfaceCoords [ - 1 , 0 ] , self . surfaceCoords [ - 1 , 1 ] - self . maxDepth ] , [ self . surfaceCoords [ 0 , 0 ] , self . surfaceCoords [ 0 , 1 ] - self . slopeHeight - self . maxDepth ] ] ) boundCoords = np . vstack ( ( self . surfaceCoords , extraCoords ) ) - originVec boundCoords = np . vstack ( ( [ 0 , 0 ] , boundCoords ) ) setattr ( self , 'boundCoords' , boundCoords ) return boundCoords
Method to obtain the coordinates of the boundary vertices of the
slope and plot it if it is wanted.
Method to obtain the coordinates of the boundary vertices of the slope and plot it if it is wanted .
'''Method to obtain the coordinates of the boundary vertices of the
        slope and plot it if it is wanted.

        The origin of the coordinates is in the corner of the bottom with the\
        back of the slope. The coordinates define a close polygon, ie, the\
        first pair of coordinates is the same than the last one.

        Returns:
            (`numpy.ndarray`): Coordinates of the boundary vertices of the\
                slope.

        Examples:
            >>> from numpy import array
            >>> surfaceCoords = array([[  0.        ,  16.57142857],
                                       [ 10.        ,  16.57142857],
                                       [ 18.        ,   4.57142857],
                                       [ 28.        ,   4.57142857]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.        ,   0.        ],
                   [  0.        ,  16.57142857],
                   [ 10.        ,  16.57142857],
                   [ 18.        ,   4.57142857],
                   [ 28.        ,   4.57142857],
                   [ 28.        ,   0.        ],
                   [  0.        ,   0.        ]])

            >>> from numpy import array
            >>> surfaceCoords = array([[-2.4900, 18.1614],
                                       [0.1022, 17.8824],
                                       [1.6975, 17.2845],
                                       [3.8909, 15.7301],
                                       [5.8963, 14.3090],
                                       [8.1183, 13.5779],
                                       [9.8663, 13.0027],
                                       [13.2865, 3.6058],
                                       [20.2865, 3.6058],
                                       [21.4347, 3.3231],
                                       [22.2823, 2.7114],
                                       [23.4751, 2.2252],
                                       [24.6522, 1.2056],
                                       [25.1701, 0.2488]])
            >>> slopeGeometry = NaturalSlope(surfaceCoords)
            >>> slopeGeometry.defineBoundary()
            array([[  0.00000000e+00,   0.00000000e+00],
                   [  0.00000000e+00,   1.96301237e+01],
                   [  2.59220000e+00,   1.93511237e+01],
                   [  4.18750000e+00,   1.87532237e+01],
                   [  6.38090000e+00,   1.71988237e+01],
                   [  8.38630000e+00,   1.57777237e+01],
                   [  1.06083000e+01,   1.50466237e+01],
                   [  1.23563000e+01,   1.44714237e+01],
                   [  1.57765000e+01,   5.07452373e+00],
                   [  2.27765000e+01,   5.07452373e+00],
                   [  2.39247000e+01,   4.79182373e+00],
                   [  2.47723000e+01,   4.18012373e+00],
                   [  2.59651000e+01,   3.69392373e+00],
                   [  2.71422000e+01,   2.67432373e+00],
                   [  2.76601000e+01,   1.71752373e+00],
                   [  2.76601000e+01,   6.66133815e-16],
                   [  0.00000000e+00,   0.00000000e+00]])
        ''' # Obtaining the origin vector to move the surface # Creating the contour # Setting the attribute to the instanced object.
Coordinates of the boundary vertices of the\
slope.
Coordinates of the boundary vertices of the \ slope .
(`numpy.ndarray`)
self
examples
>>> from numpy import array
>>> surfaceCoords = array([[  0.


>>> from numpy import array >>> surfaceCoords = array ( [[ 0 .