Gradient of an Interpolated Trial/Test Function

More
1 year 10 months ago #4624 by Wenzheng Kuang
Dear community,

I am trying to add to the bilinear form the row-gradient of a vector-version Crouzeix-Raviart element after its interpolation onto the RT0 element. My code looks like this:
Code:
W0 = HDiv(mesh, order=0, RT=True, dirichlet=dirichBDs) V_cr1 = FESpace('nonconforming', mesh, dirichlet=dirichBDs) V_cr2 = FESpace('nonconforming', mesh, dirichlet=dirichBDs) fes_cr = V_cr1 * V_cr2 (ux_cr, uy_cr), (vx_cr, vy_cr) = fes_cr.TnT() u_cr = CF((ux_cr, uy_cr)) v_cr = CF((vx_cr, vy_cr)) a_cr = BilinearForm(fes_cr) a_cr += -Grad(Interpolate(v_cr, W0)) * wind * Interpolate(u_cr, W0) * dx

But I can not get the desired results, and after debugging we found it should be due to the "Grad(Interpolate())" is not returning the row gradient of the interpolated RT0 function. May I ask if there is any method to overcome this? Thanks in advance for any insight into this!

Best, 
Wenzheng
Time to create page: 0.100 seconds