I am using Lagrange approximation. I asked about that example just to use as a reference of problem that use second order and to change to first order.
My model is a Cahn-Hilliard mixed linear formulation. I already have a code running with first order approximation. (not using libmesh) Now I am trying to do the same with libmesh. But only work for second order approximation. When I use first order approximation work for 15x15 elements but if I use 20x20 or more elements doesn't give me the correct solution. So I wasn't sure if I was changing the correct place. I will try to set the nodal value directly, thank you. Em 2012-12-05 15:39, Kirk, Benjamin (JSC-EG311) escreveu: > On Dec 5, 2012, at 2:54 PM, ernestol <[email protected]> wrote: > >> Dear all, >> >> I am just starting using libmesh and trying to implement the >> Cahn-Hilliard 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 least-squares 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 Navier-Stokes 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 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
