SyFi  0.3
test_sfc.test_form_argument_code.ElementRepTest Class Reference

List of all members.

Public Member Functions

def test_foo

Detailed Description

Definition at line 46 of file test_form_argument_code.py.


Member Function Documentation

Definition at line 47 of file test_form_argument_code.py.

00047 
00048     def test_foo(self):
00049         SyFi.initSyFi(2)
00050 
00051         family = "CG"
00052         ufl_cell = ufl.triangle
00053         degree = 1
00054         ufl_element = FiniteElement(family, ufl_cell, degree)
00055         geomrep = GeometryRepresentation(ufl_cell.domain())
00056         er = ElementRepresentation(ufl_element, geomrep, quad_rule=None, options=None, cache=None)
00057         print
00058         print
00059         print dir(er)
00060         print
00061 
00062         ngrad = 0
00063         code = []
00064         for dof in range(er.local_dimension):
00065             #sub_element_index = er.dof_to_sub_element_index(dof)
00066 
00067             components = [()] # FIXME: permutations of value shape
00068 
00069             if ngrad:
00070                 assert ngrad == 1
00071                 all_derivatives = [(d,) for d in range(nsd)] # FIXME: permutations of ngrad
00072 
00073                 for component in components:
00074                     for directions in all_derivatives:
00075                         expr = er.basis_function_derivative(dof, component, directions)
00076                         name = "FIXME"
00077                         code.append((name, expr.printc()))
00078             else:
00079                 for component in components:
00080                     expr = er.basis_function(dof, component)
00081                     name = "FIXME"
00082                     code.append((name, expr.printc()))
00083 
00084         print "Element code:"
00085         for n,e in code:
00086             print "%s = %s;" % (n, e)


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