From: oliver Date: Tue, 31 May 2005 16:08:43 +0000 (+0000) Subject: Implemented an option to output the solution of deformed meshes, X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1554fb34d73706b8b92dea3668c42b251139dc52;p=dealii-svn.git Implemented an option to output the solution of deformed meshes, which result from using the MappingQ1Eulerian class. git-svn-id: https://svn.dealii.org/trunk@10792 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index 37394889d8..a67e808e53 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -405,7 +405,8 @@ void DataOut::build_some_patches (Data data) Assert (patch != this->patches.end(), ExcInternalError()); for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) - patch->vertices[vertex] = cell->vertex(vertex); + patch->vertices[vertex] = data.mapping->transform_unit_to_real_cell + (cell, GeometryInfo::unit_cell_vertex (vertex)); if (data.n_datasets > 0) { @@ -566,6 +567,16 @@ void DataOut::build_some_patches (Data data) template void DataOut::build_patches (const unsigned int n_subdivisions, const unsigned int n_threads_) +{ + static const MappingQ1 mapping; + build_patches (mapping, n_subdivisions, n_threads_); +} + + +template +void DataOut::build_patches (const Mapping &mapping, + const unsigned int n_subdivisions, + const unsigned int n_threads_) { Assert (n_subdivisions >= 1, ExcInvalidNumberOfSubdivisions(n_subdivisions)); @@ -663,6 +674,7 @@ void DataOut::build_patches (const unsigned int n_subdivisions, thread_data[i].n_subdivisions = n_subdivisions; thread_data[i].patch_values.resize (n_q_points); thread_data[i].patch_values_system.resize (n_q_points); + thread_data[i].mapping = &mapping; thread_data[i].cell_to_patch_index_map = &cell_to_patch_index_map;