]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Enable DataOut for mixed meshes 11225/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 21 Nov 2020 14:28:21 +0000 (15:28 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 21 Nov 2020 14:28:21 +0000 (15:28 +0100)
source/numerics/data_out.cc

index 348b2a8351710eb3526a11743d3582f1487796a3..3b3dd505ed70ce1d5e26f8a7d177aa86b8e834c2 100644 (file)
@@ -110,7 +110,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
   // (e.g. MappingQEulerian), we need to compute the offset of the vertex for
   // the graphical output. Otherwise, we can just use the vertex info.
   for (const unsigned int vertex : cell_and_index->first->vertex_indices())
-    if (fe_patch_values.get_mapping().preserves_vertex_locations())
+    if (scratch_data.mapping_collection[0].preserves_vertex_locations())
       patch.vertices[vertex] = cell_and_index->first->vertex(vertex);
     else
       patch.vertices[vertex] =
@@ -120,6 +120,19 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
 
   const unsigned int n_q_points = fe_patch_values.n_quadrature_points;
 
+  scratch_data.patch_values_scalar.solution_values.resize(n_q_points);
+  scratch_data.patch_values_scalar.solution_gradients.resize(n_q_points);
+  scratch_data.patch_values_scalar.solution_hessians.resize(n_q_points);
+  scratch_data.patch_values_system.solution_values.resize(n_q_points);
+  scratch_data.patch_values_system.solution_gradients.resize(n_q_points);
+  scratch_data.patch_values_system.solution_hessians.resize(n_q_points);
+
+  for (unsigned int dataset = 0;
+       dataset < scratch_data.postprocessed_values.size();
+       ++dataset)
+    if (scratch_data.postprocessed_values[dataset].size() != 0)
+      scratch_data.postprocessed_values[dataset].resize(n_q_points);
+
   // First fill the geometric information for the patch: Where are the
   // nodes in question located.
   //

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.