Public Member Functions | |
def | __init__ |
def | nbf |
def | compute_basis |
Public Attributes | |
nsd | |
order | |
N |
Definition at line 125 of file fem_sympy.py.
def fem_sympy::Lagrange::__init__ | ( | self, | ||
nsd, | ||||
order | ||||
) |
def fem_sympy::Lagrange::compute_basis | ( | self | ) |
Definition at line 134 of file fem_sympy.py.
00134 : 00135 order = self.order 00136 nsd = self.nsd 00137 N = [] 00138 pol, coeffs, basis = bernstein_space(order, nsd) 00139 points = create_point_set(order, nsd) 00140 00141 equations = [] 00142 for p in points: 00143 ex = pol.subs(x, p[0]) 00144 if nsd > 1: 00145 ex = ex.subs(y, p[1]) 00146 if nsd > 2: 00147 ex = ex.subs(z, p[2]) 00148 equations.append(ex ) 00149 00150 A = create_matrix(equations, coeffs) 00151 Ainv = A.inv() 00152 00153 b = eye(len(equations)) 00154 00155 xx = Ainv*b 00156 00157 for i in range(0,len(equations)): 00158 Ni = pol 00159 for j in range(0,len(coeffs)): 00160 Ni = Ni.subs(coeffs[j], xx[j,i]) 00161 N.append(Ni) 00162 00163 self.N = N 00164 00165 00166 00167 00168 00169 00170
def fem_sympy::Lagrange::nbf | ( | self | ) |
Definition at line 163 of file fem_sympy.py.
Definition at line 127 of file fem_sympy.py.
Definition at line 128 of file fem_sympy.py.