On Fri, Nov 23, 2007 at 02:17:14PM +0100, Alessio Quaglino wrote: > >> On Tue, May 15, 2007 at 06:42:18PM +0200, Johan Jansson wrote: > >>> > Johan H., Johan J., > >>> > > >>> > Could you add a demo for the projection of a function onto different > >>> > meshes? I'd really like to see how it works. > >>> > > >>> > Garth > >>> > >>> Hi! > >>> > >>> There is such a demo in: > >>> > >>> src/demo/fem/nonmatching > >> > >> Does not exist. > >> > >>> also in: > >>> > >>> src/demo/pydolfin/projection/verification > >>> src/demo/pydolfin/projection/nonmatching-continuous > >>> src/demo/pydolfin/projection/nonmatching-discontinuous > >> > >> None of these work. > >> > >>> A mesh refinement/coarsening demo exists in: > >>> > >>> src/demo/mesh > >> > >> Moved to src/demo/mesh/refinement and I don't think it works, but it > >> does do a lot of printing and says "mesh not ok" :-) > >> > >>> Note that I haven't tested these demos with the dolfin repository > >>> version > >>> for a while, I'll try to do that in the near future. Also note that > >>> there > >>> is still a major (but quite simple) optimization left for the > >>> projection > >>> - > >>> to exploit that we know which cell of the target mesh we are on when > >>> evaluating functions on the source mesh (we only have to search through > >>> the intersecting cells and not the whole mesh). So currently the time > >>> complexity is not very good, but the implementation is robust. > >>> > >>> Johan > >> > >> Sounds good. > >> > >> /Anders > > > > Was this projection between different meshes implemented? I can't find > > anything about it inside the documentation. > > > > Alessio > > I'm trying to think about how to implement this in the case of two meshes, > one being the refined version of the other. Let us call u and U the > function we want to project on the coarse (N dof) and fine (M dof) mesh > respectively, defined as: > > u = \sum_i u_i phi_i > U = \sum_i U_i psi_i > > where phi_i and psi_i are the test functions on the coarser and finer mesh > respectively. We want thus to satisfy the following: > > \int (u - U) phi = 0 > > which becomes: > > \sum_i (u_i phi_i phi_j) = \sum_i (U_i psi_i phi_j) for j = 1:N
Yes, the key difficulty is integrating a product of two functions defined on different meshes. > we now want to compute those sums onto the coarser mesh. However, in order > to do this, we have to evaluate phi (basis function of the coarser mesh) > on the finer mesh since the sum goes i=1:M with M>N. Can FEniCS do that > automatically? No, not yet. There was some work done on this a while ago (at KTH) but I don't know what happened to it. /Anders > Alessio > > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
