From d7fa66cad02007d9d827d522053a6621924aa1f8 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Sat, 16 Jul 2022 16:41:48 +0200
Subject: [PATCH] Update documentation using the new writers for simplicity

---
 doc/userdoc.org | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/doc/userdoc.org b/doc/userdoc.org
index ece052f81..a52f77264 100644
--- a/doc/userdoc.org
+++ b/doc/userdoc.org
@@ -81,7 +81,7 @@ mesh nodes according to a user-defined vector field $T: \mathbb{R}^2
 
   m = transform(m, T);
 
-  write_mesh(gnuplot_writer("transformed", 0), m);
+  write_mesh(gnuplot_writer("transformed"), m);
 #+END_SRC
 The example is quite easy to read.
 - First, some *modules* are loaded: the ~mesh~ module, which contains some
@@ -130,7 +130,7 @@ The example is quite easy to read.
   unset ytics
   set terminal png truecolor enhanced
   set size square
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/transformed.0000.gnu)' w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/transformed.gnu)' w l
 #+END_SRC
 
 #+CAPTION: Obtained transformed mesh
@@ -2768,7 +2768,7 @@ gmsh -2 hybrid-2d.geo -format msh2
   import writer;
 
   let m:mesh, m = readGmsh("hybrid-2d.msh");
-  write_mesh(gnuplot_writer("hybrid-2d", 0), m);
+  write_mesh(gnuplot_writer("hybrid-2d"),m);
 #+END_SRC
 
 The ~mesh~ is represented on Figure [[fig:gmsh-hybrid-2d]].
@@ -2782,7 +2782,7 @@ The ~mesh~ is represented on Figure [[fig:gmsh-hybrid-2d]].
   unset xtics
   unset ytics
   set terminal png truecolor enhanced size 960,480
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.0000.gnu)' w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.gnu)' w l
 #+END_SRC
 
 #+CAPTION: The mesh that was read from the file ~hydrid-2d.msh~ and then saved to the ~gnuplot~ format
@@ -2800,7 +2800,7 @@ This function creates the diamond dual ~mesh~ of a primal ~mesh~.
 
   let primal_mesh:mesh, primal_mesh = readGmsh("hybrid-2d.msh");
   let dual_mesh:mesh, dual_mesh = diamondDual(primal_mesh);
-  write_mesh(gnuplot_writer("diamond", 0), dual_mesh);
+  write_mesh(gnuplot_writer("diamond"), dual_mesh);
 #+END_SRC
 
 The diamond dual mesh is defined by joining the nodes of the faces to
@@ -2817,7 +2817,7 @@ The ~mesh~ is represented on Figure [[fig:gmsh-hybrid-2d]].
   unset xtics
   unset ytics
   set terminal png truecolor enhanced size 960,480
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.0000.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/diamond.0000.gnu)'  lt rgb "black" w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/diamond.gnu)'  lt rgb "black" w l
 #+END_SRC
 
 #+CAPTION: The primal mesh in green and the diamond dual mesh in black
@@ -2853,7 +2853,7 @@ This function creates the median dual ~mesh~ of a primal ~mesh~.
 
   let primal_mesh:mesh, primal_mesh = readGmsh("hybrid-2d.msh");
   let dual_mesh:mesh, dual_mesh = medianDual(primal_mesh);
-  write_mesh(gnuplot_writer("median", 0), dual_mesh);
+  write_mesh(gnuplot_writer("median"), dual_mesh);
 #+END_SRC
 
 The median dual mesh is defined by joining the centers of the faces to
@@ -2870,7 +2870,7 @@ The ~mesh~ is represented on Figure [[fig:gmsh-hybrid-2d]].
   unset xtics
   unset ytics
   set terminal png truecolor enhanced size 960,480
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.0000.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/median.0000.gnu)'  lt rgb "black" w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/hybrid-2d.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/median.gnu)'  lt rgb "black" w l
 #+END_SRC
 
 #+CAPTION: The primal mesh in green and the median dual mesh in black
@@ -2910,7 +2910,7 @@ let pi_over_3: R, pi_over_3 = acos(-1)/3;
 let t: R^2 -> R^2, x -> [(0.2+0.8*x[0])*cos(pi_over_3*x[1]), (0.2+0.8*x[0])*sin(pi_over_3*x[1])];
 
 let m1: mesh, m1 = transform(m0, t);
-write_mesh(gnuplot_writer("transformed", 0), m1);
+write_mesh(gnuplot_writer("transformed"), m1);
 #+END_SRC
 
 #+BEGIN_note
@@ -2931,7 +2931,7 @@ The result of the previous script is given on Figure [[fig:transformed]].
   unset ytics
   set square
   set terminal png truecolor enhanced size 640,640
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/transformed.0000.gnu)' w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/transformed.gnu)' w l
 #+END_SRC
 
 #+CAPTION: The transformed unit square
