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