NameError: name 'nabla_grad' is not defined when running example

Asked by Anmol Sarma

I tried running d1_p2D.py example but got the following error:

Traceback (most recent call last):
  File "d1_p2D.py", line 29, in <module>
    a = inner(nabla_grad(u), nabla_grad(v))*dx
NameError: name 'nabla_grad' is not defined

I'm running Linux Mint 11 ( Based on Ubuntu 11.04) and installed FEniCS 11.02-1 through apt-get.
Any ideas?

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Praveen C (cpraveen) said :
#1

It could be some typing mistake. Change "nabla_grad" to "grad".

Revision history for this message
Johannes Ring (johannr) said :
#2

You should install FEniCS 1.0.0 which is available from the FEniCS PPA. Since Linux Mint is based on Ubuntu 11.04, I guess the packages from the PPA should work fine also on Linux Mint.

http://fenicsproject.org/download/ubuntu_details.html#ubuntu-ppa

Revision history for this message
Martin Sandve Alnæs (martinal) said :
#3

nabla_grad WAP introdusere late 2011. You need fenics 1.0 for that script. In general it cannot be swapped with grad.

Martin

Den 2. jan. 2012 kl. 08:15 skrev Anmol Sarma <email address hidden>:

> New question #183498 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/183498
>
> I tried running d1_p2D.py example but got the following error:
>
> Traceback (most recent call last):
> File "d1_p2D.py", line 29, in <module>
> a = inner(nabla_grad(u), nabla_grad(v))*dx
> NameError: name 'nabla_grad' is not defined
>
> I'm running Linux Mint 11 ( Based on Ubuntu 11.04) and installed FEniCS 11.02-1 through apt-get.
> Any ideas?
>
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Can you help with this problem?

Provide an answer of your own, or ask Anmol Sarma for more information if necessary.

To post a message you must log in.