]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added an image and cleared some details.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 12 Apr 2009 08:58:18 +0000 (08:58 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 12 Apr 2009 08:58:18 +0000 (08:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@18597 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-34/doc/results.dox
deal.II/examples/step-34/doc/step-34_3d-2.png [new file with mode: 0644]
deal.II/examples/step-34/step-34.cc

index e6849a3bb0b592484fcc374900cccd137292e127..57e6ab15394e094e6f071b6dabf0c7ff50b06d6e 100644 (file)
@@ -145,7 +145,11 @@ like
 
 @image html step-34_2d.png
 
-while in three dimensions we only show the potential on the surface,
-together with a countur plot:
+while in three dimensions we show first the potential on the surface,
+together with a contur plot,
 
 @image html step-34_3d.png
+
+and then the external contur plot of the potential, with opacity set to 25%:
+
+@image html step-34_3d-2.png
diff --git a/deal.II/examples/step-34/doc/step-34_3d-2.png b/deal.II/examples/step-34/doc/step-34_3d-2.png
new file mode 100644 (file)
index 0000000..cbbadc6
Binary files /dev/null and b/deal.II/examples/step-34/doc/step-34_3d-2.png differ
index b60f78c57a1e9e34ff62f8ffd8e5a5e8819f109b..f23e21a8fa1dc70ced5464c4601a3af48daef643 100644 (file)
@@ -1,5 +1,5 @@
 //----------------------------  step-34.cc  ---------------------------
-//    $Id: testsuite.html 13373 2006-07-13 13:12:08Z manigrasso $
+//    $Id: testsuite.html 13373 2006-07-13 13:12:08Z heltai $
 //    Version: $Name$ 
 //
 //    Copyright (C) 2009 by the deal.II authors 
@@ -446,7 +446,7 @@ void BEMProblem<dim>::read_parameters (const std::string filename) {
     // "Run 3d simulation" flag to false.
     //
     // This is another example of how to use parameter files in
-    // dimensio independent programming.
+    // dimension independent programming.
     run_in_this_dimension = prm.get_bool("Run " + 
                                          Utilities::int_to_string(dim) +
                                          "d simulation");
@@ -779,11 +779,12 @@ void BEMProblem<dim>::assemble_system() {
     }
     // One quick way to compute the diagonal matrix of the solid
     // angles, is to use the Neumann matrix itself. It is enough to
-    // multiply the matrix with the vector of ones, to get the
-    // diagonal matrix of the alpha solid angles.
+    // multiply the matrix with a vector of elements all equal to -1.,
+    // to get the diagonal matrix of the alpha angles, or solid
+    // angles.
     Vector<double> ones(dh.n_dofs());
-    for(unsigned int i=0; i<dh.n_dofs(); ++i) 
-        ones(i) = -1.;
+    ones.add(-1.);
+
     system_matrix.vmult(alpha, ones);
     for(unsigned int i = 0; i<dh.n_dofs(); ++i) {
         system_matrix.add(i,i,alpha(i));
@@ -948,14 +949,14 @@ void BEMProblem<dim>::output_results(unsigned int cycle) {
     std::ofstream file(filename.c_str());
     
     dataout.write_vtk(file);
-
-    convergence_table.set_precision("L2(phi)", 3);
-    convergence_table.set_precision("Linfty(alpha)", 3);
-    
-    convergence_table.set_scientific("L2(phi)", true);
-    convergence_table.set_scientific("Linfty(alpha)", true);
     
     if(cycle == n_cycles-1) {
+       convergence_table.set_precision("L2(phi)", 3);
+       convergence_table.set_precision("Linfty(alpha)", 3);
+       
+       convergence_table.set_scientific("L2(phi)", true);
+       convergence_table.set_scientific("Linfty(alpha)", true);
+       
        convergence_table
            .evaluate_convergence_rates("L2(phi)", ConvergenceTable::reduction_rate_log2);
        convergence_table

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.