]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Fix some code gallery programs. 107/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 18 Jul 2022 23:48:30 +0000 (17:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 19 Jul 2022 16:37:30 +0000 (10:37 -0600)
This is not enough to make all of them compile, much less compile without
warning. But it is a step.

15 files changed:
Distributed_LDG_Method/LDGPoisson.cc
ElastoplasticTorsion/ElastoplasticTorsion.cc
Linear_Elastic_Active_Skeletal_Muscle_Model/Linear_active_muscle_model.cc
MCMC-Laplace/mcmc-laplace.cc
MultipointFluxMixedFiniteElementMethods/mfmfe.cc
NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc
Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc
Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc
Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc
advection_reaction_estimator/source/DG_advection_reaction.cc
cdr/solver/cdr.cc
goal_oriented_elastoplasticity/elastoplastic.cc
two_phase_flow/MultiPhase.cc
two_phase_flow/TestLevelSet.cc
two_phase_flow/utilities.cc

index 5db57a263858cfc1a596ac3cfa58a18a646e5184..3fd0b1f1943ef7ffecdb6d282017d27008446192 100644 (file)
@@ -330,8 +330,8 @@ make_dofs()
   DoFTools::extract_locally_relevant_dofs(dof_handler,
                                           locally_relevant_dofs);
 
-  std::vector<types::global_dof_index> dofs_per_component(dim+1);
-  DoFTools::count_dofs_per_component(dof_handler, dofs_per_component);
+  const std::vector<types::global_dof_index> dofs_per_component =
+    DoFTools::count_dofs_per_fe_component(dof_handler);
 
   // Discontinuous Galerkin methods are fantanistic methods in part because
   // many of the limitations of traditional finite element methods no longer
@@ -360,7 +360,7 @@ make_dofs()
                                        dsp);
 
   SparsityTools::distribute_sparsity_pattern(dsp,
-                                             dof_handler.n_locally_owned_dofs_per_processor(),
+                                             dof_handler.locally_owned_dofs(),
                                              MPI_COMM_WORLD,
                                              locally_relevant_dofs);
 
