]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Example update.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 13 May 1998 12:33:50 +0000 (12:33 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 13 May 1998 12:33:50 +0000 (12:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@282 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/deal.II/Attic/examples/error-estimation/Makefile
deal.II/deal.II/Attic/examples/error-estimation/ee.gauss.prm
deal.II/deal.II/Attic/examples/error-estimation/ee.kink.prm
deal.II/deal.II/Attic/examples/error-estimation/ee.singular.prm
deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc
deal.II/deal.II/Attic/examples/error-estimation/make_ps
tests/big-tests/error-estimation/Makefile
tests/big-tests/error-estimation/ee.gauss.prm
tests/big-tests/error-estimation/ee.kink.prm
tests/big-tests/error-estimation/ee.singular.prm
tests/big-tests/error-estimation/error-estimation.cc
tests/big-tests/error-estimation/make_ps

index 35cd1f7b8afc6a8123ae4413a38f339120d7b14b..0cfca5ab4589926824623798a4b3f01a59cf16a0 100644 (file)
@@ -23,9 +23,12 @@ run-parameters  = ee.gauss.prm
 
 # To execute additional action apart from running the program, fill
 # in this list:
-additional-run-action = $(target) ee.singular.prm ; \
-                        gnuplot make_ps ; \
-                        perl -pi -e 's/^\#.*$$\\${}n//g' data-*/*.inp
+run-action=\
+       $(target) ee.gauss.prm; \
+       $(target) ee.singular.prm; \
+       $(target) ee.kink.prm; \
+       gnuplot make_ps; \
+       perl -pi -e 's/^\#.*$$\\${}n//g' data-*/*.inp
 
 # To specify which files are to be deleted by "make clean" (apart from
 # the usual ones: object files, executables, backups, etc), fill in the
@@ -89,11 +92,8 @@ $(target) : $(libraries)
        @echo ============================ Linking $@
        @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
 
-# rule how to run the program
 run: $(target)
-       $(target) $(run-parameters)
-       $(additional-run-action)
-
+       $(run-action)
 
 # rule to make object files
 %.go : %.cc
index cd8daeb2fd2b3fc3a08ea2e363b68b7f7bd1be4c..2efdb4a724e6c223dba19ca6b82c8be5206c8571 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Gauss shape
 set Initial refinement   = 2
 set Refinement criterion = { global | true error | estimated error }
 set Refinement fraction  = 0.3
-set Maximum cells        = 3000
+set Maximum cells        = 10000
 set Output base filename = data-gauss/
 set Output format        = ucd
index 5a3c5447d81d879738ff869f3e862efc9daa26c0..e8667dd51011789402c5fefe86a893e15ae1224d 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Kink
 set Initial refinement   = 1
 set Refinement criterion = { global | estimated error }
 set Refinement fraction  = 0.1
-set Maximum cells        = 30000
+set Maximum cells        = 100000
 set Output base filename = data-kink/
 set Output format        = ucd
index 6b5861d0064598fcc696b1ee7feb0e276d7fbd6d..61b6e7571a9b1aa9c85c20ada9075a7df98c2a33 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Singular
 set Initial refinement   = 1
 set Refinement criterion = { global | estimated error }
 set Refinement fraction  = 0.1
-set Maximum cells        = 10000
+set Maximum cells        = 100000
 set Output base filename = data-singular/
 set Output format        = ucd
index 6f055f91e2f7e818726ded51d9fed68f36bc5b10..d4b53f46c533d1eb22d4d321fc1dd0bd4fedb621 100644 (file)
@@ -547,7 +547,29 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       cout << endl << endl;
       ++refine_step;
     };
+
+  String filename = prm.get ("Output base filename");
+  switch (refine_mode) 
+    {
+      case global:
+           filename += "global.";
+           break;
+      case true_error:
+           filename += "true_error.";
+           break;
+      case error_estimator:
+           filename += "estimated_error.";
+           break;
+    };
+
+  cout << endl;
   
+  filename += "finest_mesh.gnuplot";
+  cout << "    Wrinting finest grid to <" << filename << ">... " << endl;
+  ofstream finest_mesh (filename);
+  tria->print_gnuplot (finest_mesh);
+  finest_mesh.close();
+
   print_history (prm, refine_mode);
   cout << endl << endl << endl;
 
index 06340e21a437447387a996450910bb0a38a6f00c..49b88af9ee0814610618ea96abe97632d1221fd9 100644 (file)
@@ -16,14 +16,13 @@ set output "data-gauss/history.true_error.eps"
 plot "data-gauss/history.true_error.gnuplot" using 1:2 title "L2 error","data-gauss/history.true_error.gnuplot" using 1:3 title "Linfty error","data-gauss/history.true_error.gnuplot" using 1:4 title "H1 error","data-gauss/history.true_error.gnuplot" using 1:5 title "Estimated H1 error"
 
 
-
 set output "data-gauss/history.estimated_error.eps"
 
 plot "data-gauss/history.estimated_error.gnuplot" using 1:2 title "L2 error","data-gauss/history.estimated_error.gnuplot" using 1:3 title "Linfty error","data-gauss/history.estimated_error.gnuplot" using 1:4 title "H1 error","data-gauss/history.estimated_error.gnuplot" using 1:5 title "Estimated H1 error"
 
 
 set output "data-gauss/history.compare.eps"
-plot "data-gauss/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-gauss/history.true_error.gnuplot" using 1:2 title "ref. by true error -- L2 error", "data-gauss/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-gauss/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-gauss/history.true_error.gnuplot" using 1:4 title "ref. by true error -- H1 error", "data-gauss/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-gauss/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-gauss/history.true_error.gnuplot" using 1:2 title "ref. by true error -- L2 error", "data-gauss/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 0.1/sqrt(x) title "O(h)", "data-gauss/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-gauss/history.true_error.gnuplot" using 1:4 title "ref. by true error -- H1 error", "data-gauss/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 0.04/x title "O(h^2)"
 
 
 
@@ -40,7 +39,7 @@ plot "data-singular/history.estimated_error.gnuplot" using 1:2 title "L2 error",
 
 
 set output "data-singular/history.compare.eps"
-plot "data-singular/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-singular/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-singular/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-singular/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-singular/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-singular/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 1.1/x**0.33 title "O(h^2/3)", 2./sqrt(x) title "O(h)", "data-singular/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-singular/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 0.2/x**0.4 title "O(h^0.8)", 4./x title "O(h^2)"
 
 
 
@@ -59,4 +58,36 @@ plot "data-kink/history.estimated_error.gnuplot" using 1:2 title "L2 error","dat
 
 
 set output "data-kink/history.compare.eps"
-plot "data-kink/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-kink/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-kink/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-kink/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-kink/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-kink/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 5/x**0.25 title "O(h^1/2)", 20/x**0.5 title "O(h)", "data-kink/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-kink/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 1.5/sqrt(x) title "O(h)", 20/x**0.95 title "O(h^1.8)"
+
+
+
+
+set parametric
+set data style lines
+set nologscale xy
+
+set output "data-gauss/finest_mesh.global.eps"
+plot "data-gauss/global.finest_mesh.gnuplot"
+
+set output "data-gauss/finest_mesh.true_error.eps"
+plot "data-gauss/true_error.finest_mesh.gnuplot"
+
+set output "data-gauss/finest_mesh.estimated_error.eps"
+plot "data-gauss/estimated_error.finest_mesh.gnuplot"
+
+
+
+set output "data-singular/finest_mesh.global.eps"
+plot "data-singular/global.finest_mesh.gnuplot"
+
+set output "data-singular/finest_mesh.estimated_error.eps"
+plot "data-singular/estimated_error.finest_mesh.gnuplot"
+
+
+
+set output "data-kink/finest_mesh.global.eps"
+plot "data-kink/global.finest_mesh.gnuplot"
+
+set output "data-kink/finest_mesh.estimated_error.eps"
+plot "data-kink/estimated_error.finest_mesh.gnuplot"
index 35cd1f7b8afc6a8123ae4413a38f339120d7b14b..0cfca5ab4589926824623798a4b3f01a59cf16a0 100644 (file)
@@ -23,9 +23,12 @@ run-parameters  = ee.gauss.prm
 
 # To execute additional action apart from running the program, fill
 # in this list:
-additional-run-action = $(target) ee.singular.prm ; \
-                        gnuplot make_ps ; \
-                        perl -pi -e 's/^\#.*$$\\${}n//g' data-*/*.inp
+run-action=\
+       $(target) ee.gauss.prm; \
+       $(target) ee.singular.prm; \
+       $(target) ee.kink.prm; \
+       gnuplot make_ps; \
+       perl -pi -e 's/^\#.*$$\\${}n//g' data-*/*.inp
 
 # To specify which files are to be deleted by "make clean" (apart from
 # the usual ones: object files, executables, backups, etc), fill in the
@@ -89,11 +92,8 @@ $(target) : $(libraries)
        @echo ============================ Linking $@
        @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
 
-# rule how to run the program
 run: $(target)
-       $(target) $(run-parameters)
-       $(additional-run-action)
-
+       $(run-action)
 
 # rule to make object files
 %.go : %.cc
index cd8daeb2fd2b3fc3a08ea2e363b68b7f7bd1be4c..2efdb4a724e6c223dba19ca6b82c8be5206c8571 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Gauss shape
 set Initial refinement   = 2
 set Refinement criterion = { global | true error | estimated error }
 set Refinement fraction  = 0.3
-set Maximum cells        = 3000
+set Maximum cells        = 10000
 set Output base filename = data-gauss/
 set Output format        = ucd
index 5a3c5447d81d879738ff869f3e862efc9daa26c0..e8667dd51011789402c5fefe86a893e15ae1224d 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Kink
 set Initial refinement   = 1
 set Refinement criterion = { global | estimated error }
 set Refinement fraction  = 0.1
-set Maximum cells        = 30000
+set Maximum cells        = 100000
 set Output base filename = data-kink/
 set Output format        = ucd
index 6b5861d0064598fcc696b1ee7feb0e276d7fbd6d..61b6e7571a9b1aa9c85c20ada9075a7df98c2a33 100644 (file)
@@ -2,6 +2,6 @@ set Test case            = Singular
 set Initial refinement   = 1
 set Refinement criterion = { global | estimated error }
 set Refinement fraction  = 0.1
-set Maximum cells        = 10000
+set Maximum cells        = 100000
 set Output base filename = data-singular/
 set Output format        = ucd
index 6f055f91e2f7e818726ded51d9fed68f36bc5b10..d4b53f46c533d1eb22d4d321fc1dd0bd4fedb621 100644 (file)
@@ -547,7 +547,29 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       cout << endl << endl;
       ++refine_step;
     };
