← Back to team overview

dolfin team mailing list archive

Re: [HG] Merge.

 

On Tue, Sep 19, 2006 at 07:33:18PM +0200, Johan Jansson wrote:
> On Tue, Sep 19, 2006 at 05:19:28PM +0200, Anders Logg wrote:
> 
> ...
> 
> > Do you really need to know what type of function it is? The purpose of
> > the Function class is that the type should be ignored.
> > 
> > /Anders
> 
> Syntactically, this is true, but semantically not. If you call
> f.vector(), it only returns a valid result if f is a
> DiscreteFunction. So to use f.vector(), you need to assume that f is a
> DiscreteFunction.
> 
>   Johan

ok. I guess there are cases when you need to operate on the vector
(like computing 1/u or |u| or things FFC can't do) but otherwise,
you should never need to look at the vector.

/Anders


Follow ups

References