@@ -641,7 +641,7 @@ assemble_system()
                       // compute the interior fluxes across the children faces
                       // and the neighbor's face.
                       for (unsigned int subface_no=0;
-                           subface_no < face->number_of_children();
+                           subface_no < face->n_children();
                            ++subface_no)
                         {
                           // We then get the neighbor cell's subface that
index 05bad669ec3bc0e63fb7d3071460c867a10f11d3..f00658a2fcf1283134fba991c17ae2aa69e987ef 100644 (file)
@@ -553,7 +553,7 @@ namespace nsp
     H1_error = difference_per_cell.l2_norm();
 
     // compute W1infty error (save to difference_per_cell)
-    const QTrapez<1> q_trapez;
+    const QTrapezoid<1> q_trapez;
     const QIterated<dim> q_iterated (q_trapez, 5);
     VectorTools::integrate_difference (dof_handler,present_solution,Solution<dim>(),
                                        difference_per_cell,q_iterated,VectorTools::W1infty_seminorm);
@@ -746,7 +746,7 @@ namespace nsp
     std::map<types::global_dof_index,double> boundary_values;
     VectorTools::interpolate_boundary_values (dof_handler,
                                               0,
-                                              ZeroFunction<dim>(),
+                                              Functions::ZeroFunction<dim>(),
                                               boundary_values);
     MatrixTools::apply_boundary_values (boundary_values,
                                         system_matrix,
@@ -958,7 +958,7 @@ namespace nsp
   double ElastoplasticTorsion<dim>::dual_infty_error () const
   {
     double obj = 0.0;
-    const QTrapez<1> q_trapez;
+    const QTrapezoid<1> q_trapez;
     const QIterated<dim> quadrature_formula (q_trapez, 10);
 
     FEValues<dim> fe_values (fe, quadrature_formula,
index dd656555107b6d5ca5d9a664e8024636a9529a8c..f42a63eb43c0349491c4a86c9b636ba22e4b49c8 100644 (file)
@@ -1039,7 +1039,7 @@ namespace LMM
         {
           Point<dim> operator() (const Point<dim> &in) const
           {
-            static const Tensor<2,dim> rot_mat = Physics::Transformations::Rotations::rotation_matrix_3d(Point<dim>(0,1,0), M_PI/2.0);
+            static const Tensor<2,dim> rot_mat = Physics::Transformations::Rotations::rotation_matrix_3d(Tensor<1,dim>({0,1,0}), M_PI/2.0);
             return Point<dim>(rot_mat*in);
           }
         };
@@ -1439,7 +1439,7 @@ namespace LMM
           component_mask_x.set(0, true);
           VectorTools::interpolate_boundary_values (dof_handler,
                                                     parameters.bid_CC_dirichlet_symm_X,
-                                                    ZeroFunction<dim>(dim),
+                                                    Functions::ZeroFunction<dim>(dim),
                                                     boundary_values,
                                                     component_mask_x);
         }
@@ -1449,7 +1449,7 @@ namespace LMM
           component_mask_z.set(2, true);
           VectorTools::interpolate_boundary_values (dof_handler,
                                                     parameters.bid_CC_dirichlet_symm_Z,
-                                                    ZeroFunction<dim>(dim),
+                                                    Functions::ZeroFunction<dim>(dim),
                                                     boundary_values,
                                                     component_mask_z);
         }
@@ -1504,7 +1504,7 @@ namespace LMM
               component_mask_x.set(0, true);
               VectorTools::interpolate_boundary_values (dof_handler,
                                                         parameters.bid_BB_dirichlet_X,
-                                                        ZeroFunction<dim>(dim),
+                                                        Functions::ZeroFunction<dim>(dim),
                                                         boundary_values,
                                                         component_mask_x);
             }
@@ -1562,7 +1562,7 @@ namespace LMM
               ComponentMask component_mask_x (dim, true);
               VectorTools::interpolate_boundary_values (dof_handler,
                                                         parameters.bid_BB_dirichlet_X,
-                                                        ZeroFunction<dim>(dim),
+                                                        Functions::ZeroFunction<dim>(dim),
                                                         boundary_values,
                                                         component_mask_x);
             }
@@ -1573,7 +1573,7 @@ namespace LMM
               component_mask_x.set(2, true);
               VectorTools::interpolate_boundary_values (dof_handler,
                                                         parameters.bid_BB_neumann,
-                                                        ZeroFunction<dim>(dim),
+                                                        Functions::ZeroFunction<dim>(dim),
                                                         boundary_values,
                                                         component_mask_x);
             }
index 6f6f997b12fafe331803eb62e2f7051dacb89833..2fa932d44596c2c731c4b8bc7d4a0b32e35b1730 100644 (file)
@@ -255,7 +255,7 @@ namespace ForwardSimulator
 
       VectorTools::interpolate_boundary_values(dof_handler,
                                                0,
-                                               ZeroFunction<dim>(),
+                                               Functions::ZeroFunction<dim>(),
                                                boundary_values);
     }
   }
index a551288f47787710a56788b5983df108084b1a08..48497b341a63b838007e66da26082dca1c918c9f 100644 (file)
@@ -542,8 +542,8 @@ namespace MFMFE
 
     dof_handler.distribute_dofs(fe);
     DoFRenumbering::component_wise (dof_handler);
-    std::vector<types::global_dof_index> dofs_per_component (dim+1);
-    DoFTools::count_dofs_per_component (dof_handler, dofs_per_component);
+    const std::vector<types::global_dof_index> dofs_per_component
+      = DoFTools::count_dofs_per_fe_component (dof_handler);
 
     QGaussLobatto<dim> quad(degree+1);
     QGauss<dim-1> face_quad(degree);
@@ -858,7 +858,7 @@ namespace MFMFE
 
     Vector<double> cellwise_errors (triangulation.n_active_cells());
 
