From: Peter Munch Date: Sat, 21 Nov 2020 14:28:21 +0000 (+0100) Subject: Enable DataOut for mixed meshes X-Git-Tag: v9.3.0-rc1~875^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4402bbd08700bdc6622d30f423f2619ecc722c7;p=dealii.git Enable DataOut for mixed meshes --- 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. //