(grid, spacing=None, E=1e5, nu=0.3, format=None)
Linear elasticity problem with Q1 finite elements on a regular rectangular grid.

    Parameters
    ----------
    grid : tuple
        length 2 tuple of grid sizes, e.g. (10, 10)
    spacing : tuple
        length 2 tuple of grid spacings, e.g. (1.0, 0.1)
    E : float
        Young's modulus
    nu : float
        Poisson's ratio
    format : string
        Format of the returned sparse matrix (eg. 'csr', 'bsr', etc.)

    Returns
    -------
    A : csr_matrix
        FE Q1 stiffness matrix

    B : array
        rigid body modes

    See Also
    --------
    linear_elasticity_p1

    Notes
    -----
        - only 2d for now

    Examples
    --------
    >>> from pyamg.gallery import linear_elasticity
    >>> A, B = linear_elasticity((4, 4))

    References
    ----------
    .. [1] J. Alberty, C. Carstensen, S. A. Funken, and R. KloseDOI
       "Matlab implementation of the finite element method in elasticity"
       Computing, Volume 69,  Issue 3  (November 2002) Pages: 239 - 263
       http://www.math.hu-berlin.de/~cc/
Linear elasticity problem with Q1 finite elements on a regular rectangular grid.
Linear elasticity problem with Q1 finite elements on a regular rectangular grid .
def linear_elasticity(grid, spacing=None, E=1e5, nu=0.3, format=None):
    """Linear elasticity problem with Q1 finite elements on a regular rectangular grid.

    Parameters
    ----------
    grid : tuple
        length 2 tuple of grid sizes, e.g. (10, 10)
    spacing : tuple
        length 2 tuple of grid spacings, e.g. (1.0, 0.1)
    E : float
        Young's modulus
    nu : float
        Poisson's ratio
    format : string
        Format of the returned sparse matrix (eg. 'csr', 'bsr', etc.)

    Returns
    -------
    A : csr_matrix
        FE Q1 stiffness matrix

    B : array
        rigid body modes

    See Also
    --------
    linear_elasticity_p1

    Notes
    -----
        - only 2d for now

    Examples
    --------
    >>> from pyamg.gallery import linear_elasticity
    >>> A, B = linear_elasticity((4, 4))

    References
    ----------
    .. [1] J. Alberty, C. Carstensen, S. A. Funken, and R. KloseDOI
       "Matlab implementation of the finite element method in elasticity"
       Computing, Volume 69,  Issue 3  (November 2002) Pages: 239 - 263
       http://www.math.hu-berlin.de/~cc/

    """
    if len(grid) == 2:
        return q12d(grid, spacing=spacing, E=E, nu=nu, format=format)

    raise NotImplementedError(f'No support for grid={grid}')
def linear_elasticity ( grid , spacing = None , E = 1e5 , nu = 0.3 , format = None ) : if len ( grid ) == 2 : return q12d ( grid , spacing = spacing , E = E , nu = nu , format = format ) raise NotImplementedError ( f'No support for grid={grid}' )