-    QTrapez<1> q_trapez;
+    QTrapezoid<1> q_trapez;
     QIterated<dim> quadrature(q_trapez,degree+2);
     QGauss<dim> quadrature_super(degree);
 
index 10d6bbe8c3fe745e5f6f639627aa1eac6b581e09..166bb63fd7c3097f5971b1371819996cdbb25a2d 100644 (file)
@@ -2012,7 +2012,7 @@ namespace NS_TRBDF2 {
     auto& inverse_diagonal = this->inverse_diagonal_entries->get_vector();
 
     if(NS_stage == 1) {
-      MatrixFreeTools::compute_diagonal<dim, Number, VectorizedArray<Number>>
+      ::MatrixFreeTools::compute_diagonal<dim, Number, VectorizedArray<Number>>
       (*(this->data),
        inverse_diagonal,
        [&](const auto& data, auto& dst, const auto& src, const auto& cell_range) {
@@ -2027,7 +2027,7 @@ namespace NS_TRBDF2 {
        0);
     }
     else if(NS_stage == 2) {
-      MatrixFreeTools::compute_diagonal<dim, Number, VectorizedArray<Number>>
+        ::MatrixFreeTools::compute_diagonal<dim, Number, VectorizedArray<Number>>
       (*(this->data),
        inverse_diagonal,
        [&](const auto& data, auto& dst, const auto& src, const auto& cell_range) {
index 999f6a1d7ce97ed7b28b5770b5f9bef89b88268f..1e527e61769d47b8253fec2558880312f574255f 100644 (file)
@@ -4040,21 +4040,21 @@ namespace NonLinearPoroViscoElasticity
             {\r
               VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
                                                        2,\r
-                                                       ZeroFunction<dim>(this->n_components),\r
+                                                       Functions::ZeroFunction<dim>(this->n_components),\r
                                                        constraints,\r
                                                        (this->fe.component_mask(this->pressure)));\r
             }\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       0,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       (this->fe.component_mask(this->x_displacement)|\r
                                                        this->fe.component_mask(this->y_displacement)  ) );\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       1,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       (this->fe.component_mask(this->x_displacement) |\r
                                                        this->fe.component_mask(this->y_displacement) |\r
@@ -4233,38 +4233,38 @@ namespace NonLinearPoroViscoElasticity
             {\r
               VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
                                                        101,\r
-                                                       ZeroFunction<dim>(this->n_components),\r
+                                                       Functions::ZeroFunction<dim>(this->n_components),\r
                                                        constraints,\r
                                                        (this->fe.component_mask(this->pressure)));\r
             }\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       0,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       this->fe.component_mask(this->x_displacement));\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       1,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       this->fe.component_mask(this->x_displacement));\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       2,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       this->fe.component_mask(this->y_displacement));\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       3,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       this->fe.component_mask(this->y_displacement));\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       4,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       ( this->fe.component_mask(this->x_displacement) |\r
                                                         this->fe.component_mask(this->y_displacement) |\r
@@ -4415,27 +4415,27 @@ namespace NonLinearPoroViscoElasticity
             {\r
               VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
                                                        1,\r
-                                                       ZeroFunction<dim>(this->n_components),\r
+                                                       Functions::ZeroFunction<dim>(this->n_components),\r
                                                        constraints,\r
                                                        (this->fe.component_mask(this->pressure)));\r
 \r
               VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
                                                        2,\r
-                                                       ZeroFunction<dim>(this->n_components),\r
+                                                       Functions::ZeroFunction<dim>(this->n_components),\r
                                                        constraints,\r
                                                        (this->fe.component_mask(this->pressure)));\r
             }\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       0,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       (this->fe.component_mask(this->x_displacement)|\r
                                                        this->fe.component_mask(this->y_displacement)  ) );\r
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       1,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       (this->fe.component_mask(this->x_displacement) |\r
                                                        this->fe.component_mask(this->y_displacement) |\r
@@ -4443,7 +4443,7 @@ namespace NonLinearPoroViscoElasticity
 \r
             VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                       2,\r
-                                                      ZeroFunction<dim>(this->n_components),\r
+                                                      Functions::ZeroFunction<dim>(this->n_components),\r
                                                       constraints,\r
                                                       (this->fe.component_mask(this->x_displacement) |\r
                                                        this->fe.component_mask(this->y_displacement) ));\r
