← Back to team overview

ffc team mailing list archive

Constant

 

The Cahn-Hilliard form in DOLFIN works fine when using

  DG0 = FiniteElement("Discontinuous Lagrange", "triangle", 0)
  theta = Function(DG0)

but when using

  theta = Constant("triangle")

I get the below error.

Garth


Traceback (most recent call last):
  File "/usr/bin/ffc", line 187, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ffc", line 100, in main
    execfile(outname, ns)
  File "CahnHilliard2D.py", line 72, in <module>
compile([a, L, M, element], "CahnHilliard2D", "tensor", "dolfin", {'blas': False, 'precision=': '15', 'optimize': False}) File "/usr/lib/python2.5/site-packages/ffc/compiler/compiler.py", line 63, in compile __compile_forms(forms, prefix, representation, output_language, options) File "/usr/lib/python2.5/site-packages/ffc/compiler/compiler.py", line 86, in __compile_forms
    form_data = analyze_form(form)
File "/usr/lib/python2.5/site-packages/ffc/compiler/compiler.py", line 166, in analyze_form
    form_data = analyze(form)
File "/usr/lib/python2.5/site-packages/ffc/compiler/analysis/analyze.py", line 24, in analyze
    raw_form = str(form)
File "/usr/lib/python2.5/site-packages/ffc/compiler/language/algebra.py", line 654, in __repr__
    return " + ".join([p.__repr__() for p in self.monomials])
File "/usr/lib/python2.5/site-packages/ffc/compiler/language/algebra.py", line 515, in __repr__
    t = "".join([t.__repr__() for t in self.transforms])
File "/usr/lib/python2.5/site-packages/ffc/compiler/language/tokens.py", line 147, in __repr__
    raise FormError("Wrong value for restriction of transform")
NameError: global name 'FormError' is not defined


Follow ups