← Back to team overview

dolfin team mailing list archive

Re: Projection onto finer meshes

 

On Tue, Jul 22, 2008 at 09:48:25PM +0100, Garth N. Wells wrote:
> 
> 
> Harish Narayanan wrote:
> > Anders Logg wrote:
> >> No, it has not been implemented yet but it's something we desperately
> >> need. If we define the L2 projection Pu of u onto V by
> >>
> >>   (Pu, v) = (u, v) for all v in V
> >>
> >> then the problem is in evaluating the integral on the right-hand side:
> >>
> >>   (u, v)
> >>
> >> where now u and v are defined on different meshes.
> >>
> >> My suggestion would be to evaluate this by quadrature at run-time,
> >> using the generated UFC function
> >>
> >>   evaluate_basis
> >>
> >> and IntersectionDetector/GTS which is very fast at finding the overlap
> >> between cells.
> > 
> > Hmm, ok. I will try to compute the integral on the right-hands at 
> > runtime using quadrature and use it to determine Pu.
> 
> It might be useful to look at
> 
>    DiscreteFunction::eval(real* values, const real* x) const
> 
> It uses some of what you'll need.
> 
> Garth

I forgot about this. Yes, this will call up GTS to compute the
overlap, so it should be "easy" to iterate over the cells in the finer
mesh, pick some quadrature points (I don't know what's suitable) and
then call eval() for the second function to just get the values at
those points.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References