Used VectorElement instead of VectorFunctionSpace in python script

Bug #893029 reported by Lothar Schumacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FEniCS Book Project
Fix Committed
Undecided
Unassigned

Bug Description

According to the arguments page 197 line 3 of first python script on page should probably use VectorFunctionSpace and not VectorElement.

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

No, that is correct. VectorFunctionSpace is a dolfin class, while VectorElement is the right name in ufl.

Changed in fenics-book:
status: New → Invalid
Revision history for this message
Lothar Schumacher (lschumacher) wrote :

The python script in question starts with

"from dolfin import *
mesh = UnitSquare(8, 8)
V = VectorElement(mesh, "Lagrange", 1)"

If I run this through python I get

"Invalid domain Lagrange."

"V=VectorFunctionSpace(mesh, "Lagrange", 1)" would work and to me makes much more sense.

Revision history for this message
Garth Wells (garth-wells) wrote : Re: [Bug 893029] Re: Used VectorElement instead of VectorFunctionSpace in python script

Looks to me like a bug - the code extract in question is DOLFIN code,
not pure UFL.

Garth

On 22 November 2011 12:10, Lothar Schumacher <email address hidden> wrote:
> The python script in question starts with
>
> "from dolfin import *
> mesh = UnitSquare(8, 8)
> V = VectorElement(mesh, "Lagrange", 1)"
>
> If I run this through python I get
>
> "Invalid domain Lagrange."
>
> "V=VectorFunctionSpace(mesh, "Lagrange", 1)" would work and to me makes
> much more sense.
>
> --
> You received this bug notification because you are a member of FEniCS
> Book Editors, which is subscribed to FEniCS Book Project.
> https://bugs.launchpad.net/bugs/893029
>
> Title:
>  Used VectorElement instead of VectorFunctionSpace in python script
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/fenics-book/+bug/893029/+subscriptions
>

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

Then I must have looked at the wrong code and I guess you are right!

Martin

On 22 November 2011 13:10, Lothar Schumacher <email address hidden> wrote:
> The python script in question starts with
>
> "from dolfin import *
> mesh = UnitSquare(8, 8)
> V = VectorElement(mesh, "Lagrange", 1)"
>
> If I run this through python I get
>
> "Invalid domain Lagrange."
>
> "V=VectorFunctionSpace(mesh, "Lagrange", 1)" would work and to me makes
> much more sense.
>
> --
> You received this bug notification because you are subscribed to FEniCS
> Project.
> https://bugs.launchpad.net/bugs/893029
>
> Title:
>  Used VectorElement instead of VectorFunctionSpace in python script
>
> Status in FEniCS Book Project:
>  Invalid
>
> Bug description:
>  According to the arguments page 197 line 3 of first python script on
>  page should probably use VectorFunctionSpace and not VectorElement.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/fenics-book/+bug/893029/+subscriptions
>

Revision history for this message
Anders Logg (logg) wrote :

Yes! It's a bug. I'll fix it and send it to the publisher.

I'm not sure it will make it into the printing. It depends on how far
the production process has come.

--
Anders

On Tue, Nov 22, 2011 at 12:33:35PM -0000, Martin Sandve Alnæs wrote:
> Then I must have looked at the wrong code and I guess you are right!
>
> Martin
>
>
> On 22 November 2011 13:10, Lothar Schumacher <email address hidden> wrote:
> > The python script in question starts with
> >
> > "from dolfin import *
> > mesh = UnitSquare(8, 8)
> > V = VectorElement(mesh, "Lagrange", 1)"
> >
> > If I run this through python I get
> >
> > "Invalid domain Lagrange."
> >
> > "V=VectorFunctionSpace(mesh, "Lagrange", 1)" would work and to me makes
> > much more sense.
> >
> >
> > Title:
> >  Used VectorElement instead of VectorFunctionSpace in python script
> >
> > Status in FEniCS Book Project:
> >  Invalid
> >
> > Bug description:
> >  According to the arguments page 197 line 3 of first python script on
> >  page should probably use VectorFunctionSpace and not VectorElement.
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/fenics-book/+bug/893029/+subscriptions
> >
>

Anders Logg (logg)
Changed in fenics-book:
status: Invalid → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.