@@ -2973,14 +2973,14 @@ import math;
 import writer;
 
 let m0:mesh, m0 = cartesianMesh([0,0], [1,1], (10,10));
-write_mesh(gnuplot_writer("relax_example_m0", 0), m0);
+write_mesh(gnuplot_writer("relax_example_m0"), m0);
 
 let t: R^2 -> R^2, x -> [x[0]+0.25*x[1]*x[1], x[1]+0.3*sin(x[0])];
 let m1: mesh, m1 = transform(m0, t);
-write_mesh(gnuplot_writer("relax_example_m1", 0), m1);
+write_mesh(gnuplot_writer("relax_example_m1"), m1);
 
 let m2: mesh, m2 = relax(m0, m1, 0.3);
-write_mesh(gnuplot_writer("relax_example_m2", 0), m2);
+write_mesh(gnuplot_writer("relax_example_m2"), m2);
 #+END_SRC
 
 In this example, the relaxation parameter is set to $\theta=0.3$.  The
@@ -2997,7 +2997,7 @@ different meshes produced in this example are displayed on Figure
   unset ytics
   set square
   set terminal png truecolor enhanced size 640,640
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m0.0000.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m1.0000.gnu)' lt rgb "blue"  w l, '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m2.0000.gnu)' lt rgb "black" w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m0.gnu)' lt rgb "green" w l, '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m1.gnu)' lt rgb "blue"  w l, '<(sed "" $PUGS_SOURCE_DIR/doc/relax_example_m2.gnu)' lt rgb "black" w l
 #+END_SRC
 
 #+CAPTION: Example of meshes relaxation. The relaxed mesh $\mathcal{M}_2$ (black) and the original meshes in green ($\mathcal{M}_0$) and blue ($\mathcal{M}_1$).
@@ -3524,9 +3524,9 @@ gmsh -1 zones-1d.geo -format msh2
 
   let fh:Vh,
       fh = (1/cell_volume(m))
-         * integrate(m, (zoneName("LEFT"), zoneName("RIGHT")), Gauss(5), f);
+         ,* integrate(m, (zoneName("LEFT"), zoneName("RIGHT")), Gauss(5), f);
 
-  write(gnuplot_1d_writer("zone_integrate",0), name_output(fh, "f"), 0);
+  write(gnuplot_1d_writer("zone_integrate"), name_output(fh, "f"));
 #+END_SRC
 In this example, the ~mesh~ provided in the file ~zones-1d.msh~ is a 1d
 ~mesh~ of $]-1,1[$ made of $200$ cells that is partitioned into 3
@@ -3544,7 +3544,7 @@ the ~MIDDLE~ region, cell values are set to 0.
   set xtics
   set ytics
   set terminal png truecolor enhanced size 960,480
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/zone_integrate.0000.gnu)' lw 2 w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/zone_integrate.gnu)' lw 2 w l
 #+END_SRC
 
 #+CAPTION: $L^1$ projection of order 6 of the function $\sin(2\pi x)$ on the zones ~LEFT~ and ~RIGHT~. The values in the zone ~MIDDLE~ are set to $0$.
@@ -3623,7 +3623,7 @@ Let us consider a simple example
                  (symmetry(boundaryName("YMAX"))));
   m = randomizeMesh(m, bc_list);
 
-  write_mesh(gnuplot_writer("random-mesh", 0), m);
+  write_mesh(gnuplot_writer("random-mesh"), m);
 #+END_SRC
 
 Running this script one gets the ~mesh~ displayed on Figure
@@ -3640,7 +3640,7 @@ Running this script one gets the ~mesh~ displayed on Figure
   unset ytics
   set square
   set terminal png truecolor enhanced size 640,640
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/random-mesh.0000.gnu)' w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/random-mesh.gnu)' w l
 #+END_SRC
 
 #+CAPTION: The obtained random mesh
@@ -3683,7 +3683,7 @@ displacement is allowed for $x<2y$.
 
   m = randomizeMesh(m, bc_list, chi);
 
-  write_mesh(gnuplot_writer("random-mesh-chi", 0), m);
+  write_mesh(gnuplot_writer("random-mesh-chi"), m);
 #+END_SRC
 
 Running this script one gets the ~mesh~ displayed on Figure
@@ -3699,7 +3699,7 @@ Running this script one gets the ~mesh~ displayed on Figure
   unset ytics
   set square
   set terminal png truecolor enhanced size 640,640
-  plot '<(sed "" $PUGS_SOURCE_DIR/doc/random-mesh-chi.0000.gnu)' w l
+  plot '<(sed "" $PUGS_SOURCE_DIR/doc/random-mesh-chi.gnu)' w l
 #+END_SRC
 
 #+CAPTION: Random mesh with characteristic function. The original mesh is unchanged for $x \ge 2 y$.
-- 
GitLab