@@ -4614,13 +4614,13 @@ namespace NonLinearPoroViscoElasticity
               {\r
                   VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                             100,\r
-                                                            ZeroFunction<dim>(this->n_components),\r
+                                                            Functions::ZeroFunction<dim>(this->n_components),\r
                                                             constraints,\r
                                                             (this->fe.component_mask(this->pressure)));\r
               }\r
               VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                         4,\r
-                                                        ZeroFunction<dim>(this->n_components),\r
+                                                        Functions::ZeroFunction<dim>(this->n_components),\r
                                                         constraints,\r
                                                         this->fe.component_mask(this->z_displacement) );\r
 \r
@@ -4770,14 +4770,14 @@ namespace NonLinearPoroViscoElasticity
               {\r
                   VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                             100,\r
-                                                            ZeroFunction<dim>(this->n_components),\r
+                                                            Functions::ZeroFunction<dim>(this->n_components),\r
                                                             constraints,\r
                                                             (this->fe.component_mask(this->pressure)));\r
               }\r
 \r
               VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                         4,\r
-                                                        ZeroFunction<dim>(this->n_components),\r
+                                                        Functions::ZeroFunction<dim>(this->n_components),\r
                                                         constraints,\r
                                                       (this->fe.component_mask(this->x_displacement) |\r
                                                        this->fe.component_mask(this->y_displacement) |\r
@@ -4798,7 +4798,7 @@ namespace NonLinearPoroViscoElasticity
 \r
                VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                           5,\r
-                                                          ZeroFunction<dim>(this->n_components),\r
+                                                          Functions::ZeroFunction<dim>(this->n_components),\r
                                                           constraints,\r
                                                           (this->fe.component_mask(this->x_displacement) |\r
                                                            this->fe.component_mask(this->y_displacement) ));\r
@@ -4920,14 +4920,14 @@ namespace NonLinearPoroViscoElasticity
               {\r
                   VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                             100,\r
-                                                            ZeroFunction<dim>(this->n_components),\r
+                                                            Functions::ZeroFunction<dim>(this->n_components),\r
                                                             constraints,\r
                                                             (this->fe.component_mask(this->pressure)));\r
               }\r
 \r
               VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                         5,\r
-                                                        ZeroFunction<dim>(this->n_components),\r
+                                                        Functions::ZeroFunction<dim>(this->n_components),\r
                                                         constraints,\r
                                                       (this->fe.component_mask(this->x_displacement) |\r
                                                        this->fe.component_mask(this->y_displacement) |\r
@@ -4948,7 +4948,7 @@ namespace NonLinearPoroViscoElasticity
 \r
                VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
                                                           4,\r
-                                                          ZeroFunction<dim>(this->n_components),\r
+                                                          Functions::ZeroFunction<dim>(this->n_components),\r
                                                           constraints,\r
                                                           (this->fe.component_mask(this->y_displacement) |\r
                                                            this->fe.component_mask(this->z_displacement) ));\r
index 2eb7d8d9c1565357af8e7d712cefc23c57799356..59d5a5cc268169c4e4c19a2e88020b85312fa179 100644 (file)
@@ -2087,7 +2087,7 @@ namespace Cook_Membrane
         const int boundary_id = 1;
         VectorTools::interpolate_boundary_values(dof_handler_ref,
                                                 boundary_id,
-                                                ZeroFunction<dim>(n_components),
+                                                Functions::ZeroFunction<dim>(n_components),
                                                 constraints,
                                                 fe.component_mask(u_fe));
       }
