]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
remove MeshWorker::IntegrationWorker
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Jun 2010 22:19:40 +0000 (22:19 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Jun 2010 22:19:40 +0000 (22:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@21219 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/mesh_worker_01.cc
tests/deal.II/mesh_worker_02.cc
tests/multigrid/mg_renumbered_01.cc
tests/multigrid/renumbering_01.cc
tests/multigrid/renumbering_02.cc

index b4cbe552c5b4ce8dbc3469b956884407ec5723e4..dd241600a8cbfde2b6210476b9ef953d02142c56 100644 (file)
@@ -41,7 +41,7 @@ template <int dim>
 class Local : public Subscriptor
 {
   public:
-    typedef typename MeshWorker::IntegrationWorker<dim>::CellInfo CellInfo;
+    typedef MeshWorker::IntegrationInfo<dim> CellInfo;
     
     void cell(MeshWorker::DoFInfo<dim>& dinfo, CellInfo& info) const;
     void bdry(MeshWorker::DoFInfo<dim>& dinfo, CellInfo& info) const;
@@ -144,29 +144,27 @@ test_simple(MGDoFHandler<dim>& mgdofs)
   local.cells = true;
   local.faces = false;
 
-  MeshWorker::IntegrationWorker<dim> integrator;
-  integrator.initialize_gauss_quadrature(1, 1, 1);
+  MappingQ1<dim> mapping;
+  
+  MeshWorker::IntegrationInfoBox<dim> info_box;
+  info_box.initialize_gauss_quadrature(1, 1, 1);
+  info_box.initialize_update_flags();
+  info_box.initialize(fe, mapping);
+  
+  MeshWorker::DoFInfo<dim> dof_info(dofs);
   
   MeshWorker::Assembler::SystemSimple<SparseMatrix<double>, Vector<double> >
     assembler;
   assembler.initialize(matrix, v);
-
-  {
-    MappingQ1<dim> mapping;
-
-    MeshWorker::IntegrationInfoBox<dim> info_box;
-    info_box.initialize(integrator, fe, mapping);
-    MeshWorker::DoFInfo<dim> dof_info(dofs);
-    
-    MeshWorker::integration_loop<dim, dim>
-      (dofs.begin_active(), dofs.end(),
-       dof_info, info_box,
-       std_cxx1x::bind (&Local<dim>::cell, local, _1, _2),
+  
+  MeshWorker::integration_loop<dim, dim>
+    (dofs.begin_active(), dofs.end(),
+     dof_info, info_box,
+     std_cxx1x::bind (&Local<dim>::cell, local, _1, _2),
        std_cxx1x::bind (&Local<dim>::bdry, local, _1, _2),
        std_cxx1x::bind (&Local<dim>::face, local, _1, _2, _3, _4),
        assembler, true);
-  }
-
+  
   for (unsigned int i=0;i<v.size();++i)
     deallog << ' ' << std::setprecision(3) << v(i);
   deallog << std::endl;
index 753e946ffb8f6d5e255924afa3d86f56fb3365a6..60fc73008493190cd6414d9454af5a76f0097b49 100644 (file)
@@ -41,19 +41,19 @@ class MatrixIntegrator : public Subscriptor
 {
   public:
     static void cell(MeshWorker::DoFInfo<dim>& dinfo,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info);
+                    MeshWorker::IntegrationInfo<dim>& info);
     static void bdry(MeshWorker::DoFInfo<dim>& dinfo,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info);
+                    MeshWorker::IntegrationInfo<dim>& info);
     static void face(MeshWorker::DoFInfo<dim>& dinfo1,
                     MeshWorker::DoFInfo<dim>& dinfo2,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info1,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info2);
+                    MeshWorker::IntegrationInfo<dim>& info1,
+                    MeshWorker::IntegrationInfo<dim>& info2);
 };
 
 
 template <int dim>
 void MatrixIntegrator<dim>::cell(MeshWorker::DoFInfo<dim>& dinfo,
-                                typename MeshWorker::IntegrationWorker<dim>::CellInfo& info)
+                                MeshWorker::IntegrationInfo<dim>& info)
 {
   const FEValuesBase<dim>& fe = info.fe_values();
   FullMatrix<double>& local_matrix = dinfo.matrix(0).matrix;
@@ -68,7 +68,7 @@ void MatrixIntegrator<dim>::cell(MeshWorker::DoFInfo<dim>& dinfo,
 
 template <int dim>
 void MatrixIntegrator<dim>::bdry(MeshWorker::DoFInfo<dim>& dinfo,
-                                typename MeshWorker::IntegrationWorker<dim>::CellInfo& info)
+                                MeshWorker::IntegrationInfo<dim>& info)
 {
   const FEValuesBase<dim>& fe = info.fe_values();
   FullMatrix<double>& local_matrix = dinfo.matrix(0).matrix;
@@ -89,8 +89,8 @@ void MatrixIntegrator<dim>::bdry(MeshWorker::DoFInfo<dim>& dinfo,
 template <int dim>
 void MatrixIntegrator<dim>::face(MeshWorker::DoFInfo<dim>& dinfo1,
                                 MeshWorker::DoFInfo<dim>& dinfo2,
-                                typename MeshWorker::IntegrationWorker<dim>::CellInfo& info1,
-                                typename MeshWorker::IntegrationWorker<dim>::CellInfo& info2)
+                                MeshWorker::IntegrationInfo<dim>& info1,
+                                MeshWorker::IntegrationInfo<dim>& info2)
 {
   const FEValuesBase<dim>& fe1 = info1.fe_values();
   const FEValuesBase<dim>& fe2 = info2.fe_values();
@@ -133,22 +133,21 @@ void
 assemble(const DoFHandler<dim>& dof_handler, SparseMatrix<double>& matrix)
 {
   const FiniteElement<dim>& fe = dof_handler.get_fe();
-  MappingQ1<dim> mapping;
-  
-  MeshWorker::IntegrationWorker<dim> integration_worker;
-  MeshWorker::Assembler::MatrixSimple<SparseMatrix<double> > assembler;
+  MappingQ1<dim> mapping;  
   
+  MeshWorker::IntegrationInfoBox<dim> info_box;
   const unsigned int n_gauss_points = dof_handler.get_fe().tensor_degree()+1;
-  integration_worker.initialize_gauss_quadrature(n_gauss_points, n_gauss_points, n_gauss_points);
+  info_box.initialize_gauss_quadrature(n_gauss_points, n_gauss_points, n_gauss_points);
+  info_box.initialize_update_flags();
   UpdateFlags update_flags = update_values | update_gradients;
-  integration_worker.add_update_flags(update_flags, true, true, true, true);
-
-  assembler.initialize(matrix);
-  MeshWorker::IntegrationInfoBox<dim> info_box;
-  info_box.initialize(integration_worker, fe, mapping);
+  info_box.add_update_flags(update_flags, true, true, true, true);
+  info_box.initialize(fe, mapping);
+  
   MeshWorker::DoFInfo<dim> dof_info(dof_handler);
   
-  info_box.initialize(integration_worker, fe, mapping);
+  MeshWorker::Assembler::MatrixSimple<SparseMatrix<double> > assembler;
+  assembler.initialize(matrix);
+  
   MeshWorker::integration_loop<dim, dim>
     (dof_handler.begin_active(),
      dof_handler.end(),
@@ -171,19 +170,19 @@ assemble(const MGDoFHandler<dim>& dof_handler,
   const FiniteElement<dim>& fe = dof_handler.get_fe();
   MappingQ1<dim> mapping;
   
-  MeshWorker::IntegrationWorker<dim> integration_worker;
-  MeshWorker::Assembler::MGMatrixSimple<SparseMatrix<double> > assembler;
-
+  MeshWorker::IntegrationInfoBox<dim> info_box;
   const unsigned int n_gauss_points = dof_handler.get_fe().tensor_degree()+1;
-  integration_worker.initialize_gauss_quadrature(n_gauss_points, n_gauss_points, n_gauss_points);
+  info_box.initialize_gauss_quadrature(n_gauss_points, n_gauss_points, n_gauss_points);
+  info_box.initialize_update_flags();
   UpdateFlags update_flags = update_values | update_gradients;
-  integration_worker.add_update_flags(update_flags, true, true, true, true);
-
-  assembler.initialize(matrix);
-  MeshWorker::IntegrationInfoBox<dim> info_box;
-  info_box.initialize(integration_worker, fe, mapping);
+  info_box.add_update_flags(update_flags, true, true, true, true);
+  info_box.initialize(fe, mapping);
+  
   MeshWorker::DoFInfo<dim> dof_info(dof_handler);
-
+  
+  MeshWorker::Assembler::MGMatrixSimple<SparseMatrix<double> > assembler;
+  assembler.initialize(matrix);
+  
   MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
     (dof_handler.begin(),
      dof_handler.end(),
index 5aa8fdc4f45dbd0680e99bdaa3709e26e62aa2ca..f6c60157907f62d4db5b40df6f41a92653d1b408 100644 (file)
@@ -1,4 +1,14 @@
-#define baerbel_mg_test 1
+//----------------------------------------------------------------------------
+//    $Id$
+//
+//    Copyright (C) 2010 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------------------------------------------------------
 
 #include <base/quadrature_lib.h>
 #include <base/function.h>
index 50489f46f78b13d39fb7d25b60a80a65630ed7de..1622896689f3deaa08f8bb0b72cc51a9ba867c76 100644 (file)
@@ -1,8 +1,7 @@
 //----------------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$
 //
-//    Copyright (C) 2000 - 2006 by the deal.II authors
+//    Copyright (C) 2000 - 2006, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
index 0fd7541f13716d9b5d37b2885d6383b829e98e63..70a829cc8eba6b531b338553de2d431b45417a02 100644 (file)
@@ -1,8 +1,7 @@
 //----------------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$
 //
-//    Copyright (C) 2000 - 2006 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer

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.