SyFi 0.3
poisson1.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 from swiginac import *
00004 from SyFi import *
00005 
00006 p0 = [0,0,0]; p1 = [1,0,0]; p2 = [0,1,0]
00007 triangle = Triangle(p0, p1, p2) 
00008 fe = Lagrange(triangle,4)           
00009 print fe.nbf()
00010 for i in range(0,fe.nbf()): 
00011   for j in range(0,fe.nbf()): 
00012     integrand = inner(grad(fe.N(i)),grad(fe.N(j)))  
00013     Aij = triangle.integrate(integrand) 
00014     print "A(%d,%d)="%(i,j), Aij.eval()
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines