]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add data exchange to KElly
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 26 May 2013 22:04:50 +0000 (22:04 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 26 May 2013 22:04:50 +0000 (22:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@29623 0785d39b-7218-0410-832d-ea1e28bc413d

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

index bd9ff81261cd033ea41f194f9b66f9fcaaa53dd2..7bdde8d208006e9c8a75106c9eaa17d3721c5608 100644 (file)
@@ -950,10 +950,17 @@ namespace Step50
   {
     Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
 
+    TrilinosWrappers::MPI::Vector temp_solution;
+    IndexSet idx;
+    DoFTools::extract_locally_relevant_dofs (mg_dof_handler,
+                                             idx);
+    temp_solution.reinit(idx, MPI_COMM_WORLD);
+    temp_solution = solution;
+    
     KellyErrorEstimator<dim>::estimate (static_cast<DoFHandler<dim>&>(mg_dof_handler),
                                         QGauss<dim-1>(3),
                                         typename FunctionMap<dim>::type(),
-                                        solution,
+                                        temp_solution,
                                         estimated_error_per_cell);
     GridRefinement::refine_and_coarsen_fixed_number (triangulation,
                                                      estimated_error_per_cell,
@@ -1017,7 +1024,7 @@ namespace Step50
           }
         else
           triangulation.refine_global (1);
-          //refine_grid ();
+          //refine_grid ();
 
 
         deallog << "   Number of active cells:       "

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.