@@ -2100,7 +2100,7 @@ namespace Cook_Membrane
         const FEValuesExtractors::Scalar z_displacement(2);
         VectorTools::interpolate_boundary_values(dof_handler_ref,
                                                 boundary_id,
-                                                ZeroFunction<dim>(n_components),
+                                                Functions::ZeroFunction<dim>(n_components),
                                                 constraints,
                                                 fe.component_mask(z_displacement));
       }
index 4da4d7c5c2f7de71e21ce35ab9ca1988a9b92ee0..7aac1a7ea3225c0cec1160bd7a6d9de8ee7ebd38 100644 (file)
@@ -1339,10 +1339,7 @@ namespace ViscoElasStripHole
     DoFRenumbering::component_wise(dof_handler, block_component);
 
     // Count DoFs in each block
-    dofs_per_block.clear();
-    dofs_per_block.resize(n_blocks);
-    DoFTools::count_dofs_per_block(dof_handler, dofs_per_block,
-                                   block_component);
+    dofs_per_block = DoFTools::count_dofs_per_fe_block(dof_handler, block_component);
 
     all_locally_owned_dofs = DoFTools::locally_owned_dofs_per_subdomain (dof_handler);
     std::vector<IndexSet> all_locally_relevant_dofs
@@ -1860,13 +1857,13 @@ namespace ViscoElasStripHole
       if (apply_dirichlet_bc == true)
         VectorTools::interpolate_boundary_values(dof_handler,
                                                  boundary_id,
-                                                 ZeroFunction<dim>(n_components),
+                                                 Functions::ZeroFunction<dim>(n_components),
                                                  constraints,
                                                  fe.component_mask(x_displacement));
       else
         VectorTools::interpolate_boundary_values(dof_handler,
                                                  boundary_id,
-                                                 ZeroFunction<dim>(n_components),
+                                                 Functions::ZeroFunction<dim>(n_components),
                                                  constraints,
                                                  fe.component_mask(x_displacement));
     }
@@ -1875,13 +1872,13 @@ namespace ViscoElasStripHole
       if (apply_dirichlet_bc == true)
         VectorTools::interpolate_boundary_values(dof_handler,
                                                  boundary_id,
-                                                 ZeroFunction<dim>(n_components),
+                                                 Functions::ZeroFunction<dim>(n_components),
                                                  constraints,
                                                  fe.component_mask(y_displacement));
       else
         VectorTools::interpolate_boundary_values(dof_handler,
                                                  boundary_id,
-                                                 ZeroFunction<dim>(n_components),
+                                                 Functions::ZeroFunction<dim>(n_components),
                                                  constraints,
                                                  fe.component_mask(y_displacement));
     }
@@ -1893,13 +1890,13 @@ namespace ViscoElasStripHole
           if (apply_dirichlet_bc == true)
             VectorTools::interpolate_boundary_values(dof_handler,
                                                      boundary_id,
-                                                     ZeroFunction<dim>(n_components),
+                                                     Functions::ZeroFunction<dim>(n_components),
                                                      constraints,
                                                      fe.component_mask(z_displacement));
           else
             VectorTools::interpolate_boundary_values(dof_handler,
                                                      boundary_id,
-                                                     ZeroFunction<dim>(n_components),
+                                                     Functions::ZeroFunction<dim>(n_components),
                                                      constraints,
                                                      fe.component_mask(z_displacement));
         }
@@ -1908,13 +1905,13 @@ namespace ViscoElasStripHole
           if (apply_dirichlet_bc == true)
             VectorTools::interpolate_boundary_values(dof_handler,
                                                      boundary_id,
-                                                     ZeroFunction<dim>(n_components),
+                                                     Functions::ZeroFunction<dim>(n_components),
                                                      constraints,
                                                      fe.component_mask(z_displacement));
           else
             VectorTools::interpolate_boundary_values(dof_handler,
                                                      boundary_id,
-                                                     ZeroFunction<dim>(n_components),
+                                                     Functions::ZeroFunction<dim>(n_components),
                                                      constraints,
                                                      fe.component_mask(z_displacement));
         }
