]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-34: fixes a runtime error in step-34 476/head
authorUwe Köcher <koecher@hsu-hamburg.de>
Tue, 27 Jan 2015 14:47:09 +0000 (15:47 +0100)
committerUwe Köcher <koecher@hsu-hamburg.de>
Tue, 3 Feb 2015 18:56:27 +0000 (19:56 +0100)
In the function output_results, around line 1017, two vectors (phi and alpha)
are added to a DataOut object.
A runtime error occured, because the type of the vector could not
determined automatically.

On branch dataout-issue-step-34
  Changes to be committed:
        modified:   examples/step-34/step-34.cc

examples/step-34/step-34.cc

index fb5d3a517b8f392b6f1ea7a26d84b310097a0592..ac98200604c460eddc4a33ee053704600e96f50f 100644 (file)
@@ -1010,8 +1010,10 @@ namespace Step34
     DataOut<dim-1, DoFHandler<dim-1, dim> > dataout;
 
     dataout.attach_dof_handler(dh);
-    dataout.add_data_vector(phi, "phi");
-    dataout.add_data_vector(alpha, "alpha");
+    dataout.add_data_vector(phi, "phi",
+                            DataOut<dim-1, DoFHandler<dim-1, dim> >::type_dof_data);
+    dataout.add_data_vector(alpha, "alpha",
+                            DataOut<dim-1, DoFHandler<dim-1, dim> >::type_dof_data);
     dataout.build_patches(mapping,
                           mapping.get_degree(),
                           DataOut<dim-1, DoFHandler<dim-1, dim> >::curved_inner_cells);

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.