Suggestion on post processing

shirazbj
2011-08-06
2013-04-25
  • shirazbj

    shirazbj - 2011-08-06

    Hi,

    I think gmsh is power enough.  Beside gnu-plot, Why not generate the residual curve in an additional gmsh format ?

    I tried like this:

    in main.c

    after fopen:
    // Open output files for residuals
    fpresiduals = fopen (file, "w");
    add:
        //bj start 
      fprintf (fpresiduals, "View \"Residual\" {\n");
        //bj end

    add this:
        //bj start
      fprintf (fpresiduals, "};\n");
      fprintf (fpresiduals, "View.Axes=2;\n");
      fprintf (fpresiduals, "View.Type=2;\n");
        //bj end

    before:

    fclose (fpresiduals);

    in post.c:

    the WriteResidual sub is like this:

    void
    WriteResidual (FILE * fp, int iter, double *res)
    {

    int i;

    fprintf (fp, "SP\(%d,0,0){%E,0.0};\n",iter, res);

    }

    I only draw one line in above sub.

    After run the program, simply drop the residual file onto gmsh Icon and you get the curve drawn.

    Regards,

    Cean

     
  • x-flow

    x-flow - 2011-08-06

    You are right. Gmsh can do that also. The only advantage of gnuplot is that you can load it easily during the calculation without the plot being complete.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks