From: kanschat Date: Thu, 6 May 2010 22:01:02 +0000 (+0000) Subject: adding some results X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97c9c7ac51135f96dac04a6c3da4300ebff37501;p=dealii-svn.git adding some results git-svn-id: https://svn.dealii.org/trunk@21081 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-39/Makefile b/deal.II/examples/step-39/Makefile index 4a33ab61d8..01ea1089e2 100644 --- a/deal.II/examples/step-39/Makefile +++ b/deal.II/examples/step-39/Makefile @@ -98,7 +98,7 @@ run: $(target) @echo ============================ Running $< @./$(target)$(EXEEXT) @echo ============================ Postprocessing to step-39.dat - @$(PERL) postprocess.pl step-39.log > step-39.dat + @$(PERL) postprocess.pl deallog > output.dat # As a last rule to the `make' program, we define what to do when # cleaning up a directory. This usually involves deleting object files diff --git a/deal.II/examples/step-39/doc/results.dox b/deal.II/examples/step-39/doc/results.dox index a79c9a63f4..236939ef23 100644 --- a/deal.II/examples/step-39/doc/results.dox +++ b/deal.II/examples/step-39/doc/results.dox @@ -1,3 +1,90 @@

Results

+

Logfile output

+First, the program produces the usual logfile here stored in deallog. It reads (with ommission of intermediate steps) +
+DEAL::Element: FE_DGQ<2>(3)
+DEAL::Step 0
+DEAL::Triangulation 4 cells, 1 levels
+DEAL::DoFHandler 64 dofs, level dofs 64
+DEAL::Assemble matrix
+DEAL::Assemble multilevel matrix
+DEAL::Assemble right hand side
+DEAL::Solve
+DEAL:cg::Starting value 27.1275
+DEAL:cg::Convergence step 1 value 1.97998e-14
+DEAL::Error    0.161536
+DEAL::Estimate 1.35839
+DEAL::Writing solution to ...
+DEAL::
+DEAL::Step 1
+DEAL::Triangulation 10 cells, 2 levels
+DEAL::DoFHandler 160 dofs, level dofs 64 128
+DEAL::Assemble matrix
+DEAL::Assemble multilevel matrix
+DEAL::Assemble right hand side
+DEAL::Solve
+DEAL:cg::Starting value 35.5356
+DEAL:cg::Convergence step 10 value 1.24790e-13
+DEAL::Error    0.164997
+DEAL::Estimate 1.08528
+DEAL::Writing solution to ...
+DEAL::
+DEAL::Step 2
+DEAL::Triangulation 16 cells, 2 levels
+DEAL::DoFHandler 256 dofs, level dofs 64 256
+DEAL::Assemble matrix
+DEAL::Assemble multilevel matrix
+DEAL::Assemble right hand side
+DEAL::Solve
+DEAL:cg::Starting value 37.0552
+DEAL:cg::Convergence step 10 value 4.74024e-14
+DEAL::Error    0.113596
+DEAL::Estimate 0.990460
+DEAL::Writing solution to ...
 
+...
+
+DEAL::Step 10
+DEAL::Triangulation 124 cells, 9 levels
+DEAL::DoFHandler 1984 dofs, level dofs 64 256 512 512 256 256 256 256 256
+DEAL::Assemble matrix
+DEAL::Assemble multilevel matrix
+DEAL::Assemble right hand side
+DEAL::Solve
+DEAL:cg::Starting value 38.5798
+DEAL:cg::Convergence step 12 value 7.56337e-14
+DEAL::Error    0.0101279
+DEAL::Estimate 0.0957571
+DEAL::Writing solution to ...
+DEAL::
+DEAL::Step 11
+DEAL::Triangulation 163 cells, 10 levels
+DEAL::DoFHandler 2608 dofs, level dofs 64 256 768 576 512 256 256 256 256 256
+DEAL::Assemble matrix
+DEAL::Assemble multilevel matrix
+DEAL::Assemble right hand side
+DEAL::Solve
+DEAL:cg::Starting value 44.1721
+DEAL:cg::Convergence step 12 value 9.49720e-14
+DEAL::Error    0.00716966
+DEAL::Estimate 0.0681646
+DEAL::Writing solution to ...
+
+ +This log for instance shows that the number of conjugate gradient +iteration steps is constant at approximately 12. + +

Postprocessing of the logfile

+ +Convergence graphs +Using the perl script postprocess.pl, we extract relevant +data into output.dat, which can be used to plot graphs with +gnuplot. The graph on the right for instance was produced with +
+set style data linespoints
+set logscale
+set xrange [50:3000]
+plot "output.dat" using 2:3 title "error", "" using 2:4 title "estimate", \
+     "" using 2:(3000*$2**-1.5) title "3rd order"
+
diff --git a/deal.II/examples/step-39/doc/step-39-convergence.png b/deal.II/examples/step-39/doc/step-39-convergence.png new file mode 100644 index 0000000000..3f85cdf078 Binary files /dev/null and b/deal.II/examples/step-39/doc/step-39-convergence.png differ diff --git a/deal.II/examples/step-39/step-39.cc b/deal.II/examples/step-39/step-39.cc index 04dfa1bc48..2e6186cea3 100644 --- a/deal.II/examples/step-39/step-39.cc +++ b/deal.II/examples/step-39/step-39.cc @@ -711,9 +711,9 @@ Step39::run(unsigned int n_steps) int main() { - std::ofstream logfile("step-39.log"); + std::ofstream logfile("deallog"); deallog.attach(logfile); FE_DGQ<2> fe1(3); Step39<2> test1(fe1); - test1.run(20); + test1.run(12); }