Subject: Re: [FFC-dev] [DOLFIN-dev] [[email-masked]: Re: 1D plotting in Viper]

From: Kristian Oelgaard <[email-masked]>
Date: Mon, 14 Apr 2008 09:00:47 +0200

Quoting Anders Logg <[email-masked]>:

> This should be fixed now.
> 
> I wasn't able to compile 1D vector elements. Looks like a bug in FFC.

Depends how you look at it. If you do:

element = VectorElement("Lagrange", "interval", 2)

FFC will try to generate a vector element with just cell_dimension = 1 component
i.e. effectively a FiniteElement (this will fail because MixedElement expects a
list).

If you do e.g.,

element = VectorElement("Lagrange", "interval", 2, 3)

things work fine.

We could modify VectorElement to return the FiniteElement for the special case
of shape = "interval" and no specified number of components, but on the other
hand I think it is more logical if it doesn't work.

Kristian

> Kristian, do you know what this can be?
> 
> -- 
> Anders
> 
> 
> On Fri, Apr 11, 2008 at 12:57:34PM +0200, Ola Skavhaug wrote:
> > I'm forwarding this to the dolfin-dev list.
> > 
> > Ola
> > 
> 
> > Date: Fri, 11 Apr 2008 12:29:03 +0200
> > From: Dag Lindbo <[email-masked]>
> > To: Ola Skavhaug <[email-masked]>
> > Subject: Re: 1D plotting in Viper
> > 
> > Ola,
> > it does not seem like PyDOLFIN can read back 1D functions. I got an error 
> > when doing:
> > u = Function("poisson.xml")
> > RuntimeError: *** Error: Unable to find finite element in library: 
> > "Lagrange finite element of degree 1 on a interval"
> >
> > /Dag
> 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > [email-masked]
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> 
> _______________________________________________
> DOLFIN-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Mon, 14 Apr 2008 09:18:48 +0200

>  hand I think it is more logical if it doesn't work.

I agree. Either they are treated as equivalent, or it should fail like
in FFC today. The latter case could print an informative message.

--
Martin

---

From: Anders Logg <[email-masked]>
Date: Mon, 14 Apr 2008 11:39:02 +0200

> in FFC today. The latter case could print an informative message.

Yes, I was a little too quick. There is no "natural" vector element in
1D, so it's not a bug.

I'll add a better error message.

-- 
Anders