stiffness_matrix2D module#
Created on Sun Sep 3 16:57:29 2023
@author: Pavan Pranjivan Mehta
- class stiffness_matrix2D.stiffness_matrix2D#
- Bases: - object- Computes stiffness matrix in 2 dimensions - Uses the trick, - K2 = K1 M1 + M1 K1, wherw K1 and M1 are 1D stiffness and mass matrix Credits for the formula : Prof. Luca Heltai, SISSA MathLab, Trieste, Italy - legendre(min_degree=1, h=1e-06)#
- Computes stiffness matrix Legendre Polynomials in [-1,1] of dim = (k^2 x k^2), where k = (max_degree - min_degree) - Parameters#- min_degreeint
- min degree of the polynomial, default = 1 
- max_degreeint
- max degree of the polynomial 
 - Returns#- 2D Stiffness martix Legendre polynomials within the interval [-1,1] x [-1,1] - M: numpy array
- 2D Matrix of dim = (k^2 x k^2), where k = (max_degree - min_degree) of Legengre Polynomials 
 
 - homogenous_legendre(min_degree=0, h=1e-06)#
- Computes 2D Stiffness matrix for Homogenous basis function using Legendre Polynomials in [-1,1] x [-1,1] of dim = (k^2 x k^2), where k = (max_degree - min_degree) - Parameters#- min_degreeint
- min degree of the polynomial, default = 0 
- max_degreeint
- max degree of the polynomial 
 - Returns#- 2D Stiffness martix of homogenous basis using Legendre polynomials within the interval [-1,1] - M: numpy array
- 2D Matrix of dim = (k^2 x k^2), where k = (max_degree - min_degree) of Polynomials 
 
 - homogenous_shift_legendre(min_degree=0, h=1e-06)#
- Computes 2D Stiffness matrix Homogenous basis function using Shifted Legendre Polynomials in [0,1] x [0,1] of dim = (k^2 x k^2), where k = (max_degree - min_degree) - Parameters#- min_degreeint
- min degree of the polynomial, default = 0 
- max_degreeint
- max max_degree of the polynomial 
 - Returns#- 2D Stiffness martix of homogenous basis using shifted Legendre polynomials within the interval [0,1] - M: numpy array
- 2D Matrix of dim = (k^2 x k^2), where k = (max_degree - min_degree) of shifted Legengre Polynomials 
 
 
- class stiffness_matrix2D.test#
- Bases: - object- homogenous_legendre(min_degree=0)#
 - runge()#
 - funx()#
 - funy()#
 - func(y)#
 - der2funcX()#
 - der2funcY()#
 - laplacian_homogenous_legendre(min_degree=0)#
- Solves for Laplacian using Homogenous basis function using Legendre Polynomials in [-1,1] - phi_{k} = L_{k+2} - L_{k}, where L_{k} is k-th order Legendre Polynomial 
 - homogenous_legendre_proj_err()#
 - laplacian_homogenous_shift_legendre(min_degree=0)#
- Solves for Laplacian using Homogenous basis function using Shifted Legendre Polynomials in [0,1] - phi_{k} = L_{k+2} - L_{k}, where L_{k} is k-th order Legendre Polynomial 
 - homogenous_shift_legendre_proj_err()#
 - proj_err()#