@@ -1932,21 +1929,21 @@ namespace ViscoElasStripHole
                 const double delta_u_y = delta_length/2.0/n_stretch_steps;
                 VectorTools::interpolate_boundary_values(dof_handler,
                                                          boundary_id,
-                                                         ConstantFunction<dim>(delta_u_y,n_components),
+                                                         Functions::ConstantFunction<dim>(delta_u_y,n_components),
                                                          constraints,
                                                          fe.component_mask(y_displacement));
               }
             else
               VectorTools::interpolate_boundary_values(dof_handler,
                                                        boundary_id,
-                                                       ZeroFunction<dim>(n_components),
+                                                       Functions::ZeroFunction<dim>(n_components),
                                                        constraints,
                                                        fe.component_mask(y_displacement));
           }
         else
           VectorTools::interpolate_boundary_values(dof_handler,
                                                    boundary_id,
-                                                   ZeroFunction<dim>(n_components),
+                                                   Functions::ZeroFunction<dim>(n_components),
                                                    constraints,
                                                    fe.component_mask(y_displacement));
       }
@@ -2042,8 +2039,8 @@ namespace ViscoElasStripHole
       }
   }
 
-  template<int dim, class DH=DoFHandler<dim> >
-  class FilteredDataOut : public DataOut<dim, DH>
+  template<int dim>
+  class FilteredDataOut : public DataOut<dim>
   {
   public:
     FilteredDataOut (const unsigned int subdomain_id)
@@ -2053,7 +2050,7 @@ namespace ViscoElasStripHole
 
     virtual ~FilteredDataOut() {}
 
-    virtual typename DataOut<dim, DH>::cell_iterator
+    virtual typename DataOut<dim>::cell_iterator
     first_cell ()
     {
       auto cell = this->dofs->begin_active();
@@ -2063,15 +2060,15 @@ namespace ViscoElasStripHole
       return cell;
     }
 
-    virtual typename DataOut<dim, DH>::cell_iterator
-    next_cell (const typename DataOut<dim, DH>::cell_iterator &old_cell)
+    virtual typename DataOut<dim>::cell_iterator
+    next_cell (const typename DataOut<dim>::cell_iterator &old_cell)
     {
       if (old_cell != this->dofs->end())
         {
           const IteratorFilters::SubdomainEqualTo predicate(subdomain_id);
           return
             ++(FilteredIterator
-               <typename DataOut<dim, DH>::cell_iterator>
+               <typename DataOut<dim>::cell_iterator>
                (predicate,old_cell));
         }
       else
index e3f77c218bdc4e5295493a952d6e9ddcc4186daa..7a69bd73a6ec585ef41e376729db6fa81c3765a9 100644 (file)
@@ -330,8 +330,8 @@ void AdvectionReaction<dim>::assemble_system()
                        {
                                for (unsigned int j = 0; j < n_dofs; ++j)
                                {
-                                       copy_data_face.cell_matrix(i, j) += (beta(q_points[qpoint]) * normals[qpoint] * fe_iv.average(j, qpoint) * fe_iv.jump(i, qpoint) +
-                                                                                                                theta * std::abs(beta_dot_n) * fe_iv.jump(j, qpoint) * fe_iv.jump(i, qpoint)) *
+                                       copy_data_face.cell_matrix(i, j) += (beta(q_points[qpoint]) * normals[qpoint] * fe_iv.average_of_shape_values(j, qpoint) * fe_iv.jump_in_shape_values(i, qpoint) +
+                                                                                                                theta * std::abs(beta_dot_n) * fe_iv.jump_in_shape_values(j, qpoint) * fe_iv.jump_in_shape_values(i, qpoint)) *
                                                                                                                JxW[qpoint];
                                }
                        }
index 9d48299d5f4ec1ef14318c17e87eca5adb6e5cad..f5b35d33e7df5eb78a2275a379fe0f3cc1db4824 100644 (file)
@@ -177,7 +177,7 @@ void CDRProblem<dim>::setup_system()
   DoFTools::make_sparsity_pattern(dof_handler, dynamic_sparsity_pattern,
                                   constraints, /*keep_constrained_dofs*/true);
   SparsityTools::distribute_sparsity_pattern
-  (dynamic_sparsity_pattern, dof_handler.n_locally_owned_dofs_per_processor(),
+  (dynamic_sparsity_pattern, dof_handler.locally_owned_dofs(),
    mpi_communicator, locally_relevant_dofs);
 
   system_rhs.reinit(locally_owned_dofs, mpi_communicator);
index cc3c5eb70e921f1494b913d04833754e6f77de41..5b978cc457ff4bfd36c7f9cff49edc9cd9b53fb9 100644 (file)
@@ -853,7 +853,7 @@ namespace ElastoPlastic
     // For the purposes of this program, we choose a simple form of boundary
     // displacement: we displace the top boundary with constant velocity
     // downwards. The rest of the boundary is either going to be fixed (and is
-    // then described using an object of type <code>ZeroFunction</code>) or free
+    // then described using an object of type <code>Functions::ZeroFunction</code>) or free
     // (Neumann-type, in which case nothing special has to be done).  The
     // implementation of the class describing the constant downward motion
     // should then be obvious using the knowledge we gained through all the
@@ -1010,10 +1010,10 @@ namespace ElastoPlastic
 
 
     template <int dim>
-    class BodyForce :  public ZeroFunction<dim>
+    class BodyForce :  public Functions::ZeroFunction<dim>
     {
     public:
-      BodyForce () : ZeroFunction<dim> (dim) {}
+      BodyForce () : Functions::ZeroFunction<dim> (dim) {}
     };
 
     template <int dim>
@@ -1189,10 +1189,10 @@ namespace ElastoPlastic
 
 
       template <int dim>
-      class BodyForce :  public ZeroFunction<dim>
+      class BodyForce :  public Functions::ZeroFunction<dim>
       {
       public:
-        BodyForce () : ZeroFunction<dim> (dim) {}
+        BodyForce () : Functions::ZeroFunction<dim> (dim) {}
       };
 
 
@@ -1328,10 +1328,10 @@ namespace ElastoPlastic
 
 
     template <int dim>
-    class BodyForce :  public ZeroFunction<dim>
+    class BodyForce :  public Functions::ZeroFunction<dim>
     {
     public:
-      BodyForce () : ZeroFunction<dim> (dim) {}
+      BodyForce () : Functions::ZeroFunction<dim> (dim) {}
     };
 
 
@@ -1493,10 +1493,10 @@ namespace ElastoPlastic
 
 
     template <int dim>
-    class BodyForce :  public ZeroFunction<dim>
+    class BodyForce :  public Functions::ZeroFunction<dim>
     {
     public:
-      BodyForce () : ZeroFunction<dim> (dim) {}
+      BodyForce () : Functions::ZeroFunction<dim> (dim) {}
     };
 
 
index 3e0e71d95b057b8c52586a0e7e3bb86c5c56b669..89e0aa96b9aa90dbe0033b2cbd9cbfe4952fb7be 100644 (file)
@@ -235,21 +235,21 @@ void MultiPhase<dim>::initial_condition()
   // init condition for u=0
   completely_distributed_solution_u = 0;
   VectorTools::interpolate(dof_handler_U,
-                           ZeroFunction<dim>(),
+                           Functions::ZeroFunction<dim>(),
                            completely_distributed_solution_u);
   constraints.distribute (completely_distributed_solution_u);
   locally_relevant_solution_u = completely_distributed_solution_u;
   // init condition for v
   completely_distributed_solution_v = 0;
   VectorTools::interpolate(dof_handler_U,
-                           ZeroFunction<dim>(),
+                           Functions::ZeroFunction<dim>(),
                            completely_distributed_solution_v);
   constraints.distribute (completely_distributed_solution_v);
   locally_relevant_solution_v = completely_distributed_solution_v;
   // init condition for p
   completely_distributed_solution_p = 0;
   VectorTools::interpolate(dof_handler_P,
-                           ZeroFunction<dim>(),
+                           Functions::ZeroFunction<dim>(),
                            completely_distributed_solution_p);
   constraints.distribute (completely_distributed_solution_p);
   locally_relevant_solution_p = completely_distributed_solution_p;
@@ -275,45 +275,45 @@ void MultiPhase<dim>::get_boundary_values_U()
   if (PROBLEM==BREAKING_DAM || PROBLEM==FALLING_DROP)
     {
       //LEFT
-      VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       // RIGHT
-      VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       // BOTTOM
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       // TOP
-      VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction<dim>(),map_boundary_values_v);
     }
   else if (PROBLEM==SMALL_WAVE_PERTURBATION)
     {
       // no slip in bottom and top and slip in left and right
       //LEFT
-      VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction<dim>(),map_boundary_values_u);
       // RIGHT
-      VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction<dim>(),map_boundary_values_u);
       // BOTTOM
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       // TOP
-      VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction<dim>(),map_boundary_values_v);
     }
   else if (PROBLEM==FILLING_TANK)
     {
       //LEFT: entry in x, zero in y
       VectorTools::interpolate_boundary_values (dof_handler_U,0,BoundaryU<dim>(PROBLEM),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       //RIGHT: no-slip condition
-      VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       //BOTTOM: non-slip
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_u);
-      VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction<dim>(),map_boundary_values_v);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction<dim>(),map_boundary_values_v);
       //TOP: exit in y, zero in x
