From: Kirk, Benjamin (JSCEG311) <benjamin.kirk1@na...>  20121205 21:40:13

On Dec 5, 2012, at 2:54 PM, ernestol <ernestol@...> wrote: > Dear all, > > I am just starting using libmesh and trying to implement the > CahnHilliard equation. I already had implemented that by myself and now > I am trying to do with libmesh to compare the results and futher use > adaptative mesh. > > The problem is that when I use an initial condition like a X with 1 on > the X and 1 outside the X. The way libmesh project the initial > condition when using second order approximation give me values under 1 > and above 1, that I don't want it. This is because the projection is using a leastsquares type approximation which can cause ringing for discontinuous data. Alternatively you can set the nodal value directly, or tune the quadrature rule used to project the function to achieve this effect  what type of finite element approximation are you using? > I am trying to use first order approximation so I can compare with my > program and don't have the problem with the initial condition. > > Even with the initial condition problem, the model work with second > order approximation, but every problem that I tried to use didn't work > first order approximation. > > Just a basic question so, in system_of_equation_ex2 if I want to > approximate u and v as first order. I just need to put first oder there > and take off the mesh.all_second_order()? > > because when I do this doesn't work. This definitely won't work, because in example 2 we solve the incompressible NavierStokes equations, and there are strong limits on compatibility between the velocity and pressure approximation. In general, for finite element problems without this type of restriction, all you would need to do is change the ORDER when defining the variable. Ben 