dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10908
Re: Bug in Coefficient logic
On Wed, Dec 03, 2008 at 01:54:29PM +0100, Martin Sandve Alnæs wrote:
> (In C++)
>
> Since a Constant doesn't have a function space, Coefficient::attach creates one.
> Definitely not what I would expect. What are the side effects of this?
>
> A simple way that this may cause problems is:
>
> Constant c;
> MyForm0 a0(...);
> MyForm1 a1(...);
> a0.d = c;
> a1.e = c;
>
> Now consider that a0 and a1 may have different
> spaces for their coefficients d and e. Not intuitive!
Good point, I thought I had implemented a check for this.
I've pushed an update. Take a look in Coefficient::attach now and see
if it looks better.
--
Anders
Attachment:
signature.asc
Description: Digital signature
References