-      VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction<dim>(),map_boundary_values_u);
+      VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction<dim>(),map_boundary_values_u);
       VectorTools::interpolate_boundary_values (dof_handler_U,3,BoundaryV<dim>(PROBLEM),map_boundary_values_v);
     }
   else
index 00f58fa299efbfe8712139e3b1732c9c7aaaa573..3426be6223fc700c3dec0ce52464ef318b84d229 100644 (file)
@@ -359,7 +359,7 @@ void TestLevelSet<dim>::initial_condition()
   completely_distributed_solution_phi = 0;
   VectorTools::interpolate(dof_handler_LS,
                            InitialPhi<dim>(PROBLEM, sharpness),
-                           //ZeroFunction<dim>(),
+                           //Functions::ZeroFunction<dim>(),
                            completely_distributed_solution_phi);
   constraints.distribute (completely_distributed_solution_phi);
   locally_relevant_solution_phi = completely_distributed_solution_phi;
index 9b56cc6f24c59ff1724c97c5b5b910f90b08a116..25725fadcd3e750a3a0a69df4d8b294ffcb4c355 100644 (file)
@@ -50,20 +50,20 @@ double InitialPhi<dim>::value (const Point<dim> &p,
 //////////////////// FORCE TERMS ///// ////////////////
 ///////////////////////////////////////////////////////
 template <int dim>
-class ForceTerms : public ConstantFunction <dim>
+class ForceTerms : public Functions::ConstantFunction <dim>
 {
 public:
-  ForceTerms (const std::vector<double> values) : ConstantFunction<dim>(values) {}
+  ForceTerms (const std::vector<double> values) : Functions::ConstantFunction<dim>(values) {}
 };
 
 /////////////////////////////////////////////////////
 //////////////////// BOUNDARY PHI ///////////////////
 /////////////////////////////////////////////////////
 template <int dim>
-class BoundaryPhi : public ConstantFunction <dim>
+class BoundaryPhi : public Functions::ConstantFunction <dim>
 {
 public:
-  BoundaryPhi (const double value, const unsigned int n_components=1) : ConstantFunction<dim>(value,n_components) {}
+  BoundaryPhi (const double value, const unsigned int n_components=1) : Functions::ConstantFunction<dim>(value,n_components) {}
 };
 
 //////////////////////////////////////////////////////////

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.