+
+  String filename = prm.get ("Output base filename");
+  switch (refine_mode) 
+    {
+      case global:
+           filename += "global.";
+           break;
+      case true_error:
+           filename += "true_error.";
+           break;
+      case error_estimator:
+           filename += "estimated_error.";
+           break;
+    };
+
+  cout << endl;
   
+  filename += "finest_mesh.gnuplot";
+  cout << "    Wrinting finest grid to <" << filename << ">... " << endl;
+  ofstream finest_mesh (filename);
+  tria->print_gnuplot (finest_mesh);
+  finest_mesh.close();
+
   print_history (prm, refine_mode);
   cout << endl << endl << endl;
 
index 06340e21a437447387a996450910bb0a38a6f00c..49b88af9ee0814610618ea96abe97632d1221fd9 100644 (file)
@@ -16,14 +16,13 @@ set output "data-gauss/history.true_error.eps"
 plot "data-gauss/history.true_error.gnuplot" using 1:2 title "L2 error","data-gauss/history.true_error.gnuplot" using 1:3 title "Linfty error","data-gauss/history.true_error.gnuplot" using 1:4 title "H1 error","data-gauss/history.true_error.gnuplot" using 1:5 title "Estimated H1 error"
 
 
-
 set output "data-gauss/history.estimated_error.eps"
 
 plot "data-gauss/history.estimated_error.gnuplot" using 1:2 title "L2 error","data-gauss/history.estimated_error.gnuplot" using 1:3 title "Linfty error","data-gauss/history.estimated_error.gnuplot" using 1:4 title "H1 error","data-gauss/history.estimated_error.gnuplot" using 1:5 title "Estimated H1 error"
 
 
 set output "data-gauss/history.compare.eps"
