SyFi  0.3
fem_sympy_core.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 130 of file fem_sympy_core.py.


Constructor & Destructor Documentation

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

Definition at line 131 of file fem_sympy_core.py.

00131 
00132     def __init__(self,nsd, order): 
00133         self.nsd = nsd
00134         self.order = order
00135         self.compute_basis()


Member Function Documentation

Definition at line 139 of file fem_sympy_core.py.

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

Definition at line 136 of file fem_sympy_core.py.

References fem_sympy.Lagrange.N, and fem_sympy_core.Lagrange.N.

00136 
00137     def nbf(self): 
00138         return len(self.N)


Member Data Documentation

Definition at line 131 of file fem_sympy_core.py.


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