SyFi  0.3
fem_sympy.Lagrange Class Reference

List of all members.

Public Member Functions

def __init__
def nbf
def compute_basis

Public Attributes

 nsd
 order
 N

Detailed Description

Definition at line 125 of file fem_sympy.py.


Constructor & Destructor Documentation

def fem_sympy.Lagrange.__init__ (   self,
  nsd,
  order 
)

Definition at line 126 of file fem_sympy.py.

00126 
00127     def __init__(self,nsd, order): 
00128         self.nsd = nsd
00129         self.order = order
00130         self.compute_basis()


Member Function Documentation

Definition at line 134 of file fem_sympy.py.

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

def fem_sympy.Lagrange.nbf (   self)

Definition at line 131 of file fem_sympy.py.

References fem_sympy.Lagrange.N.

00131 
00132     def nbf(self): 
00133         return len(self.N)


Member Data Documentation

Definition at line 126 of file fem_sympy.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines