SyFi  0.3
fem_sympy.ReferenceSimplex Class Reference

List of all members.

Public Member Functions

def __init__
def integrate

Public Attributes

 nsd
 coords

Detailed Description

Definition at line 7 of file fem_sympy.py.


Constructor & Destructor Documentation

def fem_sympy.ReferenceSimplex.__init__ (   self,
  nsd 
)

Definition at line 8 of file fem_sympy.py.

00008 
00009     def __init__(self, nsd): 
00010         self.nsd = nsd
00011         coords = []
00012         if nsd <= 3: 
00013             coords = symbols('xyz')[:nsd]
00014         else: 
00015             coords = []
00016             for d in range(0,nsd): 
00017                 coords.append(Symbol("x_%d" % d))
00018         self.coords = coords


Member Function Documentation

def fem_sympy.ReferenceSimplex.integrate (   self,
  f 
)

Definition at line 19 of file fem_sympy.py.

References fem_sympy.ReferenceSimplex.coords, fem_sympy.ReferenceSimplex.nsd, ufl2swiginac.MockCell.nsd, and ufl2swiginac.MockFormRep.nsd.

00019 
00020     def integrate(self,f): 
00021         coords = self.coords
00022         nsd = self.nsd
00023 
00024         limit = 1 
00025         for p in coords:  
00026             limit -= p
00027 
00028         intf = f 
00029         for d in range(0,nsd): 
00030             p = coords[d]
00031             limit += p
00032             intf = integrate(intf, (p, 0, limit))  
00033         return intf


Member Data Documentation


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