]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
oops, I did not know we use MeshWorker here
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jun 2010 14:44:58 +0000 (14:44 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jun 2010 14:44:58 +0000 (14:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@21221 0785d39b-7218-0410-832d-ea1e28bc413d

tests/multigrid/mg_renumbered_02.cc
tests/multigrid/mg_renumbered_03.cc

index 9eb462bb478f7cc9ae4638d24c8b2dd9a9983c74..82521f0829b5e5b4a272af8b9bd0c33462fd66d0 100644 (file)
@@ -153,14 +153,14 @@ class OutputCreator : public Subscriptor
 {
   public:
     void cell(MeshWorker::DoFInfo<dim>& dinfo,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info);
+                    MeshWorker::IntegrationInfo<dim>& info);
 
 };
 
 template <int dim>
 void OutputCreator<dim>::cell(
   MeshWorker::DoFInfo<dim>& dinfo,
-  typename MeshWorker::IntegrationWorker<dim>::CellInfo& info)
+  MeshWorker::IntegrationInfo<dim>& info)
 {
   const FEValuesBase<dim>& fe = info.fe_values();
   const std::vector<std::vector<double> >& uh = info.values[0];
@@ -183,7 +183,7 @@ template <int dim>
 class LaplaceProblem
 {
   public:
-    typedef typename MeshWorker::IntegrationWorker<dim>::CellInfo CellInfo;
+    typedef MeshWorker::IntegrationInfo<dim> CellInfo;
 
     LaplaceProblem (const unsigned int deg);
     void run ();
@@ -247,26 +247,23 @@ void
 LaplaceProblem<dim>::output_gpl(const MGDoFHandler<dim> &dof,
     MGLevelObject<Vector<double> > &v)
 {
-  MeshWorker::IntegrationWorker<dim> integration_worker;
-  MeshWorker::Assembler::GnuplotPatch assembler;
-
+  MeshWorker::IntegrationInfoBox<dim> info_box;
   const unsigned int n_gauss_points = dof.get_fe().tensor_degree();
   QTrapez<1> trapez;
   QIterated<dim> quadrature(trapez, n_gauss_points);
-  integration_worker.cell_quadrature = quadrature;
+  info_box.cell_quadrature = quadrature;
   UpdateFlags update_flags = update_quadrature_points | update_values | update_gradients;
-  integration_worker.add_update_flags(update_flags, true, true, true, true);
-
+  info_box.add_update_flags(update_flags, true, true, true, true);
+  
   NamedData<MGLevelObject<Vector<double> >* > data;
   data.add(&v, "mg_vector");
-  MeshWorker::VectorSelector cs;
-  cs.add("mg_vector");
-  integration_worker.cell_selector = cs;
+  info_box.cell_selector.add("mg_vector");
+  info_box.initialize(fe, mapping, data);
 
-  assembler.initialize(dim, quadrature.size(), dim+dof.get_fe().n_components());
-  MeshWorker::IntegrationInfoBox<dim> info_box;
   MeshWorker::DoFInfo<dim> dof_info(dof);
-  info_box.initialize(integration_worker, fe, mapping, data);
+
+  MeshWorker::Assembler::GnuplotPatch assembler;
+  assembler.initialize(dim, quadrature.size(), dim+dof.get_fe().n_components());
 
   for(unsigned int l=0; l<triangulation.n_levels(); ++l)
   {
index 5814f228f51537bf0072d1e9c5a5585df1a1bcc6..d3b13db33538a44b1393fc7bfa3c868229a88ed3 100644 (file)
@@ -171,14 +171,14 @@ class OutputCreator : public Subscriptor
 {
   public:
     void cell(MeshWorker::DoFInfo<dim>& dinfo,
-                    typename MeshWorker::IntegrationWorker<dim>::CellInfo& info);
+                    MeshWorker::IntegrationInfo<dim>& info);
 
 };
 
 template <int dim>
 void OutputCreator<dim>::cell(
   MeshWorker::DoFInfo<dim>& dinfo,
-  typename MeshWorker::IntegrationWorker<dim>::CellInfo& info)
+  MeshWorker::IntegrationInfo<dim>& info)
 {
   const FEValuesBase<dim>& fe = info.fe_values();
   const std::vector<std::vector<double> >& uh = info.values[0];
@@ -201,7 +201,7 @@ template <int dim>
 class LaplaceProblem
 {
   public:
-    typedef typename MeshWorker::IntegrationWorker<dim>::CellInfo CellInfo;
+    typedef MeshWorker::IntegrationInfo<dim> CellInfo;
 
     LaplaceProblem (const unsigned int deg);
     void run ();
@@ -273,26 +273,23 @@ void
 LaplaceProblem<dim>::output_gpl(const MGDoFHandler<dim> &dof,
     MGLevelObject<Vector<double> > &v)
 {
-  MeshWorker::IntegrationWorker<dim> integration_worker;
-  MeshWorker::Assembler::GnuplotPatch assembler;
-
+  MeshWorker::IntegrationInfoBox<dim> info_box;
   const unsigned int n_gauss_points = dof.get_fe().tensor_degree();
   QTrapez<1> trapez;
   QIterated<dim> quadrature(trapez, n_gauss_points);
-  integration_worker.cell_quadrature = quadrature;
-  UpdateFlags update_flags = update_quadrature_points | update_values | update_gradients;
-  integration_worker.add_update_flags(update_flags, true, true, true, true);
-
+  info_box.cell_quadrature = quadrature;
   NamedData<MGLevelObject<Vector<double> >* > data;
   data.add(&v, "mg_vector");
-  MeshWorker::VectorSelector cs;
-  cs.add("mg_vector");
-  integration_worker.cell_selector = cs;
+  info_box.cell_selector.add("mg_vector");
+  info_box.initialize_update_flags();
+  UpdateFlags update_flags = update_quadrature_points | update_values | update_gradients;
+  info_box.add_update_flags(update_flags, true, true, true, true);
+  info_box.initialize(fe, mapping, data);  
+  
+  MeshWorker::DoFInfo<dim> dof_info(dof);
 
+  MeshWorker::Assembler::GnuplotPatch assembler;
   assembler.initialize(dim, quadrature.size(), dim+dof.get_fe().n_components());
-  MeshWorker::IntegrationInfoBox<dim> info_box;
-  MeshWorker::DoFInfo<dim> dof_info(dof);
-  info_box.initialize(integration_worker, fe, mapping, data);
 
   for(unsigned int l=0; l<triangulation.n_levels(); ++l)
   {

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.