SyFi  0.3
fem_sympy_core.ReferenceSimplex Class Reference

List of all members.

Public Member Functions

def __init__
def integrate

Public Attributes

 nsd
 coords

Detailed Description

Definition at line 12 of file fem_sympy_core.py.


Constructor & Destructor Documentation

def fem_sympy_core.ReferenceSimplex.__init__ (   self,
  nsd 
)

Definition at line 13 of file fem_sympy_core.py.

00013 
00014     def __init__(self, nsd): 
00015         self.nsd = nsd
00016         coords = []
00017         if nsd <= 3: 
00018             coords = [x,y,z][:nsd]
00019         else: 
00020             coords = []
00021             for d in range(0,nsd): 
00022                 coords.append(Symbol("x_%d" % d))
00023         self.coords = coords


Member Function Documentation

Definition at line 24 of file fem_sympy_core.py.

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

00024 
00025     def integrate(self,f): 
00026         coords = self.coords
00027         nsd = self.nsd
00028 
00029         limit = 1 
00030         for p in coords:  
00031             limit -= p
00032 
00033         intf = f 
00034         for d in range(0,nsd): 
00035             p = coords[d]
00036             limit += p
00037             intf = integrate(intf.expand(), (p, 0, limit))  
00038         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