-plot "data-gauss/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-gauss/history.true_error.gnuplot" using 1:2 title "ref. by true error -- L2 error", "data-gauss/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-gauss/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-gauss/history.true_error.gnuplot" using 1:4 title "ref. by true error -- H1 error", "data-gauss/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-gauss/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-gauss/history.true_error.gnuplot" using 1:2 title "ref. by true error -- L2 error", "data-gauss/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 0.1/sqrt(x) title "O(h)", "data-gauss/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-gauss/history.true_error.gnuplot" using 1:4 title "ref. by true error -- H1 error", "data-gauss/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 0.04/x title "O(h^2)"
 
 
 
@@ -40,7 +39,7 @@ plot "data-singular/history.estimated_error.gnuplot" using 1:2 title "L2 error",
 
 
 set output "data-singular/history.compare.eps"
-plot "data-singular/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-singular/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-singular/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-singular/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-singular/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-singular/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 1.1/x**0.33 title "O(h^2/3)", 2./sqrt(x) title "O(h)", "data-singular/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-singular/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 0.2/x**0.4 title "O(h^0.8)", 4./x title "O(h^2)"
 
 
 
@@ -59,4 +58,36 @@ plot "data-kink/history.estimated_error.gnuplot" using 1:2 title "L2 error","dat
 
 
 set output "data-kink/history.compare.eps"
