I don't seem to see the attachment...  But I have to ask:

If the assembly function was taken from example 3 (2 does no assembly(?)),
are you constraining the hanging degrees of freedom?  That is, is there a
line like 

      // We have now built the element matrix and RHS vector in terms
      // of the element degrees of freedom.  However, it is possible
      // that some of the element DOFs are constrained to enforce
      // solution continuity, i.e. they are not really "free".  We need
      // to constrain those DOFs in terms of non-constrained DOFs to
      // ensure a continuous solution.  The
      // \p DofMap::constrain_element_matrix_and_vector() method does
      // just that.
      dof_map.constrain_element_matrix_and_vector (Ke, Fe, dof_indices);

(c.f. example 10)  

-Ben



On 11/28/08 1:32 PM, "jurak" <[EMAIL PROTECTED]> wrote:

> Dear all,
> 
> I was testing ExactSolution class by a simple program that solves
> Poisson equation
> on a unite rectangle, using P1 elements on triangles, and calculates
> convergence
> rate of the method by using uniform refinement of the initial mesh.
> 
> To my surprise I obtained the following errors and rates:
> 
>              E R R O R                                                 C
> O N V E R G E N C E  R A T E
>     H1                              L2            Linf
>      H1          L2              Linf
> =====                =====      =======     =====    =====   ======
> 3.469577e-01  1.363935e-02  3.209919e-02
> 1.744062e-01  4.888679e-03  1.110995e-02  0.992308  1.480259  1.530684
> 8.753062e-02  2.352227e-03  5.084924e-03  0.994592  1.055418  1.127554
> 4.406352e-02  1.495102e-03  3.113305e-03  0.990203  0.653783  0.707779
> 
> The convergence in L2 norm is too slow (should be of second order).
> 
> My guess is that I am missing here something fairly obvious, but I can't
> find what.
> The assembly function is taken from example 2, and the refining loop is
> given here:
> 
> for(int refinement=0; refinement < max_refinement; ++ refinement)
> {
> 
>      system.solve();
> 
>      ex_sol.compute_error("Poisson","p");
> 
>      l2_error    = ex_sol.l2_error("Poisson","p");
>      h1_error   = ex_sol.h1_error("Poisson","p");
>      linf_error  = ex_sol.l_inf_error("Poisson","p");
> 
>      out_file << std::scientific
>               << h1_error << "  " << l2_error << "  "<< linf_error<< "  ";
>      if(refinement >0)
>             out_file  << std::fixed
>                   << std::log2(h1_error_old/h1_error)<< "  "
>                   << std::log2(l2_error_old/l2_error) << "  "
>               << std::log2(linf_error_old/linf_error);
>      out_file  <<std::endl;
> 
>          h1_error_old   = h1_error;
>          l2_error_old   = l2_error;
>          linf_error_old = linf_error;
> 
>          mesh_refinement.uniformly_refine();
>          es.reinit();
>      }
> 
> I give the whole program in the attachment. Thanks for your help.
> 
> Mladen Jurak
> 
> 
> 
> <http://web.math.hr/%7Ejurak>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to