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         self.nsd = nsd
00128         self.order = order
00129         self.compute_basis()
00130 

Member Function Documentation

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 131 of file fem_sympy.py.

00131                  : 
00132         return len(self.N)
00133 

Member Data Documentation

Definition at line 134 of file fem_sympy.py.

Definition at line 126 of file fem_sympy.py.

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