]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implemented an option to output the solution of deformed meshes,
authoroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 May 2005 16:08:43 +0000 (16:08 +0000)
committeroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 May 2005 16:08:43 +0000 (16:08 +0000)
which result from using the MappingQ1Eulerian class.

git-svn-id: https://svn.dealii.org/trunk@10792 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/data_out.cc

index 37394889d8df2c201720465fc6e92878d560716f..a67e808e5386809a0169e2bada6dce184aebeac0 100644 (file)
@@ -405,7 +405,8 @@ void DataOut<dim>::build_some_patches (Data data)
       Assert (patch != this->patches.end(), ExcInternalError());
 
       for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
-       patch->vertices[vertex] = cell->vertex(vertex);
+         patch->vertices[vertex] = data.mapping->transform_unit_to_real_cell
+             (cell, GeometryInfo<dim>::unit_cell_vertex (vertex));
       
       if (data.n_datasets > 0)
        {
@@ -566,6 +567,16 @@ void DataOut<dim>::build_some_patches (Data data)
 template <int dim>
 void DataOut<dim>::build_patches (const unsigned int n_subdivisions,
                                  const unsigned int n_threads_) 
+{
+  static const MappingQ1<dim> mapping;
+  build_patches (mapping, n_subdivisions, n_threads_);
+}
+
+
+template <int dim>
+void DataOut<dim>::build_patches (const Mapping<dim> &mapping,
+                                 const unsigned int n_subdivisions,
+                                 const unsigned int n_threads_) 
 {
   Assert (n_subdivisions >= 1,
          ExcInvalidNumberOfSubdivisions(n_subdivisions));
@@ -663,6 +674,7 @@ void DataOut<dim>::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;
       

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.