]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Limit growth of active_fe_index by the number of finite elements in
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Feb 2006 21:57:11 +0000 (21:57 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Feb 2006 21:57:11 +0000 (21:57 +0000)
the list. Also output the active_fe_index fields.

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

deal.II/examples/step-21/step-21.cc

index a7a9ed989f319d1265f5502d428915437236cd7f..e2ab470d2fc5427c22048d6af536088f4045bec3 100644 (file)
@@ -1648,6 +1648,16 @@ void DGMethod<dim>::output_results (const unsigned int cycle) const
 
   GridOut grid_out;
   grid_out.write_eps (triangulation, eps_output);
+
+  Vector<double> active_fe_indices (triangulation.n_active_cells());
+  {
+    unsigned int index = 0;
+    for (typename hp::DoFHandler<dim>::active_cell_iterator
+          cell = dof_handler.begin_active();
+        cell != dof_handler.end(); ++cell, ++index)
+      active_fe_indices(index) = cell->active_fe_index ();
+  }
+  
   
                                   // Output of the solution in
                                   // gnuplot format.
@@ -1664,6 +1674,7 @@ void DGMethod<dim>::output_results (const unsigned int cycle) const
   DataOut<dim, hp::DoFHandler> data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution2, "u");
+  data_out.add_data_vector (active_fe_indices, "fe_index");
 
   data_out.build_patches (4);
   

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.