dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #15953
Re: Strange assertions in Function constructors
On Sat, Oct 03, 2009 at 12:12:34PM +0100, Garth N. Wells wrote:
>
>
> Anders Logg wrote:
> > Why are there two different assertions on the vector size on the
> > Function constructors:
> >
> > assert(V->dofmap().global_dimension() == x.size());
> > assert(V->dofmap().global_dimension() <= x->size());
> >
> > Is this a typo? I hope so. Otherwise it's strange that the behavior
> > should be different depending on whether x is a pointer or reference.
> >
>
> They should actually have been '<='. This is to handle sub-function
> 'views' where the sub-function points to the 'mother' vector but has
> it's own function space (the sub-space).
There's still one == there. Should that one also be changed for
consistency?
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References