]> https://gitweb.dealii.org/ - dealii.git/commitdiff
apply changes in library interface
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 15 Feb 2010 20:57:55 +0000 (20:57 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 15 Feb 2010 20:57:55 +0000 (20:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@20639 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-38/step-38.cc
deal.II/examples/step-39/step-39.cc

index eb030711a7228dcdd839d3e0b9f6e02da59b237b..43411b0cc60befe90564bc9f466e6f9c08d68b82 100644 (file)
@@ -360,7 +360,8 @@ void Step12<dim>::assemble_system ()
                                   // this is a handy shortcut. It
                                   // receives all the stuff we
                                   // created so far.
-  MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  MeshWorker::DoFInfo<dim> dof_info(dof_handler);
   info_box.initialize(integration_worker, fe, mapping);
 
                                   // Finally, the integration loop
@@ -386,9 +387,9 @@ void Step12<dim>::assemble_system ()
                                   // result of std::bind if the local
                                   // integrators were, for example,
                                   // non-static member functions.
-  MeshWorker::integration_loop<CellInfo, FaceInfo, dim>
+  MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
     (dof_handler.begin_active(), dof_handler.end(),
-     info_box,
+     dof_info, info_box,
      &Step12<dim>::integrate_cell_term,
      &Step12<dim>::integrate_boundary_term,
      &Step12<dim>::integrate_face_term,
@@ -627,7 +628,7 @@ void Step12<dim>::integrate_face_term (DoFInfo& dinfo1, DoFInfo& dinfo2,
 template <int dim>
 void Step12<dim>::solve (Vector<double> &solution)
 {
-  SolverControl           solver_control (1000, 1e-12, false, false);
+  SolverControl           solver_control (1000, 1e-12);
   SolverRichardson<>      solver (solver_control);
 
                                   // Here we create the
@@ -736,7 +737,7 @@ void Step12<dim>::output_results (const unsigned int cycle) const
   Assert (cycle < 10, ExcInternalError());
 
   filename += ".eps";
-  std::cout << "Writing grid to <" << filename << ">..." << std::endl;
+  deallog << "Writing grid to <" << filename << ">" << std::endl;
   std::ofstream eps_output (filename.c_str());
 
   GridOut grid_out;
@@ -749,8 +750,7 @@ void Step12<dim>::output_results (const unsigned int cycle) const
   Assert (cycle < 10, ExcInternalError());
 
   filename += ".gnuplot";
-  std::cout << "Writing solution to <" << filename << ">..."
-           << std::endl << std::endl;
+  deallog << "Writing solution to <" << filename << ">" << std::endl;
   std::ofstream gnuplot_output (filename.c_str());
 
   DataOut<dim> data_out;
@@ -770,7 +770,7 @@ void Step12<dim>::run ()
 {
   for (unsigned int cycle=0; cycle<6; ++cycle)
     {
-      std::cout << "Cycle " << cycle << ':' << std::endl;
+      deallog << "Cycle " << cycle << std::endl;
 
       if (cycle == 0)
        {
@@ -782,15 +782,15 @@ void Step12<dim>::run ()
        refine_grid ();
 
 
-      std::cout << "   Number of active cells:       "
-               << triangulation.n_active_cells()
-               << std::endl;
+      deallog << "Number of active cells:       "
+             << triangulation.n_active_cells()
+             << std::endl;
 
       setup_system ();
 
-      std::cout << "   Number of degrees of freedom: "
-               << dof_handler.n_dofs()
-               << std::endl;
+      deallog << "Number of degrees of freedom: "
+             << dof_handler.n_dofs()
+             << std::endl;
 
       assemble_system ();
       solve (solution);
index 7de4081c58b63122490349979cd1a34808012b5f..12f257628d4a1d1a1c38c2688b4fa4d707ba63aa 100644 (file)
@@ -443,11 +443,12 @@ Step39<dim>::assemble_matrix()
   integration_worker.add_update_flags(update_flags, true, true, true, true);
 
   assembler.initialize(matrix);
-  MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  MeshWorker::DoFInfo<dim> dof_info(dof_handler);
   info_box.initialize(integration_worker, fe, mapping);
-  MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+  MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >(
     dof_handler.begin_active(), dof_handler.end(),
-    info_box,
+    dof_info, info_box,
     &MatrixIntegrator<dim>::cell,
     &MatrixIntegrator<dim>::bdry,
     &MatrixIntegrator<dim>::face,
@@ -469,11 +470,12 @@ Step39<dim>::assemble_mg_matrix()
 
   assembler.initialize(mg_matrix);
   assembler.initialize_fluxes(mg_matrix_dg_up, mg_matrix_dg_down);
-  MeshWorker::IntegrationInfoBox<dim> info_box(mg_dof_handler);
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  MeshWorker::DoFInfo<dim> dof_info(mg_dof_handler);
   info_box.initialize(integration_worker, fe, mapping);
-  MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+  MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> > (
     mg_dof_handler.begin(), mg_dof_handler.end(),
-    info_box,
+    dof_info, info_box,
     &MatrixIntegrator<dim>::cell,
     &MatrixIntegrator<dim>::bdry,
     &MatrixIntegrator<dim>::face,
@@ -497,12 +499,13 @@ Step39<dim>::assemble_right_hand_side()
   Vector<double>* rhs = &right_hand_side;
   data.add(rhs, "RHS");
   assembler.initialize(data);
-  MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  MeshWorker::DoFInfo<dim> dof_info(dof_handler);
   info_box.initialize(integration_worker, fe, mapping);
   
-  MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+  MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >(
     dof_handler.begin_active(), dof_handler.end(),
-    info_box,
+    dof_info, info_box,
     &RHSIntegrator<dim>::cell,
     &RHSIntegrator<dim>::bdry,
     &RHSIntegrator<dim>::face,
@@ -618,11 +621,12 @@ Step39<dim>::estimate()
   BlockVector<double>* est = &estimates;
   out_data.add(est, "cells");
   assembler.initialize(out_data, false);
-  MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  MeshWorker::DoFInfo<dim> dof_info(dof_handler);
   info_box.initialize(integration_worker, fe, mapping, solution_data);
-  MeshWorker::integration_loop<CellInfo, FaceInfo, dim> (
+  MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> > (
     dof_handler.begin_active(), dof_handler.end(),
-    info_box,
+    dof_info, info_box,
     &Estimator<dim>::cell,
     &Estimator<dim>::bdry,
     &Estimator<dim>::face,

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.