From c4402bbd08700bdc6622d30f423f2619ecc722c7 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 21 Nov 2020 15:28:21 +0100 Subject: [PATCH] Enable DataOut for mixed meshes --- source/numerics/data_out.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index 348b2a8351..3b3dd505ed 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -110,7 +110,7 @@ DataOut::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::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. // -- 2.39.5