-plot "data-kink/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-kink/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", "data-kink/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-kink/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error"
+plot "data-kink/history.global.gnuplot" using 1:2 title "global refinement -- L2 error", "data-kink/history.estimated_error.gnuplot" using 1:2 title "ref. by estimated error -- L2 error", 5/x**0.25 title "O(h^1/2)", 20/x**0.5 title "O(h)", "data-kink/history.global.gnuplot" using 1:4 title "global refinement -- H1 error", "data-kink/history.estimated_error.gnuplot" using 1:4 title "ref. by estimated error -- H1 error", 1.5/sqrt(x) title "O(h)", 20/x**0.95 title "O(h^1.8)"
+
+
+
+
+set parametric
+set data style lines
+set nologscale xy
+
+set output "data-gauss/finest_mesh.global.eps"
+plot "data-gauss/global.finest_mesh.gnuplot"
+
+set output "data-gauss/finest_mesh.true_error.eps"
+plot "data-gauss/true_error.finest_mesh.gnuplot"
+
+set output "data-gauss/finest_mesh.estimated_error.eps"
+plot "data-gauss/estimated_error.finest_mesh.gnuplot"
+
+
+
+set output "data-singular/finest_mesh.global.eps"
+plot "data-singular/global.finest_mesh.gnuplot"
+
+set output "data-singular/finest_mesh.estimated_error.eps"
+plot "data-singular/estimated_error.finest_mesh.gnuplot"
+
+
+
+set output "data-kink/finest_mesh.global.eps"
+plot "data-kink/global.finest_mesh.gnuplot"
+
+set output "data-kink/finest_mesh.estimated_error.eps"
+plot "data-kink/estimated_error.finest_mesh.gnuplot"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.