← Back to team overview

dolfin team mailing list archive

Re: [HG dolfin] Merge.

 

On Sun, Feb 11, 2007 at 01:10:15PM +0100, Johan Jansson wrote:
> > On Fri, Feb 09, 2007 at 03:36:41PM +0100, Garth N. Wells wrote:
> >> >
> >> >Added test + demos for projection between non-matching meshes, seems
> >> >to work ok. Point evaluation on the intersection of several cells now
> >> >computes the average of the cells. Some optimizations still remain to
> >> >do: i.e. exploit that we know which cell we want to evaluate a
> >> >function on.
> >> >
> >>
> >> Great! I look forward to testing it out.
> >>
> >> Garth
> >>
> >
> > Does this work for general elements also?
> >
> > /Anders
> 
> Yes, this works for general elements. It requires access to basis function
> evaluation though, and right now you have to implement the ones you need
> manually.
> 
> The key part of the projection is:
> 
> integral_K f * v_i
> 
> where f is defined on finite element space A and v_i is test function i on
> finite element space B (the target for projection).
> 
> There are two options for evaluating this:
> 
> 1. Generate a new triangulation of the whole domain Omega which includes
> both the triangulation of A and B. Then the above integral can be computed
> exactly as a sum of integrals on the triangulation of K.
> 
> 2. Allow f to be defined by cells which don't match K, and use an
> approximation of f. The approximation we use is a local projection on K to
> some finite element space C (typically B or a higher order of B). In
> practice this will involve computing the local projection with the
> quadrature of C (which is exact for C but not for f).
> 
> 1 is attractive because it's exact, but it's likely far too expensive (it
> involves generating a new temporary non-trivial mesh). 2 is what's
> currently implemented. Some work remains to investigate the effects of the
> quadrature error on the global projection, and how the quadrature performs
> for piecewise discontinuous f. 2 is always exact for refinement, but not
> for coarsening.
> 
>   Johan

Sounds very good.

Evaluation at any point will (soon) be possible with FFC:

  void ufc::finite_element::evaluate_basis(unsigned int i,
                                           double* values,
                                           const double* coordinates,
                                           const cell& c);

/Anders


References