I think I've found a way to implement this in FEniCS. Since all the terms with \pi_h are in the following form: b(q,v) = <q, \pi_h(u v)>, where q, u, v are all in V_h (the space of continuous piecewise linear functions). Thus we can take the following detour:
(1) Let FEniCS assemble the matrix A and b without the the terms with \pi_h (2) Notice that \pi_h(u v) is in V_h, and its degrees of freedom are just \pi_h(u v) (p_i) = u(p_i) v(p_i), where p_i are the nodes. Thus we can take the product of the degrees of freedom of u and v, and get the new function w = \pi_h (u v), and let FEniCS assemble the bilinear form b(q,w) = <q, w>. (3) Use the values of step (2) to fix the matrix A and b in step (1). It's a little complicated, but it's doable. Best, Chong ----- Original Message ---- From: Chong Luo <luo.ch...@yahoo.com> To: Anders Logg <l...@simula.no> Cc: dolfin@lists.launchpad.net Sent: Fri, February 5, 2010 4:42:30 PM Subject: Re: [Dolfin] Interpolation operator in UFL form file? I'm interested in this issue, because this extra \pi_h is important to ensure the inf-sup condition for b(q,v). If there is this \pi_h in b(q,v), then it's easy to prove that the inf-sup condition holds, while if \pi_h is not there, the inf-sup condition might not be true. The formulation with this \pi_h can be found for example in Ragnar Winther's paper "A saddle point approach to the computation of harmonic maps". Best, Chong ----- Original Message ---- From: Chong Luo <luo.ch...@yahoo.com> To: Anders Logg <l...@simula.no> Cc: dolfin@lists.launchpad.net Sent: Wed, February 3, 2010 11:33:50 AM Subject: Re: [Dolfin] Interpolation operator in UFL form file? Thank you for confirming that. May I ask is it still not implemented in fenics but might be possible in the future, or is it simply impossible in fenics? Best, Chong ----- Original Message ---- From: Anders Logg <l...@simula.no> To: Chong Luo <luo.ch...@yahoo.com> Cc: dolfin@lists.launchpad.net Sent: Thu, January 21, 2010 2:06:26 PM Subject: Re: [Dolfin] Interpolation operator in UFL form file? On Thu, Jan 21, 2010 at 11:56:53AM -0800, Chong Luo wrote: > Let V_h be the finite element space of continuous piecewise linear functions > defined on a mesh. Let \pi_h be the interpolation operator into V_h. Is it > possible to include \pi_h in a UFL form file? > > For example, if we have a bilinear form > b(q, v) = \int_{\Omega} q \pi_h [v \cdot u] dx > where q, u, v are all in V_h. Is it possible to specify b(q,v) in a UFL form > file? > > Thank you! > > Best, > Chong No, that's not possible. You can do b(q, v) = \int_{\Omega} q v \cdot \pi_h u dx but not b(q, v) = \int_{\Omega} q \pi_h [v \cdot u] dx -- Anders _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp