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

Reply via email to