← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Permit interpolation of functions on non-matching grids.

 

On Wed, Jun 17, 2009 at 12:40:10PM +0100, Garth N. Wells wrote:
> 
> 
> Anders Logg wrote:
> > Would it be more natural to have the following interface for interpolation:
> > 
> >   V.interpolate(v, w);
> > 
> > corresponding to w = pi_h(v).
> > 
> > ?
> >
> 
> Yes, or
> 
>    w.interpolate(v)
> 
> I'm still working on it.

Yes, that looks good.

It's better to put this in the Function interface and keep the
FunctionSpace simple (limited number of interpolate functions) and a
bit more "low-level" (as in extracting vectors or arrays).

> > This interpolates v into the function space and sets the coefficients
> > for w. This function can then detect whether or not v and w are on the
> > same mesh and choose the appropriate way to do interpolation.
> > 
> > We can also have a special case like
> > 
> >  V.interpolate(v);
> > 
> > which will take v and replace it by its interpolation.
> >
> 
> Don't we pretty much have this already?
> 
>    v.interpolate();

Yes. I forgot about it.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References