Subject: [Ufl] [Question #118358]: BasisFunction and Function

From: Øystein Sørensen<[email-masked]>
Date: Tue, 20 Jul 2010 15:41:51 -0000

New question #118358 on UFL:
https://answers.launchpad.net/ufl/+question/118358

I am working with the UFL tutorial, and when trying out BasisFunction and Function I get error message. An example code is

from ufl import *
element = FiniteElement("DG", tetrahedron, 0)
v = BasisFunction(element)

which gives the error message

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    v = BasisFunction(element)
NameError: name 'BasisFunction' is not defined

and

from ufl import *
element = FiniteElement("DG", tetrahedron, 0)
f = Function(element)

which gives the error message

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    f = Function(element)
NameError: name 'Function' is not defined

Does this mean that the functions BasisFunction and Function have been removed, or am I doing something wrong?

-- 
You received this question notification because you are a member of UFL
Team, which is an answer contact for UFL.

---

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 20 Jul 2010 16:43:07 +0100

Try

   v = Coefficient(element)

The tutorial is a but out-of-date. It will eventually be updated.

Garth

On 20/07/10 16:41, Øystein Sørensen wrote:
>    File "test.py", line 3, in<module>
>    File "test.py", line 4, in<module>
>      f = Function(element)

---

From: [email-masked]
Date: Tue, 20 Jul 2010 17:49:37 +0200

And BasisFunction is renamed Argument, but I guess you don't need to use it.
Use Trial or TestFunction instead.

Kent

>> I am working with the UFL tutorial, and when trying out BasisFunction
>> and Function I get error message. An example code is
>>
>> from ufl import *
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp
>

---

From: Kent <[email-masked]>
Date: Tue, 20 Jul 2010 15:51:30 -0000

Question #118358 on UFL changed:
https://answers.launchpad.net/ufl/+question/118358

Kent proposed the following answer:

Kent

---

From: Øystein Sørensen<[email-masked]>
Date: Tue, 20 Jul 2010 17:08:12 -0000

Status: Answered => Solved

Øystein Sørensen confirmed that the question is solved:
Thanks Garth Wells, that solved my question.