# 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
@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
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
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
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
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;
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)"
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)"
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"
# 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
@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
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
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
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
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;
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)"
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)"
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"