← Back to team overview

dolfin team mailing list archive

Re: Linear algebra cleanups

 

2008/4/22, Martin Sandve Alnæs <martinal@xxxxxxxxx>:
> 2008/4/22, kent-and@xxxxxxxxx <kent-and@xxxxxxxxx>:
>
> > > I've made an attempt to cleanup the GenericFoo interfaces and make
>  >  > them consistent. (I also added a few functions, for example A *= a,
>  >  > x += y etc.)
>  >  >
>  >  > Can everyone interested please take a look and see that things look good
>  >  > for GenericTensor, GenericMatrix and GenericVector, even including the
>  >  > order of definition of functions, punctuation in comments etc.
>  >
>  >
>  > The copy function is removed from GenericVector but is in the subclasses.
>  >  I'd like GenericVector to have the copy function. Any reason to not have it ?
>  >
>  >  Kent
>
>
>
> I also thought we were keeping that one. There's absolutely no point
>  in keeping it in the subclasses if it's removed from the interfaces,
>  since copy constructors should do the same thing.
>
>
>  Another thing, about this comment:
>
>     ///--- Special functions, intended for library use only ---
>
>  I wrote something similar earlier for "instance()", but I'm not so sure
>  this should apply to "down_cast" and "has_type". User code that
>  is handling a specific backend in certain places should definitely
>  use these functions, and claiming they're library use only will
>  probably lead users who read these comments to use
>  dynamic_cast instead which they shouldn't.
>
>  --
>
> Martin

Also, I don't see why instance() should be implemented in
GenericMatrix and GenericVector, I think the default GenericTensor
implementation should be enough for everyone except Vector/Matrix. If
anyone disagrees, please provide an example.

--
Martin


References