]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace dofs_per_vertex -> n_dofs_per_vertex()
authorPeter Munch <peterrmuench@gmail.com>
Fri, 3 Jul 2020 08:19:39 +0000 (10:19 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 15 Jul 2020 16:48:12 +0000 (18:48 +0200)
Replace dofs_per_cell -> n_dofs_per_cell()

101 files changed:
include/deal.II/base/quadrature_point_data.h
include/deal.II/dofs/dof_accessor.h
include/deal.II/dofs/dof_accessor.templates.h
include/deal.II/dofs/dof_handler.h
include/deal.II/dofs/dof_levels.h
include/deal.II/fe/fe.h
include/deal.II/fe/fe_bernstein.h
include/deal.II/fe/fe_dgp.h
include/deal.II/fe/fe_dgp_monomial.h
include/deal.II/fe/fe_dgp_nonparametric.h
include/deal.II/fe/fe_dgq.h
include/deal.II/fe/fe_enriched.h
include/deal.II/fe/fe_face.h
include/deal.II/fe/fe_nedelec.h
include/deal.II/fe/fe_poly.h
include/deal.II/fe/fe_poly.templates.h
include/deal.II/fe/fe_poly_face.templates.h
include/deal.II/fe/fe_poly_tensor.h
include/deal.II/fe/fe_q_base.h
include/deal.II/fe/fe_q_bubbles.h
include/deal.II/fe/fe_q_dg0.h
include/deal.II/fe/fe_q_hierarchical.h
include/deal.II/fe/fe_system.h
include/deal.II/fe/fe_tools.h
include/deal.II/fe/fe_tools.templates.h
include/deal.II/fe/fe_tools_extrapolate.templates.h
include/deal.II/fe/fe_tools_interpolate.templates.h
include/deal.II/fe/fe_values.h
include/deal.II/hp/fe_collection.h
include/deal.II/integrators/l2.h
include/deal.II/integrators/maxwell.h
include/deal.II/matrix_free/cuda_matrix_free.templates.h
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/matrix_free/shape_info.templates.h
include/deal.II/meshworker/dof_info.h
include/deal.II/meshworker/scratch_data.h
include/deal.II/multigrid/mg_transfer_internal.h
include/deal.II/multigrid/mg_transfer_matrix_free.h
include/deal.II/numerics/data_out_dof_data.templates.h
include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/vector_tools_boundary.templates.h
include/deal.II/numerics/vector_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools_point_value.templates.h
include/deal.II/numerics/vector_tools_project.templates.h
include/deal.II/particles/utilities.h
source/distributed/cell_weights.cc
source/distributed/solution_transfer.cc
source/dofs/dof_accessor.cc
source/dofs/dof_accessor_get.cc
source/dofs/dof_accessor_set.cc
source/dofs/dof_handler.cc
source/dofs/dof_handler_policy.cc
source/dofs/dof_renumbering.cc
source/dofs/dof_tools.cc
source/dofs/dof_tools_constraints.cc
source/dofs/dof_tools_sparsity.cc
source/fe/fe.cc
source/fe/fe_abf.cc
source/fe/fe_bdm.cc
source/fe/fe_bernardi_raugel.cc
source/fe/fe_dgp.cc
source/fe/fe_dgp_monomial.cc
source/fe/fe_dgp_nonparametric.cc
source/fe/fe_dgq.cc
source/fe/fe_enriched.cc
source/fe/fe_face.cc
source/fe/fe_nedelec.cc
source/fe/fe_nedelec_sz.cc
source/fe/fe_p1nc.cc
source/fe/fe_poly_tensor.cc
source/fe/fe_q.cc
source/fe/fe_q_base.cc
source/fe/fe_q_bubbles.cc
source/fe/fe_q_dg0.cc
source/fe/fe_q_hierarchical.cc
source/fe/fe_q_iso_q1.cc
source/fe/fe_rannacher_turek.cc
source/fe/fe_raviart_thomas.cc
source/fe/fe_raviart_thomas_nodal.cc
source/fe/fe_rt_bubbles.cc
source/fe/fe_series_fourier.cc
source/fe/fe_series_legendre.cc
source/fe/fe_system.cc
source/fe/fe_trace.cc
source/fe/fe_values.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_q1_eulerian.cc
source/fe/mapping_q_eulerian.cc
source/grid/grid_tools_dof_handlers.cc
source/meshworker/scratch_data.cc
source/multigrid/mg_tools.cc
source/multigrid/mg_transfer_block.cc
source/multigrid/mg_transfer_component.cc
source/multigrid/mg_transfer_internal.cc
source/multigrid/mg_transfer_prebuilt.cc
source/non_matching/coupling.cc
source/numerics/point_value_history.cc
source/numerics/smoothness_estimator.cc
source/numerics/solution_transfer.cc
source/particles/utilities.cc

index d73796d345b90a96fecb404742ab578db41f7226..7bb77b131444792e298a0b2eeff6af51bb62c087 100644 (file)
@@ -897,8 +897,8 @@ namespace parallel
           std::unique_ptr<const FiniteElement<dim>>(projection_fe_.clone()))
       , data_size_in_bytes(0)
       , n_q_points(rhs_quadrature.size())
-      , project_to_fe_matrix(projection_fe->dofs_per_cell, n_q_points)
-      , project_to_qp_matrix(n_q_points, projection_fe->dofs_per_cell)
+      , project_to_fe_matrix(projection_fe->n_dofs_per_cell(), n_q_points)
+      , project_to_qp_matrix(n_q_points, projection_fe->n_dofs_per_cell())
       , handle(numbers::invalid_unsigned_int)
       , data_storage(nullptr)
       , triangulation(nullptr)
@@ -1014,7 +1014,7 @@ namespace parallel
         {
           // we need to first use prolongation matrix to get dofvalues on child
           // cells based on dofvalues stored in the parent's data_store
-          matrix_dofs_child.reinit(projection_fe->dofs_per_cell,
+          matrix_dofs_child.reinit(projection_fe->n_dofs_per_cell(),
                                    number_of_values);
           for (unsigned int child = 0; child < cell->n_children(); ++child)
             if (cell->child(child)->is_locally_owned())
index 0cd63c5fb4d75f33c5436116b40dd5aa912eb523..997e5befff881a923fb38ecb6a41c51766050a23 100644 (file)
@@ -1810,7 +1810,7 @@ public:
    *
    * @param[out] dof_indices The vector into which the indices will be
    * written. It has to have the right size (namely,
-   * <code>fe.dofs_per_cell</code>, <code>fe.dofs_per_face</code>, or
+   * <code>fe.n_dofs_per_cell()</code>, <code>fe.dofs_per_face</code>, or
    * <code>fe.dofs_per_line</code>, depending on which kind of object this
    * function is called) before being passed to this function.
    *
@@ -1827,7 +1827,7 @@ public:
    * argument to this function is called <code>local_dof_indices</code> by
    * convention. The name is not meant to indicate the <i>local</i> numbers of
    * degrees of freedom (which are always between zero and
-   * <code>fe.dofs_per_cell</code>) but instead that the returned values are
+   * <code>fe.n_dofs_per_cell()</code>) but instead that the returned values are
    * the <i>global</i> indices of those degrees of freedom that are located
    * locally on the current cell.
    *
index a644468f20e576ff1c9244fced9416130987505c..dffbaa2dfb04fb5146fd1f69c964b7ada981a76d 100644 (file)
@@ -247,7 +247,7 @@ namespace internal
 
             if (d == 0)
               dof_handler.object_dof_indices
-                [0][0][obj_index * dof_handler.get_fe().dofs_per_vertex +
+                [0][0][obj_index * dof_handler.get_fe().n_dofs_per_vertex() +
                        local_index] = global_index;
             else
               dof_handler.object_dof_indices
@@ -347,7 +347,7 @@ namespace internal
 
             if (d == 0)
               return dof_handler.object_dof_indices
-                [0][0][obj_index * dof_handler.get_fe().dofs_per_vertex +
+                [0][0][obj_index * dof_handler.get_fe().n_dofs_per_vertex() +
                        local_index];
             else
               return dof_handler.object_dof_indices
@@ -432,7 +432,7 @@ namespace internal
                  "hp::DoFHandler does not implement multilevel DoFs."));
 
         return dof_handler.mg_vertex_dofs[vertex_index].get_index(
-          level, i, dof_handler.get_fe().dofs_per_vertex);
+          level, i, dof_handler.get_fe().n_dofs_per_vertex());
       }
 
 
@@ -450,7 +450,7 @@ namespace internal
                  "hp::DoFHandler does not implement multilevel DoFs."));
 
         return dof_handler.mg_vertex_dofs[vertex_index].set_index(
-          level, i, dof_handler.get_fe().dofs_per_vertex, index);
+          level, i, dof_handler.get_fe().n_dofs_per_vertex(), index);
       }
 
 
@@ -610,7 +610,7 @@ namespace internal
           dof_indices.begin();
 
         for (const unsigned int vertex : accessor.vertex_indices())
-          for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+          for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
             accessor.set_mg_vertex_dof_index(
               level, vertex, dof, *next++, fe_index);
 
@@ -635,7 +635,7 @@ namespace internal
           dof_indices.begin();
 
         for (const unsigned int vertex : accessor.vertex_indices())
-          for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+          for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
             accessor.set_mg_vertex_dof_index(
               level, vertex, dof, *next++, fe_index);
 
@@ -665,7 +665,7 @@ namespace internal
           dof_indices.begin();
 
         for (const unsigned int vertex : accessor.vertex_indices())
-          for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+          for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
             accessor.set_mg_vertex_dof_index(
               level, vertex, dof, *next++, fe_index);
 
@@ -806,11 +806,11 @@ namespace internal
         const unsigned int fe_index,
         const DoFOperation &)
       {
-        const unsigned int                                             //
-          dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex, //
-          dofs_per_line   = accessor.get_fe(fe_index).dofs_per_line,   //
-          dofs_per_quad   = accessor.get_fe(fe_index).dofs_per_quad,   //
-          dofs_per_hex    = accessor.get_fe(fe_index).dofs_per_hex;    //
+        const unsigned int                                                 //
+          dofs_per_vertex = accessor.get_fe(fe_index).n_dofs_per_vertex(), //
+          dofs_per_line   = accessor.get_fe(fe_index).dofs_per_line,       //
+          dofs_per_quad   = accessor.get_fe(fe_index).dofs_per_quad,       //
+          dofs_per_hex    = accessor.get_fe(fe_index).dofs_per_hex;        //
 
         const unsigned int inner_dofs =
           structdim == 1 ? dofs_per_line :
@@ -1187,13 +1187,13 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::mg_vertex_dof_index(
   (void)fe_index;
   Assert(this->dof_handler != nullptr, ExcInvalidObject());
   AssertIndexRange(vertex, this->n_vertices());
-  AssertIndexRange(i, this->dof_handler->get_fe(fe_index).dofs_per_vertex);
+  AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
 
   Assert(dof_handler->hp_capability_enabled == false,
          ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
 
   return this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)]
-    .get_index(level, i, this->dof_handler->get_fe().dofs_per_vertex);
+    .get_index(level, i, this->dof_handler->get_fe().n_dofs_per_vertex());
 }
 
 
@@ -1239,13 +1239,13 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::
   (void)fe_index;
   Assert(this->dof_handler != nullptr, ExcInvalidObject());
   AssertIndexRange(vertex, this->n_vertices());
-  AssertIndexRange(i, this->dof_handler->get_fe(fe_index).dofs_per_vertex);
+  AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
 
   Assert(dof_handler->hp_capability_enabled == false,
          ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
 
   this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)].set_index(
-    level, i, this->dof_handler->get_fe().dofs_per_vertex, index);
+    level, i, this->dof_handler->get_fe().n_dofs_per_vertex(), index);
 }
 
 
@@ -1293,7 +1293,7 @@ namespace internal
       std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
 
       for (const unsigned int vertex : accessor.vertex_indices())
-        for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+        for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
           *next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
 
       for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
@@ -1318,7 +1318,7 @@ namespace internal
       std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
 
       for (const unsigned int vertex : accessor.vertex_indices())
-        for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+        for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
           *next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
 
       for (unsigned int line = 0; line < accessor.n_lines(); ++line)
@@ -1347,7 +1347,7 @@ namespace internal
       std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
 
       for (const unsigned int vertex : accessor.vertex_indices())
-        for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+        for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
           *next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
 
       for (unsigned int line = 0; line < accessor.n_lines(); ++line)
@@ -1406,14 +1406,14 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_dof_indices(
       case 1:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->dof_handler->get_fe(fe_index).dofs_per_line),
                ExcVectorDoesNotMatch());
         break;
       case 2:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->n_lines() *
                     this->dof_handler->get_fe(fe_index).dofs_per_line +
                   this->dof_handler->get_fe(fe_index).dofs_per_quad),
@@ -1422,7 +1422,7 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_dof_indices(
       case 3:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->n_lines() *
                     this->dof_handler->get_fe(fe_index).dofs_per_line +
                   this->n_faces() *
@@ -1447,9 +1447,9 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_dof_indices(
   // not allocated for this
   // non-active thing
   Assert(this->fe_index_is_active(fe_index) ||
-           (this->dof_handler->get_fe(fe_index).dofs_per_cell ==
+           (this->dof_handler->get_fe(fe_index).n_dofs_per_cell() ==
             this->n_vertices() *
-              this->dof_handler->get_fe(fe_index).dofs_per_vertex),
+              this->dof_handler->get_fe(fe_index).n_dofs_per_vertex()),
          ExcInternalError());
 
   // now do the actual work
@@ -1479,14 +1479,14 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_mg_dof_indices(
       case 1:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->dof_handler->get_fe(fe_index).dofs_per_line),
                ExcVectorDoesNotMatch());
         break;
       case 2:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->n_lines() *
                     this->dof_handler->get_fe(fe_index).dofs_per_line +
                   this->dof_handler->get_fe(fe_index).dofs_per_quad),
@@ -1495,7 +1495,7 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_mg_dof_indices(
       case 3:
         Assert(dof_indices.size() ==
                  (this->n_vertices() *
-                    this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                    this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                   this->n_lines() *
                     this->dof_handler->get_fe(fe_index).dofs_per_line +
                   this->n_faces() *
@@ -1535,7 +1535,7 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::set_mg_dof_indices(
         {
           Assert(dof_indices.size() ==
                    this->n_vertices() *
-                       this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                       this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                      this->dof_handler->get_fe(fe_index).dofs_per_line,
                  ExcVectorDoesNotMatch());
           break;
@@ -1545,7 +1545,7 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::set_mg_dof_indices(
         {
           Assert(dof_indices.size() ==
                    this->n_vertices() *
-                       this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                       this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                      this->n_lines() *
                        this->dof_handler->get_fe(fe_index).dofs_per_line +
                      this->dof_handler->get_fe(fe_index).dofs_per_quad,
@@ -1557,7 +1557,7 @@ DoFAccessor<structdim, dim, spacedim, level_dof_access>::set_mg_dof_indices(
         {
           Assert(dof_indices.size() ==
                    this->n_vertices() *
-                       this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+                       this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
                      this->n_lines() *
                        this->dof_handler->get_fe(fe_index).dofs_per_line +
                      this->n_faces() *
@@ -2013,7 +2013,7 @@ namespace internal
         // FE_Nothing
         if (accessor.has_children())
           return;
-        const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = accessor.get_fe().n_dofs_per_cell();
         if (dofs_per_cell == 0)
           return;
 
@@ -2407,9 +2407,9 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
          ExcMessage("get_dof_indices() only works on active cells."));
   Assert(this->is_artificial() == false,
          ExcMessage("Can't ask for DoF indices on artificial cells."));
-  AssertDimension(dof_indices.size(), this->get_fe().dofs_per_cell);
+  AssertDimension(dof_indices.size(), this->get_fe().n_dofs_per_cell());
 
-  const auto dofs_per_cell = this->get_fe().dofs_per_cell;
+  const auto dofs_per_cell = this->get_fe().n_dofs_per_cell();
   if (dofs_per_cell > 0)
     {
       const types::global_dof_index *cache =
@@ -2488,7 +2488,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::get_dof_values(
   Assert(this->dof_handler != nullptr, typename BaseClass::ExcInvalidObject());
 
   Assert(static_cast<unsigned int>(local_values_end - local_values_begin) ==
-           this->get_fe().dofs_per_cell,
+           this->get_fe().n_dofs_per_cell(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
   Assert(values.size() == this->get_dof_handler().n_dofs(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
@@ -2498,11 +2498,11 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::get_dof_values(
       this->dof_handler,
       this->present_level,
       this->present_index,
-      this->get_fe().dofs_per_cell);
+      this->get_fe().n_dofs_per_cell());
   dealii::internal::DoFAccessorImplementation::Implementation::
     extract_subvector_to(values,
                          cache,
-                         cache + this->get_fe().dofs_per_cell,
+                         cache + this->get_fe().n_dofs_per_cell(),
                          local_values_begin);
 }
 
@@ -2522,7 +2522,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::get_dof_values(
   Assert(this->is_active(), ExcMessage("Cell must be active."));
 
   Assert(static_cast<unsigned int>(local_values_end - local_values_begin) ==
-           this->get_fe().dofs_per_cell,
+           this->get_fe().n_dofs_per_cell(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
   Assert(values.size() == this->get_dof_handler().n_dofs(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
@@ -2533,7 +2533,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::get_dof_values(
       this->dof_handler,
       this->present_level,
       this->present_index,
-      this->get_fe().dofs_per_cell);
+      this->get_fe().n_dofs_per_cell());
 
   constraints.get_dof_values(values,
                              *cache,
@@ -2555,7 +2555,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::set_dof_values(
   Assert(this->is_active(), ExcMessage("Cell must be active."));
 
   Assert(static_cast<unsigned int>(local_values.size()) ==
-           this->get_fe().dofs_per_cell,
+           this->get_fe().n_dofs_per_cell(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
   Assert(values.size() == this->get_dof_handler().n_dofs(),
          typename DoFCellAccessor::ExcVectorDoesNotMatch());
@@ -2567,9 +2567,9 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::set_dof_values(
       this->dof_handler,
       this->present_level,
       this->present_index,
-      this->get_fe().dofs_per_cell);
+      this->get_fe().n_dofs_per_cell());
 
-  for (unsigned int i = 0; i < this->get_fe().dofs_per_cell; ++i, ++cache)
+  for (unsigned int i = 0; i < this->get_fe().n_dofs_per_cell(); ++i, ++cache)
     internal::ElementAccess<OutputVector>::set(local_values(i), *cache, values);
 }
 
@@ -2775,7 +2775,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
   Assert(this->dof_handler != nullptr,
          (typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
   Assert(static_cast<unsigned int>(local_source_end - local_source_begin) ==
-           this->get_fe().dofs_per_cell,
+           this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_destination.size(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
@@ -2806,7 +2806,8 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
 {
   Assert(this->dof_handler != nullptr,
          (typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
-  Assert(local_source_end - local_source_begin == this->get_fe().dofs_per_cell,
+  Assert(local_source_end - local_source_begin ==
+           this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_destination.size(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
@@ -2837,9 +2838,9 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
 {
   Assert(this->dof_handler != nullptr,
          (typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
-  Assert(local_source.m() == this->get_fe().dofs_per_cell,
+  Assert(local_source.m() == this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
-  Assert(local_source.n() == this->get_fe().dofs_per_cell,
+  Assert(local_source.n() == this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_destination.m(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
@@ -2872,22 +2873,22 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
 {
   Assert(this->dof_handler != nullptr,
          (typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
-  Assert(local_matrix.m() == this->get_fe().dofs_per_cell,
+  Assert(local_matrix.m() == this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
-  Assert(local_matrix.n() == this->get_fe().dofs_per_cell,
+  Assert(local_matrix.n() == this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_matrix.m(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_matrix.n(),
          (typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
-  Assert(local_vector.size() == this->get_fe().dofs_per_cell,
+  Assert(local_vector.size() == this->get_fe().n_dofs_per_cell(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
   Assert(this->dof_handler->n_dofs() == global_vector.size(),
          (typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
 
   Assert(!this->has_children(), ExcMessage("Cell must be active."));
 
-  const unsigned int             n_dofs = this->get_fe().dofs_per_cell;
+  const unsigned int             n_dofs = this->get_fe().n_dofs_per_cell();
   const types::global_dof_index *dofs =
     dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr(
       this->dof_handler, this->level(), this->present_index, n_dofs);
index c770bc8678593624b15f880ca27033ca6e615f99..f727ef1e27e91bbf06708779f957ca642ad42155 100644 (file)
@@ -1352,7 +1352,7 @@ private:
      * on the various levels this vertex exists on.
      *
      * The starting offset of the DoFs that belong to a @p level are given by
-     * <code>dofs_per_vertex * (level-coarsest_level)</code>. @p dofs_per_vertex
+     * <code>n_dofs_per_vertex() * (level-coarsest_level)</code>. @p n_dofs_per_vertex()
      * must therefore be passed as an argument to the functions that set or
      * read an index.
      */
index f5450a397643b943511cfdf8f3d75cfff4296141..4512e520e19996ac44cc6ce6212015018ef67f84 100644 (file)
@@ -71,7 +71,7 @@ namespace internal
     public:
       /**
        * Cache for the DoF indices on cells. The size of this array equals the
-       * number of cells on a given level times selected_fe.dofs_per_cell.
+       * number of cells on a given level times selected_fe.n_dofs_per_cell().
        */
       std::vector<types::global_dof_index> cell_dof_indices_cache;
 
index ab1f003384a80c8eb2521518537ac4a9d06ea7c1..49d7098419301240f2c802734a8f02a764ecb742 100644 (file)
@@ -484,10 +484,10 @@ class FESystem;
  * following piece of code in the constructor of a class derived from
  * FiniteElement to compute the $M$ matrix:
  * @code
- * FullMatrix<double> M(this->dofs_per_cell, this->dofs_per_cell);
+ * FullMatrix<double> M(this->n_dofs_per_cell(), this->n_dofs_per_cell());
  * FETools::compute_node_matrix(M, *this);
- * this->inverse_node_matrix.reinit(this->dofs_per_cell, this->dofs_per_cell);
- * this->inverse_node_matrix.invert(M);
+ * this->inverse_node_matrix.reinit(this->n_dofs_per_cell(),
+ * this->n_dofs_per_cell()); this->inverse_node_matrix.invert(M);
  * @endcode
  * Don't forget to make sure
  * that #unit_support_points or #generalized_support_points are initialized
@@ -509,8 +509,8 @@ class FESystem;
  * In the latter case, all that is required is the following piece of code:
  * @code
  * for (unsigned int c=0; c<GeometryInfo<dim>::max_children_per_cell; ++c)
- *   this->prolongation[c].reinit (this->dofs_per_cell,
- *                                 this->dofs_per_cell);
+ *   this->prolongation[c].reinit (this->n_dofs_per_cell(),
+ *                                 this->n_dofs_per_cell());
  * FETools::compute_embedding_matrices (*this, this->prolongation);
  * @endcode
  * As in this example, prolongation is almost always implemented via
@@ -824,7 +824,7 @@ public:
    * version hp::DoFHandler, since one can then write code like this:
    * @code
    * dofs_per_cell =
-   *   dof_handler->get_fe()[cell->active_fe_index()].dofs_per_cell;
+   *   dof_handler->get_fe()[cell->active_fe_index()].n_dofs_per_cell();
    * @endcode
    *
    * This code doesn't work in both situations without the present operator
@@ -1321,10 +1321,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(const FiniteElement<dim, spacedim> &fe_other) const;
@@ -3205,7 +3205,7 @@ inline std::pair<unsigned int, types::global_dof_index>
 FiniteElement<dim, spacedim>::system_to_block_index(
   const unsigned int index) const
 {
-  AssertIndexRange(index, this->dofs_per_cell);
+  AssertIndexRange(index, this->n_dofs_per_cell());
   // The block is computed simply as
   // first block of this base plus
   // the index within the base blocks
@@ -3222,7 +3222,7 @@ inline bool
 FiniteElement<dim, spacedim>::restriction_is_additive(
   const unsigned int index) const
 {
-  AssertIndexRange(index, this->dofs_per_cell);
+  AssertIndexRange(index, this->n_dofs_per_cell());
   return restriction_is_additive_flags[index];
 }
 
@@ -3232,7 +3232,7 @@ template <int dim, int spacedim>
 inline const ComponentMask &
 FiniteElement<dim, spacedim>::get_nonzero_components(const unsigned int i) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return nonzero_components[i];
 }
 
@@ -3242,7 +3242,7 @@ template <int dim, int spacedim>
 inline unsigned int
 FiniteElement<dim, spacedim>::n_nonzero_components(const unsigned int i) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return n_nonzero_components_table[i];
 }
 
@@ -3261,7 +3261,7 @@ template <int dim, int spacedim>
 inline bool
 FiniteElement<dim, spacedim>::is_primitive(const unsigned int i) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
 
   // return primitivity of a shape
   // function by checking whether it
@@ -3285,7 +3285,7 @@ inline GeometryPrimitive
 FiniteElement<dim, spacedim>::get_associated_geometry_primitive(
   const unsigned int cell_dof_index) const
 {
-  AssertIndexRange(cell_dof_index, this->dofs_per_cell);
+  AssertIndexRange(cell_dof_index, this->n_dofs_per_cell());
 
   // just go through the usual cases, taking into account how DoFs
   // are enumerated on the reference cell
index 136c566e783fe185a0434b786f56ad40856d0188..a88638272f6d702c4e8be27b6ddf159b76a9f357 100644 (file)
@@ -150,10 +150,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(
index c8e71cc2dfcb95e0382e3ca52425ec5582193d59..007fd1a3888cd454fd48ce14a37a7914664ca42a 100644 (file)
@@ -337,10 +337,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * This being a discontinuous element, the set of such constraints is of
    * course empty.
index 518827193b9b907f95efe18180789dd6427702dd..30488ff42cd6416f90ef44c11252c09062a37709 100644 (file)
@@ -312,10 +312,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * This being a discontinuous element, the set of such constraints is of
    * course empty.
@@ -368,7 +368,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one. The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are only available if the source element is also a @p FE_Q
    * element. Otherwise, an exception of type
index acaa2901e81690b18159451757c295b594b840f6..09de0822dd9457359efad9ff487c2b0dd1cfbc45 100644 (file)
@@ -426,10 +426,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * This being a discontinuous element, the set of such constraints is of
    * course empty.
index e2d9f5d049339eca0e418020e03cb436c0f1009d..ed1e2a9baa98a8b8a0c4f2654ae8a394178be8bb 100644 (file)
@@ -129,7 +129,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one. The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are only available if the source element is also a @p
    * FE_DGQ element. Otherwise, an exception of type
@@ -235,10 +235,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * This being a discontinuous element, the set of such constraints is of
    * course empty.
index a9a952e3d26ded00e3f135ba51cb1828a28fb6a4..e34b3cf96cb35a1c47b0bde6c705448a04a2dfe5 100644 (file)
@@ -426,10 +426,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(
index f83d891e338c42f2c5985067f1814bf1ab1029cb..34717b6cb53352195b5b6ad49bc271f67bda2a25 100644 (file)
@@ -134,10 +134,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * The set of such constraints is non-empty only for dim==1.
    */
@@ -284,10 +284,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    *
    * The set of such constraints is non-empty only for dim==1.
    */
index 7734bf48c36eb4a8a6d7326c60952eb63bd2b220..c1c8fc333c5c96a28a2dc938ad4f535baf692489 100644 (file)
@@ -203,10 +203,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
index 29171c9adda95f6b588ed601049b93a689d95e37..94e63ba164f01536bd9d89703e85f9b3bbac4aff 100644 (file)
@@ -273,13 +273,13 @@ protected:
     // polynomial to put the values and derivatives of shape functions
     // to put there, depending on what the user requested
     std::vector<double> values(
-      update_flags & update_values ? this->dofs_per_cell : 0);
+      update_flags & update_values ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<1, dim>> grads(
-      update_flags & update_gradients ? this->dofs_per_cell : 0);
+      update_flags & update_gradients ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<2, dim>> grad_grads(
-      update_flags & update_hessians ? this->dofs_per_cell : 0);
+      update_flags & update_hessians ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<3, dim>> third_derivatives(
-      update_flags & update_3rd_derivatives ? this->dofs_per_cell : 0);
+      update_flags & update_3rd_derivatives ? this->n_dofs_per_cell() : 0);
     std::vector<Tensor<4, dim>>
       fourth_derivatives; // won't be needed, so leave empty
 
@@ -302,16 +302,16 @@ protected:
     if ((update_flags & update_values) &&
         !((output_data.shape_values.n_rows() > 0) &&
           (output_data.shape_values.n_cols() == n_q_points)))
-      data.shape_values.reinit(this->dofs_per_cell, n_q_points);
+      data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
 
     if (update_flags & update_gradients)
-      data.shape_gradients.reinit(this->dofs_per_cell, n_q_points);
+      data.shape_gradients.reinit(this->n_dofs_per_cell(), n_q_points);
 
     if (update_flags & update_hessians)
-      data.shape_hessians.reinit(this->dofs_per_cell, n_q_points);
+      data.shape_hessians.reinit(this->n_dofs_per_cell(), n_q_points);
 
     if (update_flags & update_3rd_derivatives)
-      data.shape_3rd_derivatives.reinit(this->dofs_per_cell, n_q_points);
+      data.shape_3rd_derivatives.reinit(this->n_dofs_per_cell(), n_q_points);
 
     // next already fill those fields of which we have information by
     // now. note that the shape gradients are only those on the unit
@@ -338,10 +338,10 @@ protected:
             if (output_data.shape_values.n_rows() > 0)
               {
                 if (output_data.shape_values.n_cols() == n_q_points)
-                  for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+                  for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
                     output_data.shape_values[k][i] = values[k];
                 else
-                  for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+                  for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
                     data.shape_values[k][i] = values[k];
               }
 
@@ -349,15 +349,15 @@ protected:
           // so we write them into our scratch space and only later
           // copy stuff into where FEValues wants it
           if (update_flags & update_gradients)
-            for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+            for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_gradients[k][i] = grads[k];
 
           if (update_flags & update_hessians)
-            for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+            for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_hessians[k][i] = grad_grads[k];
 
           if (update_flags & update_3rd_derivatives)
-            for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+            for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
               data.shape_3rd_derivatives[k][i] = third_derivatives[k];
         }
     return data_ptr;
index 2c45729306c751105881956bc068a771c5a6432a..c4bcb2c100581ae8abc692f0531cba089ec3a614 100644 (file)
@@ -59,7 +59,7 @@ double
 FE_Poly<dim, spacedim>::shape_value(const unsigned int i,
                                     const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return poly_space->compute_value(i, p);
 }
 
@@ -72,7 +72,7 @@ FE_Poly<dim, spacedim>::shape_value_component(
   const unsigned int component) const
 {
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   return poly_space->compute_value(i, p);
 }
@@ -84,7 +84,7 @@ Tensor<1, dim>
 FE_Poly<dim, spacedim>::shape_grad(const unsigned int i,
                                    const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return poly_space->template compute_derivative<1>(i, p);
 }
 
@@ -97,7 +97,7 @@ FE_Poly<dim, spacedim>::shape_grad_component(const unsigned int i,
                                              const unsigned int component) const
 {
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   return poly_space->template compute_derivative<1>(i, p);
 }
@@ -109,7 +109,7 @@ Tensor<2, dim>
 FE_Poly<dim, spacedim>::shape_grad_grad(const unsigned int i,
                                         const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return poly_space->template compute_derivative<2>(i, p);
 }
 
@@ -123,7 +123,7 @@ FE_Poly<dim, spacedim>::shape_grad_grad_component(
   const unsigned int component) const
 {
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   return poly_space->template compute_derivative<2>(i, p);
 }
@@ -135,7 +135,7 @@ Tensor<3, dim>
 FE_Poly<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
                                              const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return poly_space->template compute_derivative<3>(i, p);
 }
 
@@ -149,7 +149,7 @@ FE_Poly<dim, spacedim>::shape_3rd_derivative_component(
   const unsigned int component) const
 {
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   return poly_space->template compute_derivative<3>(i, p);
 }
@@ -161,7 +161,7 @@ Tensor<4, dim>
 FE_Poly<dim, spacedim>::shape_4th_derivative(const unsigned int i,
                                              const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   return poly_space->template compute_derivative<4>(i, p);
 }
 
@@ -175,7 +175,7 @@ FE_Poly<dim, spacedim>::shape_4th_derivative_component(
   const unsigned int component) const
 {
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   return poly_space->template compute_derivative<4>(i, p);
 }
@@ -295,7 +295,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
   // we were in get_data()
   if (flags & update_gradients &&
       cell_similarity != CellSimilarity::translation)
-    for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+    for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(make_array_view(fe_data.shape_gradients, k),
                         mapping_covariant,
                         mapping_internal,
@@ -303,7 +303,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
 
   if (flags & update_hessians && cell_similarity != CellSimilarity::translation)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(make_array_view(fe_data.shape_hessians, k),
                           mapping_covariant_gradient,
                           mapping_internal,
@@ -316,7 +316,7 @@ FE_Poly<dim, spacedim>::fill_fe_values(
   if (flags & update_3rd_derivatives &&
       cell_similarity != CellSimilarity::translation)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(make_array_view(fe_data.shape_3rd_derivatives, k),
                           mapping_covariant_hessian,
                           mapping_internal,
@@ -377,12 +377,12 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
   // the values (unlike in the case of fill_fe_values()) since
   // we need to take into account the offsets
   if (flags & update_values)
-    for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+    for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       for (unsigned int i = 0; i < quadrature.size(); ++i)
         output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
 
   if (flags & update_gradients)
-    for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+    for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(
         make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
         mapping_covariant,
@@ -391,7 +391,7 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
 
   if (flags & update_hessians)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(
           make_array_view(fe_data.shape_hessians, k, offset, quadrature.size()),
           mapping_covariant_gradient,
@@ -404,7 +404,7 @@ FE_Poly<dim, spacedim>::fill_fe_face_values(
 
   if (flags & update_3rd_derivatives)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
                                           k,
                                           offset,
@@ -471,12 +471,12 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
   // the values (unlike in the case of fill_fe_values()) since
   // we need to take into account the offsets
   if (flags & update_values)
-    for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+    for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       for (unsigned int i = 0; i < quadrature.size(); ++i)
         output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
 
   if (flags & update_gradients)
-    for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+    for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
       mapping.transform(
         make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
         mapping_covariant,
@@ -485,7 +485,7 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
 
   if (flags & update_hessians)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(
           make_array_view(fe_data.shape_hessians, k, offset, quadrature.size()),
           mapping_covariant_gradient,
@@ -498,7 +498,7 @@ FE_Poly<dim, spacedim>::fill_fe_subface_values(
 
   if (flags & update_3rd_derivatives)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
                                           k,
                                           offset,
@@ -524,7 +524,7 @@ FE_Poly<dim, spacedim>::correct_hessians(
     &                mapping_data,
   const unsigned int n_q_points) const
 {
-  for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+  for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
     for (unsigned int i = 0; i < n_q_points; ++i)
       for (unsigned int j = 0; j < spacedim; ++j)
         output_data.shape_hessians[dof][i] -=
@@ -543,7 +543,7 @@ FE_Poly<dim, spacedim>::correct_third_derivatives(
     &                mapping_data,
   const unsigned int n_q_points) const
 {
-  for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+  for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
     for (unsigned int i = 0; i < n_q_points; ++i)
       for (unsigned int j = 0; j < spacedim; ++j)
         for (unsigned int k = 0; k < spacedim; ++k)
index 68f8b6dc2a02bd827d1718689a3ea7f2a0f4dd6d..9599cc539a2aacfed3727be048f660ea05109bd7 100644 (file)
@@ -134,7 +134,7 @@ FE_PolyFace<PolynomialType, dim, spacedim>::fill_fe_face_values(
   if (fe_data.update_each & update_values)
     for (unsigned int i = 0; i < quadrature.size(); ++i)
       {
-        for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+        for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
           output_data.shape_values(k, i) = 0.;
         switch (dim)
           {
@@ -182,7 +182,7 @@ FE_PolyFace<PolynomialType, dim, spacedim>::fill_fe_face_values(
             case 1:
               {
                 // Fill data for vertex shape functions
-                if (this->dofs_per_vertex != 0)
+                if (this->n_dofs_per_vertex() != 0)
                   for (unsigned int lvertex = 0;
                        lvertex < GeometryInfo<dim>::vertices_per_face;
                        ++lvertex)
@@ -227,7 +227,7 @@ FE_PolyFace<PolynomialType, dim, spacedim>::fill_fe_subface_values(
 
   if (fe_data.update_each & update_values)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         for (unsigned int i = 0; i < quadrature.size(); ++i)
           output_data.shape_values(k, i) = 0.;
       for (unsigned int k = 0; k < fe_data.shape_values.size(); ++k)
index f4da13a15326dc11a3fc44adf87506dbc8ba33df..914e1ec089446bb5e9e22270938c23da209cab01 100644 (file)
@@ -260,7 +260,7 @@ protected:
     std::vector<Tensor<5, dim>> fourth_derivatives(0);
 
     if (update_flags & (update_values | update_gradients | update_hessians))
-      data.sign_change.resize(this->dofs_per_cell);
+      data.sign_change.resize(this->n_dofs_per_cell());
 
     // initialize fields only if really
     // necessary. otherwise, don't
@@ -284,16 +284,16 @@ protected:
 
     if (update_flags & update_values)
       {
-        values.resize(this->dofs_per_cell);
-        data.shape_values.reinit(this->dofs_per_cell, n_q_points);
+        values.resize(this->n_dofs_per_cell());
+        data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
         if (update_transformed_shape_values)
           data.transformed_shape_values.resize(n_q_points);
       }
 
     if (update_flags & update_gradients)
       {
-        grads.resize(this->dofs_per_cell);
-        data.shape_grads.reinit(this->dofs_per_cell, n_q_points);
+        grads.resize(this->n_dofs_per_cell());
+        data.shape_grads.reinit(this->n_dofs_per_cell(), n_q_points);
         data.transformed_shape_grads.resize(n_q_points);
 
         if (update_transformed_shape_grads)
@@ -302,8 +302,8 @@ protected:
 
     if (update_flags & update_hessians)
       {
-        grad_grads.resize(this->dofs_per_cell);
-        data.shape_grad_grads.reinit(this->dofs_per_cell, n_q_points);
+        grad_grads.resize(this->n_dofs_per_cell());
+        data.shape_grad_grads.reinit(this->n_dofs_per_cell(), n_q_points);
         data.transformed_shape_hessians.resize(n_q_points);
         if (update_transformed_shape_hessian_tensors)
           data.untransformed_shape_hessian_tensors.resize(n_q_points);
@@ -329,13 +329,13 @@ protected:
           if (update_flags & update_values)
             {
               if (inverse_node_matrix.n_cols() == 0)
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   data.shape_values[i][k] = values[i];
               else
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   {
                     Tensor<1, dim> add_values;
-                    for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+                    for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
                       add_values += inverse_node_matrix(j, i) * values[j];
                     data.shape_values[i][k] = add_values;
                   }
@@ -344,13 +344,13 @@ protected:
           if (update_flags & update_gradients)
             {
               if (inverse_node_matrix.n_cols() == 0)
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   data.shape_grads[i][k] = grads[i];
               else
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   {
                     Tensor<2, dim> add_grads;
-                    for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+                    for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
                       add_grads += inverse_node_matrix(j, i) * grads[j];
                     data.shape_grads[i][k] = add_grads;
                   }
@@ -359,13 +359,13 @@ protected:
           if (update_flags & update_hessians)
             {
               if (inverse_node_matrix.n_cols() == 0)
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   data.shape_grad_grads[i][k] = grad_grads[i];
               else
-                for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                   {
                     Tensor<3, dim> add_grad_grads;
-                    for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+                    for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
                       add_grad_grads +=
                         inverse_node_matrix(j, i) * grad_grads[j];
                     data.shape_grad_grads[i][k] = add_grad_grads;
index 2d951de19e94c29015e43d37dfa5f248a81ab1ce..1aba53ee59519f0e62334e262d811d66cbd5516d 100644 (file)
@@ -50,7 +50,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one. The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are only available if the source element is also a @p FE_Q
    * element. Otherwise, an exception of type
@@ -234,10 +234,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(
index 3f61942377ccf45c973db14f885b52d9b65722d3..6ae5e844458721cee39fc3784c075aeac96598a6 100644 (file)
@@ -115,7 +115,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one.  The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are only available if the source element is also a @p
    * FE_Q_Bubbles element. Otherwise, an exception of type
index 64ca1cb8549ad1f81077a9667db116553820cb89..d1ea8957b0d0ea6534d404c25ce3f580e6920ebb 100644 (file)
@@ -270,7 +270,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one.  The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are only available if the source element is also a @p
    * FE_Q_DG0 element. Otherwise, an exception of type
index 7fcdeafe7f6c0f1a63ff78921583e8eb3667bf4a..9cd599b94cae6bbc4a3150f0ec9a6dfdd390b33a 100644 (file)
@@ -606,10 +606,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
index 64847438675ddd066a9517ac64d2e6c998e2c91f..a832dd886d322fb446abf3747f3dd29d38a5721d 100644 (file)
@@ -721,7 +721,7 @@ public:
   /**
    * Return the matrix interpolating from the given finite element to the
    * present one. The size of the matrix is then @p dofs_per_cell times
-   * <tt>source.dofs_per_cell</tt>.
+   * <tt>source.n_dofs_per_cell()</tt>.
    *
    * These matrices are available if source and destination element are both
    * @p FESystem elements, have the same number of base elements with same
@@ -938,10 +938,10 @@ public:
    * reference to a finite element object representing one of the other finite
    * elements active on this particular vertex. The function computes which of
    * the degrees of freedom of the two finite element objects are equivalent,
-   * both numbered between zero and the corresponding value of dofs_per_vertex
-   * of the two finite elements. The first index of each pair denotes one of
-   * the vertex dofs of the present element, whereas the second is the
-   * corresponding index of the other finite element.
+   * both numbered between zero and the corresponding value of
+   * n_dofs_per_vertex() of the two finite elements. The first index of each
+   * pair denotes one of the vertex dofs of the present element, whereas the
+   * second is the corresponding index of the other finite element.
    */
   virtual std::vector<std::pair<unsigned int, unsigned int>>
   hp_vertex_dof_identities(
index 3d1970df317ac59b4f8e3d6f74c4f98fafca1840..929d536ce437e4fa622e07bc32ed52ccb9adca84 100644 (file)
@@ -183,7 +183,7 @@ namespace FETools
   /**
    * Compute the interpolation matrix that interpolates a @p fe1-function to a
    * @p fe2-function on each cell. The interpolation_matrix needs to be of
-   * size <tt>(fe2.dofs_per_cell, fe1.dofs_per_cell)</tt>.
+   * size <tt>(fe2.n_dofs_per_cell(), fe1.n_dofs_per_cell())</tt>.
    *
    * Note, that if the finite element space @p fe1 is a subset of the finite
    * element space @p fe2 then the @p interpolation_matrix is an embedding
@@ -199,7 +199,7 @@ namespace FETools
    * Compute the interpolation matrix that interpolates a @p fe1-function to a
    * @p fe2-function, and interpolates this to a second @p fe1-function on
    * each cell. The interpolation_matrix needs to be of size
-   * <tt>(fe1.dofs_per_cell, fe1.dofs_per_cell)</tt>.
+   * <tt>(fe1.n_dofs_per_cell(), fe1.n_dofs_per_cell())</tt>.
    *
    * Note, that this function only makes sense if the finite element space due
    * to @p fe1 is not a subset of the finite element space due to @p fe2, as
@@ -214,8 +214,8 @@ namespace FETools
 
   /**
    * Compute the identity matrix minus the back interpolation matrix.
-   * The @p difference_matrix will be of size <tt>(fe1.dofs_per_cell,
-   * fe1.dofs_per_cell)</tt> after this function. Previous content
+   * The @p difference_matrix will be of size <tt>(fe1.n_dofs_per_cell(),
+   * fe1.n_dofs_per_cell())</tt> after this function. Previous content
    * of the argument will be overwritten.
    *
    * This function computes the matrix that transforms a @p fe1 function $z$ to
@@ -569,7 +569,7 @@ namespace FETools
    * This method implements the
    * FETools::compute_projection_from_quadrature_points_matrix method for
    * faces of a mesh.  The matrix that it returns, X, is face specific and its
-   * size is fe.dofs_per_cell by rhs_quadrature.size().  The dimension, dim
+   * size is fe.n_dofs_per_cell() by rhs_quadrature.size().  The dimension, dim
    * must be larger than 1 for this class, since Quadrature<dim-1> objects are
    * required. See the documentation on the Quadrature class for more
    * information.
index 549542d6a19b023c92cfdfb4b12782078653d657..bd25eb58be1261a15bfd0831b0afcb9330c07b0d 100644 (file)
@@ -107,7 +107,7 @@ namespace FETools
         if (multiplicities[i] > 0)
           {
             multiplied_dofs_per_vertex +=
-              fes[i]->dofs_per_vertex * multiplicities[i];
+              fes[i]->n_dofs_per_vertex() * multiplicities[i];
             multiplied_dofs_per_line +=
               fes[i]->dofs_per_line * multiplicities[i];
             multiplied_dofs_per_quad +=
@@ -156,7 +156,7 @@ namespace FETools
 
       for (unsigned int base = 0; base < fes.size(); ++base)
         for (unsigned int m = 0; m < multiplicities[base]; ++m)
-          block_indices.push_back(fes[base]->dofs_per_cell);
+          block_indices.push_back(fes[base]->n_dofs_per_cell());
 
       return FiniteElementData<dim>(dpo,
                                     (do_tensor_product ?
@@ -213,7 +213,7 @@ namespace FETools
       unsigned int n_shape_functions = 0;
       for (unsigned int i = 0; i < fes.size(); ++i)
         if (multiplicities[i] > 0) // check needed as fe might be nullptr
-          n_shape_functions += fes[i]->dofs_per_cell * multiplicities[i];
+          n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
 
       // generate the array that will hold the output
       std::vector<bool> retval(n_shape_functions, false);
@@ -233,13 +233,14 @@ namespace FETools
           for (unsigned int base = 0; base < fes.size(); ++base)
             for (unsigned int m = 0; m < multiplicities[base]; ++m)
               for (unsigned int local_index = 0;
-                   local_index < fes[base]->dofs_per_vertex;
+                   local_index < fes[base]->n_dofs_per_vertex();
                    ++local_index, ++total_index)
                 {
                   const unsigned int index_in_base =
-                    (fes[base]->dofs_per_vertex * vertex_number + local_index);
+                    (fes[base]->n_dofs_per_vertex() * vertex_number +
+                     local_index);
 
-                  Assert(index_in_base < fes[base]->dofs_per_cell,
+                  Assert(index_in_base < fes[base]->n_dofs_per_cell(),
                          ExcInternalError());
                   retval[total_index] =
                     fes[base]->restriction_is_additive(index_in_base);
@@ -261,7 +262,7 @@ namespace FETools
                     (fes[base]->dofs_per_line * line_number + local_index +
                      fes[base]->first_line_index);
 
-                  Assert(index_in_base < fes[base]->dofs_per_cell,
+                  Assert(index_in_base < fes[base]->n_dofs_per_cell(),
                          ExcInternalError());
                   retval[total_index] =
                     fes[base]->restriction_is_additive(index_in_base);
@@ -283,7 +284,7 @@ namespace FETools
                     (fes[base]->dofs_per_quad * quad_number + local_index +
                      fes[base]->first_quad_index);
 
-                  Assert(index_in_base < fes[base]->dofs_per_cell,
+                  Assert(index_in_base < fes[base]->n_dofs_per_cell(),
                          ExcInternalError());
                   retval[total_index] =
                     fes[base]->restriction_is_additive(index_in_base);
@@ -305,7 +306,7 @@ namespace FETools
                     (fes[base]->dofs_per_hex * hex_number + local_index +
                      fes[base]->first_hex_index);
 
-                  Assert(index_in_base < fes[base]->dofs_per_cell,
+                  Assert(index_in_base < fes[base]->n_dofs_per_cell(),
                          ExcInternalError());
                   retval[total_index] =
                     fes[base]->restriction_is_additive(index_in_base);
@@ -375,7 +376,7 @@ namespace FETools
       unsigned int n_shape_functions = 0;
       for (unsigned int i = 0; i < fes.size(); ++i)
         if (multiplicities[i] > 0) // needed because fe might be nullptr
-          n_shape_functions += fes[i]->dofs_per_cell * multiplicities[i];
+          n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
 
       unsigned int n_components = 0;
       if (do_tensor_product)
@@ -425,11 +426,12 @@ namespace FETools
                               comp_start +=
                               fes[base]->n_components() * do_tensor_product)
               for (unsigned int local_index = 0;
-                   local_index < fes[base]->dofs_per_vertex;
+                   local_index < fes[base]->n_dofs_per_vertex();
                    ++local_index, ++total_index)
                 {
                   const unsigned int index_in_base =
-                    (fes[base]->dofs_per_vertex * vertex_number + local_index);
+                    (fes[base]->n_dofs_per_vertex() * vertex_number +
+                     local_index);
 
                   Assert(comp_start + fes[base]->n_components() <=
                            retval[total_index].size(),
@@ -666,11 +668,11 @@ namespace FETools
                               fe.base_element(base).n_components() *
                               do_tensor_product)
               for (unsigned int local_index = 0;
-                   local_index < fe.base_element(base).dofs_per_vertex;
+                   local_index < fe.base_element(base).n_dofs_per_vertex();
                    ++local_index, ++total_index)
                 {
                   const unsigned int index_in_base =
-                    (fe.base_element(base).dofs_per_vertex * vertex_number +
+                    (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
                      local_index);
 
                   system_to_base_table[total_index] =
@@ -859,7 +861,7 @@ namespace FETools
                               fe.base_element(base).n_components() *
                               do_tensor_product)
               for (unsigned int local_index = 0;
-                   local_index < fe.base_element(base).dofs_per_vertex;
+                   local_index < fe.base_element(base).n_dofs_per_vertex();
                    ++local_index, ++total_index)
                 {
                   // get (cell) index of this shape function inside the base
@@ -871,11 +873,11 @@ namespace FETools
                   // taken as representative for all others located on the same
                   // type of object):
                   const unsigned int index_in_base =
-                    (fe.base_element(base).dofs_per_vertex * vertex_number +
+                    (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
                      local_index);
 
                   const unsigned int face_index_in_base =
-                    (fe.base_element(base).dofs_per_vertex * vertex_number +
+                    (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
                      local_index);
 
                   face_system_to_base_table[total_index] =
@@ -1349,8 +1351,8 @@ namespace FETools
                          std::vector<unsigned int> &             renumbering,
                          std::vector<std::vector<unsigned int>> &comp_start)
   {
-    Assert(renumbering.size() == element.dofs_per_cell,
-           ExcDimensionMismatch(renumbering.size(), element.dofs_per_cell));
+    Assert(renumbering.size() == element.n_dofs_per_cell(),
+           ExcDimensionMismatch(renumbering.size(), element.n_dofs_per_cell()));
 
     comp_start.resize(element.n_base_elements());
 
@@ -1358,7 +1360,8 @@ namespace FETools
     for (unsigned int i = 0; i < comp_start.size(); ++i)
       {
         comp_start[i].resize(element.element_multiplicity(i));
-        const unsigned int increment = element.base_element(i).dofs_per_cell;
+        const unsigned int increment =
+          element.base_element(i).n_dofs_per_cell();
 
         for (unsigned int &first_index_of_component : comp_start[i])
           {
@@ -1372,7 +1375,7 @@ namespace FETools
     // numbering, renumbering
     // contains the index of the
     // cell-block numbering
-    for (unsigned int i = 0; i < element.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < element.n_dofs_per_cell(); ++i)
       {
         std::pair<std::pair<unsigned int, unsigned int>, unsigned int> indices =
           element.system_to_base_index(i);
@@ -1390,8 +1393,8 @@ namespace FETools
                             std::vector<types::global_dof_index> &block_data,
                             bool return_start_indices)
   {
-    Assert(renumbering.size() == element.dofs_per_cell,
-           ExcDimensionMismatch(renumbering.size(), element.dofs_per_cell));
+    Assert(renumbering.size() == element.n_dofs_per_cell(),
+           ExcDimensionMismatch(renumbering.size(), element.n_dofs_per_cell()));
     Assert(block_data.size() == element.n_blocks(),
            ExcDimensionMismatch(block_data.size(), element.n_blocks()));
 
@@ -1418,7 +1421,7 @@ namespace FETools
           k += block_data[i];
         }
 
-    for (unsigned int i = 0; i < element.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < element.n_dofs_per_cell(); ++i)
       {
         std::pair<unsigned int, types::global_dof_index> indices =
           element.system_to_block_index(i);
@@ -1436,12 +1439,12 @@ namespace FETools
   {
     Assert(fe1.n_components() == fe2.n_components(),
            ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
-    Assert(interpolation_matrix.m() == fe2.dofs_per_cell &&
-             interpolation_matrix.n() == fe1.dofs_per_cell,
+    Assert(interpolation_matrix.m() == fe2.n_dofs_per_cell() &&
+             interpolation_matrix.n() == fe1.n_dofs_per_cell(),
            ExcMatrixDimensionMismatch(interpolation_matrix.m(),
                                       interpolation_matrix.n(),
-                                      fe2.dofs_per_cell,
-                                      fe1.dofs_per_cell));
+                                      fe2.n_dofs_per_cell(),
+                                      fe1.n_dofs_per_cell()));
 
     // first try the easy way: maybe the FE wants to implement things itself:
     try
@@ -1470,13 +1473,13 @@ namespace FETools
     const std::vector<Point<dim>> &fe2_support_points =
       fe2.get_unit_support_points();
 
-    Assert(fe2_support_points.size() == fe2.dofs_per_cell,
+    Assert(fe2_support_points.size() == fe2.n_dofs_per_cell(),
            (typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
 
-    for (unsigned int i = 0; i < fe2.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe2.n_dofs_per_cell(); ++i)
       {
         const unsigned int i1 = fe2.system_to_component_index(i).first;
-        for (unsigned int j = 0; j < fe1.dofs_per_cell; ++j)
+        for (unsigned int j = 0; j < fe1.n_dofs_per_cell(); ++j)
           {
             const unsigned int j1 = fe1.system_to_component_index(j).first;
             if (i1 == j1)
@@ -1498,15 +1501,17 @@ namespace FETools
   {
     Assert(fe1.n_components() == fe2.n_components(),
            ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
-    Assert(interpolation_matrix.m() == fe1.dofs_per_cell &&
-             interpolation_matrix.n() == fe1.dofs_per_cell,
+    Assert(interpolation_matrix.m() == fe1.n_dofs_per_cell() &&
+             interpolation_matrix.n() == fe1.n_dofs_per_cell(),
            ExcMatrixDimensionMismatch(interpolation_matrix.m(),
                                       interpolation_matrix.n(),
-                                      fe1.dofs_per_cell,
-                                      fe1.dofs_per_cell));
+                                      fe1.n_dofs_per_cell(),
+                                      fe1.n_dofs_per_cell()));
 
-    FullMatrix<number> first_matrix(fe2.dofs_per_cell, fe1.dofs_per_cell);
-    FullMatrix<number> second_matrix(fe1.dofs_per_cell, fe2.dofs_per_cell);
+    FullMatrix<number> first_matrix(fe2.n_dofs_per_cell(),
+                                    fe1.n_dofs_per_cell());
+    FullMatrix<number> second_matrix(fe1.n_dofs_per_cell(),
+                                     fe2.n_dofs_per_cell());
 
     get_interpolation_matrix(fe1, fe2, first_matrix);
     get_interpolation_matrix(fe2, fe1, second_matrix);
@@ -1525,18 +1530,18 @@ namespace FETools
   {
     Assert(fe1.n_components() == fe2.n_components(),
            ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
-    Assert(difference_matrix.m() == fe1.dofs_per_cell &&
-             difference_matrix.n() == fe1.dofs_per_cell,
+    Assert(difference_matrix.m() == fe1.n_dofs_per_cell() &&
+             difference_matrix.n() == fe1.n_dofs_per_cell(),
            ExcMatrixDimensionMismatch(difference_matrix.m(),
                                       difference_matrix.n(),
-                                      fe1.dofs_per_cell,
-                                      fe1.dofs_per_cell));
+                                      fe1.n_dofs_per_cell(),
+                                      fe1.n_dofs_per_cell()));
 
-    FullMatrix<number> interpolation_matrix(fe1.dofs_per_cell);
+    FullMatrix<number> interpolation_matrix(fe1.n_dofs_per_cell());
     get_back_interpolation_matrix(fe1, fe2, interpolation_matrix);
 
     // compute difference
-    difference_matrix = IdentityMatrix(fe1.dofs_per_cell);
+    difference_matrix = IdentityMatrix(fe1.n_dofs_per_cell());
     difference_matrix.add(-1, interpolation_matrix);
   }
 
@@ -1551,13 +1556,16 @@ namespace FETools
     Assert(fe1.n_components() == 1, ExcNotImplemented());
     Assert(fe1.n_components() == fe2.n_components(),
            ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
-    Assert(matrix.m() == fe2.dofs_per_cell && matrix.n() == fe1.dofs_per_cell,
-           ExcMatrixDimensionMismatch(
-             matrix.m(), matrix.n(), fe2.dofs_per_cell, fe1.dofs_per_cell));
+    Assert(matrix.m() == fe2.n_dofs_per_cell() &&
+             matrix.n() == fe1.n_dofs_per_cell(),
+           ExcMatrixDimensionMismatch(matrix.m(),
+                                      matrix.n(),
+                                      fe2.n_dofs_per_cell(),
+                                      fe1.n_dofs_per_cell()));
     matrix = 0;
 
-    const unsigned int n1 = fe1.dofs_per_cell;
-    const unsigned int n2 = fe2.dofs_per_cell;
+    const unsigned int n1 = fe1.n_dofs_per_cell();
+    const unsigned int n2 = fe2.n_dofs_per_cell();
 
     // First, create a local mass matrix for the unit cell
     Triangulation<dim, spacedim> tr;
@@ -1625,7 +1633,7 @@ namespace FETools
   FullMatrix<double>
   compute_node_matrix(const FiniteElement<dim, spacedim> &fe)
   {
-    const unsigned int n_dofs = fe.dofs_per_cell;
+    const unsigned int n_dofs = fe.n_dofs_per_cell();
 
     FullMatrix<double> N(n_dofs, n_dofs);
 
@@ -1691,7 +1699,7 @@ namespace FETools
         FullMatrix<number> &                this_matrix,
         const double                        threshold)
       {
-        const unsigned int n  = fe.dofs_per_cell;
+        const unsigned int n  = fe.n_dofs_per_cell();
         const unsigned int nd = fe.n_components();
         const unsigned int nq = coarse.n_quadrature_points;
 
@@ -1746,7 +1754,7 @@ namespace FETools
         const unsigned int                  ref_case,
         const double                        threshold)
       {
-        const unsigned int n = fe.dofs_per_cell;
+        const unsigned int n = fe.n_dofs_per_cell();
         const unsigned int nc =
           GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
         for (unsigned int i = 0; i < nc; ++i)
@@ -1937,11 +1945,11 @@ namespace FETools
         {
           const unsigned int offset_c =
             GeometryInfo<dim>::face_to_cell_vertices(face_coarse, i) *
-            fe.dofs_per_vertex;
+            fe.n_dofs_per_vertex();
           const unsigned int offset_f =
             GeometryInfo<dim>::face_to_cell_vertices(face_fine, i) *
-            fe.dofs_per_vertex;
-          for (unsigned int j = 0; j < fe.dofs_per_vertex; ++j)
+            fe.n_dofs_per_vertex();
+          for (unsigned int j = 0; j < fe.n_dofs_per_vertex(); ++j)
             {
               face_c_dofs[face_dof] = offset_c + j;
               face_f_dofs[face_dof] = offset_f + j;
@@ -2121,7 +2129,7 @@ namespace FETools
                                           > &                     matrices,
                               const bool isotropic_only)
   {
-    const unsigned int n      = fe.dofs_per_cell;
+    const unsigned int n      = fe.n_dofs_per_cell();
     const unsigned int nd     = fe.n_components();
     const unsigned int degree = fe.degree;
 
@@ -2270,9 +2278,9 @@ namespace FETools
             const std::vector<double> &JxW = fine.get_JxW_values();
 
             // Outer loop over all fine grid shape functions phi_j
-            for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+            for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
               {
-                for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
                   {
                     if (fe.
 
@@ -2302,7 +2310,7 @@ namespace FETools
 
                 // RHS ready. Solve system and enter row into matrix
                 inverse_mass_matrix.vmult(v_coarse, v_fine);
-                for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
                   this_matrix(i, j) = v_coarse(i);
               }
 
@@ -2724,30 +2732,30 @@ namespace FETools
 
     // first build the matrices M and Q
     // described in the documentation
-    FullMatrix<double> M(fe.dofs_per_cell, fe.dofs_per_cell);
-    FullMatrix<double> Q(fe.dofs_per_cell, rhs_quadrature.size());
+    FullMatrix<double> M(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
+    FullMatrix<double> Q(fe.n_dofs_per_cell(), rhs_quadrature.size());
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
-      for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+      for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
         for (unsigned int q = 0; q < lhs_quadrature.size(); ++q)
           M(i, j) += fe.shape_value(i, lhs_quadrature.point(q)) *
                      fe.shape_value(j, lhs_quadrature.point(q)) *
                      lhs_quadrature.weight(q);
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       for (unsigned int q = 0; q < rhs_quadrature.size(); ++q)
         Q(i, q) +=
           fe.shape_value(i, rhs_quadrature.point(q)) * rhs_quadrature.weight(q);
 
     // then invert M
-    FullMatrix<double> M_inverse(fe.dofs_per_cell, fe.dofs_per_cell);
+    FullMatrix<double> M_inverse(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
     M_inverse.invert(M);
 
     // finally compute the result
-    X.reinit(fe.dofs_per_cell, rhs_quadrature.size());
+    X.reinit(fe.n_dofs_per_cell(), rhs_quadrature.size());
     M_inverse.mmult(X, Q);
 
-    Assert(X.m() == fe.dofs_per_cell, ExcInternalError());
+    Assert(X.m() == fe.n_dofs_per_cell(), ExcInternalError());
     Assert(X.n() == rhs_quadrature.size(), ExcInternalError());
   }
 
@@ -2762,10 +2770,10 @@ namespace FETools
   {
     Assert(fe.n_components() == 1, ExcNotImplemented());
     Assert(I_q.m() == quadrature.size(), ExcMessage("Wrong matrix size"));
-    Assert(I_q.n() == fe.dofs_per_cell, ExcMessage("Wrong matrix size"));
+    Assert(I_q.n() == fe.n_dofs_per_cell(), ExcMessage("Wrong matrix size"));
 
     for (unsigned int q = 0; q < quadrature.size(); ++q)
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
         I_q(q, i) = fe.shape_value(i, quadrature.point(q));
   }
 
@@ -2919,8 +2927,8 @@ namespace FETools
 
     // build the matrices M and Q
     // described in the documentation
-    FullMatrix<double> M(fe.dofs_per_cell, fe.dofs_per_cell);
-    FullMatrix<double> Q(fe.dofs_per_cell, rhs_quadrature.size());
+    FullMatrix<double> M(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
+    FullMatrix<double> Q(fe.n_dofs_per_cell(), rhs_quadrature.size());
 
     {
       // need an FEFaceValues object to evaluate shape function
@@ -2928,13 +2936,13 @@ namespace FETools
       FEFaceValues<dim> fe_face_values(fe, lhs_quadrature, update_values);
       fe_face_values.reinit(cell, face); // setup shape_value on this face.
 
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
-        for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+        for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
           for (unsigned int q = 0; q < lhs_quadrature.size(); ++q)
             M(i, j) += fe_face_values.shape_value(i, q) *
                        fe_face_values.shape_value(j, q) *
                        lhs_quadrature.weight(q);
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
         {
           M(i, i) = (M(i, i) == 0 ? 1 : M(i, i));
         }
@@ -2944,20 +2952,20 @@ namespace FETools
       FEFaceValues<dim> fe_face_values(fe, rhs_quadrature, update_values);
       fe_face_values.reinit(cell, face); // setup shape_value on this face.
 
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
         for (unsigned int q = 0; q < rhs_quadrature.size(); ++q)
           Q(i, q) +=
             fe_face_values.shape_value(i, q) * rhs_quadrature.weight(q);
     }
     // then invert M
-    FullMatrix<double> M_inverse(fe.dofs_per_cell, fe.dofs_per_cell);
+    FullMatrix<double> M_inverse(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
     M_inverse.invert(M);
 
     // finally compute the result
-    X.reinit(fe.dofs_per_cell, rhs_quadrature.size());
+    X.reinit(fe.n_dofs_per_cell(), rhs_quadrature.size());
     M_inverse.mmult(X, Q);
 
-    Assert(X.m() == fe.dofs_per_cell, ExcInternalError());
+    Assert(X.m() == fe.n_dofs_per_cell(), ExcInternalError());
     Assert(X.n() == rhs_quadrature.size(), ExcInternalError());
   }
 
@@ -3084,7 +3092,7 @@ namespace FETools
   {
     AssertDimension(support_point_values.size(),
                     finite_element.get_generalized_support_points().size());
-    AssertDimension(dof_values.size(), finite_element.dofs_per_cell);
+    AssertDimension(dof_values.size(), finite_element.n_dofs_per_cell());
 
     internal::FEToolsConvertHelper::convert_helper<dim, spacedim>(
       finite_element, support_point_values, dof_values);
@@ -3279,8 +3287,8 @@ namespace FETools
   hierarchic_to_lexicographic_numbering(const FiniteElementData<dim> &fe,
                                         std::vector<unsigned int> &   h2l)
   {
-    Assert(h2l.size() == fe.dofs_per_cell,
-           ExcDimensionMismatch(h2l.size(), fe.dofs_per_cell));
+    Assert(h2l.size() == fe.n_dofs_per_cell(),
+           ExcDimensionMismatch(h2l.size(), fe.n_dofs_per_cell()));
     hierarchic_to_lexicographic_numbering<dim>(fe.dofs_per_line + 1, h2l);
   }
 
index f7bd10082389e59e13fe1b73f61b9f189f1d67a9..1abefa66ec8ba1414bc91decdf1b69e0b15d715d 100644 (file)
@@ -546,7 +546,7 @@ namespace FETools
         {
           const FiniteElement<dim, spacedim> &fe =
             dealii_cell->get_dof_handler().get_fe();
-          const unsigned int dofs_per_cell = fe.dofs_per_cell;
+          const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
           Vector<typename OutVector::value_type> interpolated_values(
             dofs_per_cell);
@@ -608,7 +608,7 @@ namespace FETools
         {
           const FiniteElement<dim, spacedim> &fe =
             dealii_cell->get_dof_handler().get_fe();
-          const unsigned int dofs_per_cell = fe.dofs_per_cell;
+          const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
           Assert(interpolated_values.size() == dofs_per_cell,
                  ExcDimensionMismatch(interpolated_values.size(),
@@ -728,7 +728,7 @@ namespace FETools
     {
       const FiniteElement<dim, spacedim> &fe =
         dealii_cell->get_dof_handler().get_fe();
-      const unsigned int dofs_per_cell = fe.dofs_per_cell;
+      const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
       if (dealii_cell->is_active())
         {
@@ -1242,7 +1242,7 @@ namespace FETools
     {
       const FiniteElement<dim, spacedim> &fe =
         dealii_cell->get_dof_handler().get_fe();
-      const unsigned int dofs_per_cell = fe.dofs_per_cell;
+      const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
       CellData cell_data(dofs_per_cell);
       cell_data.quadrant   = p4est_cell;
@@ -1416,7 +1416,7 @@ namespace FETools
       const unsigned int                  dofs_per_face = fe.dofs_per_face;
       if (dofs_per_face > 0)
         {
-          const unsigned int                   dofs_per_cell = fe.dofs_per_cell;
+          const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
           std::vector<types::global_dof_index> indices(dofs_per_cell);
           typename DoFHandler<dim, spacedim>::active_cell_iterator
             cell = dof2.begin_active(),
@@ -1715,7 +1715,7 @@ namespace FETools
                        const DoFHandler<dim, spacedim> &dof2,
                        OutVector &                      u2)
     {
-      const unsigned int dofs_per_cell = dof2.get_fe().dofs_per_cell;
+      const unsigned int dofs_per_cell = dof2.get_fe().n_dofs_per_cell();
       Vector<typename OutVector::value_type> dof_values(dofs_per_cell);
 
       // then traverse grid bottom up
index d567cdcb5670cc3c57948e63a1eea838da953e84..47344852b9bd47a24f08d42dd5fc9ae9e063e20c 100644 (file)
@@ -158,7 +158,7 @@ namespace FETools
           // hanging node constraints. Consequently, when the elements are
           // continuous no hanging node constraints are allowed.
           const bool hanging_nodes_not_allowed =
-            ((cell2->get_fe().dofs_per_vertex != 0) &&
+            ((cell2->get_fe().n_dofs_per_vertex() != 0) &&
              (constraints.n_constraints() == 0));
 
           if (hanging_nodes_not_allowed)
@@ -168,8 +168,8 @@ namespace FETools
                      ExcHangingNodesNotAllowed());
 #endif
 
-          const unsigned int dofs_per_cell1 = cell1->get_fe().dofs_per_cell;
-          const unsigned int dofs_per_cell2 = cell2->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell1 = cell1->get_fe().n_dofs_per_cell();
+          const unsigned int dofs_per_cell2 = cell2->get_fe().n_dofs_per_cell();
           u1_local.reinit(dofs_per_cell1);
           u2_local.reinit(dofs_per_cell2);
 
@@ -312,7 +312,8 @@ namespace FETools
           // hanging node constraints. Consequently, when the elements are
           // continuous no hanging node constraints are allowed.
           const bool hanging_nodes_not_allowed =
-            (cell->get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
+            (cell->get_fe().n_dofs_per_vertex() != 0) ||
+            (fe2.n_dofs_per_vertex() != 0);
 
           if (hanging_nodes_not_allowed)
             for (const unsigned int face : cell->face_indices())
@@ -321,7 +322,7 @@ namespace FETools
                      ExcHangingNodesNotAllowed());
 #endif
 
-          const unsigned int dofs_per_cell1 = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell1 = cell->get_fe().n_dofs_per_cell();
 
           // make sure back_interpolation matrix is available
           if (interpolation_matrices[&cell->get_fe()] == nullptr)
@@ -569,8 +570,8 @@ namespace FETools
   {
     // For discontinuous elements without constraints take the simpler version
     // of the back_interpolate function.
-    if (dof1.get_fe().dofs_per_vertex == 0 &&
-        dof2.get_fe().dofs_per_vertex == 0 &&
+    if (dof1.get_fe().n_dofs_per_vertex() == 0 &&
+        dof2.get_fe().n_dofs_per_vertex() == 0 &&
         constraints1.n_constraints() == 0 && constraints2.n_constraints() == 0)
       back_interpolate(dof1, u1, dof2.get_fe(), u1_interpolated);
     else
@@ -621,7 +622,7 @@ namespace FETools
                       " index sets."));
 #endif
 
-    const unsigned int dofs_per_cell = dof1.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof1.get_fe().n_dofs_per_cell();
 
     Vector<typename OutVector::value_type> u1_local(dofs_per_cell);
     Vector<typename OutVector::value_type> u1_diff_local(dofs_per_cell);
@@ -645,7 +646,8 @@ namespace FETools
           // hanging node constraints. Consequently, when the elements are
           // continuous no hanging node constraints are allowed.
           const bool hanging_nodes_not_allowed =
-            (dof1.get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
+            (dof1.get_fe().n_dofs_per_vertex() != 0) ||
+            (fe2.n_dofs_per_vertex() != 0);
 
           if (hanging_nodes_not_allowed)
             for (const unsigned int face : cell->face_indices())
@@ -730,8 +732,8 @@ namespace FETools
     // without constraints take the
     // cheaper version of the
     // interpolation_difference function.
-    if (dof1.get_fe().dofs_per_vertex == 0 &&
-        dof2.get_fe().dofs_per_vertex == 0 &&
+    if (dof1.get_fe().n_dofs_per_vertex() == 0 &&
+        dof2.get_fe().n_dofs_per_vertex() == 0 &&
         constraints1.n_constraints() == 0 && constraints2.n_constraints() == 0)
       interpolation_difference(dof1, u1, dof2.get_fe(), u1_difference);
     else
@@ -766,8 +768,8 @@ namespace FETools
       dof2.begin_active();
     typename DoFHandler<dim, spacedim>::active_cell_iterator end = dof2.end();
 
-    const unsigned int n1 = dof1.get_fe().dofs_per_cell;
-    const unsigned int n2 = dof2.get_fe().dofs_per_cell;
+    const unsigned int n1 = dof1.get_fe().n_dofs_per_cell();
+    const unsigned int n2 = dof2.get_fe().n_dofs_per_cell();
 
     Vector<typename OutVector::value_type> u1_local(n1);
     Vector<typename OutVector::value_type> u2_local(n2);
index 1f45a8b8eb1d3e0ad8506cd5df3355b55f40591f..c0ad804b591a57030f12ed78c6009026e3cf29da 100644 (file)
@@ -361,12 +361,12 @@ namespace FEValuesViews
      *
      * The DoF values typically would be obtained in the following way:
      * @code
-     * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+     * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution, local_dof_values);
      * @endcode
      * or, for a generic @p Number type,
      * @code
-     * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+     * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution,
      *                      local_dof_values.begin(),
      *                      local_dof_values.end());
@@ -929,12 +929,12 @@ namespace FEValuesViews
      *
      * The DoF values typically would be obtained in the following way:
      * @code
-     * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+     * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution, local_dof_values);
      * @endcode
      * or, for a generic @p Number type,
      * @code
-     * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+     * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution,
      *                      local_dof_values.begin(),
      *                      local_dof_values.end());
@@ -1440,12 +1440,12 @@ namespace FEValuesViews
      *
      * The DoF values typically would be obtained in the following way:
      * @code
-     * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+     * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution, local_dof_values);
      * @endcode
      * or, for a generic @p Number type,
      * @code
-     * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+     * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution,
      *                      local_dof_values.begin(),
      *                      local_dof_values.end());
@@ -1750,12 +1750,12 @@ namespace FEValuesViews
      *
      * The DoF values typically would be obtained in the following way:
      * @code
-     * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+     * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution, local_dof_values);
      * @endcode
      * or, for a generic @p Number type,
      * @code
-     * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+     * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
      * cell->get_dof_values(solution,
      *                      local_dof_values.begin(),
      *                      local_dof_values.end());
@@ -2015,8 +2015,8 @@ namespace FEValuesViews
  *   {
  *     values.reinit(cell);
  *     for (unsigned int q=0; q<quadrature.size(); ++q)
- *       for (unsigned int i=0; i<finite_element.dofs_per_cell; ++i)
- *         for (unsigned int j=0; j<finite_element.dofs_per_cell; ++j)
+ *       for (unsigned int i=0; i<finite_element.n_dofs_per_cell(); ++i)
+ *         for (unsigned int j=0; j<finite_element.n_dofs_per_cell(); ++j)
  *           A(i,j) += fe_values.shape_value(i,q) *
  *                     fe_values.shape_value(j,q) *
  *                     fe_values.JxW(q);
@@ -4122,7 +4122,7 @@ namespace FEValuesViews
   Scalar<dim, spacedim>::value(const unsigned int shape_function,
                                const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(
       fe_values->update_flags & update_values,
       ((typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
@@ -4145,7 +4145,7 @@ namespace FEValuesViews
   Scalar<dim, spacedim>::gradient(const unsigned int shape_function,
                                   const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4168,7 +4168,7 @@ namespace FEValuesViews
   Scalar<dim, spacedim>::hessian(const unsigned int shape_function,
                                  const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_hessians,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_hessians")));
@@ -4190,7 +4190,7 @@ namespace FEValuesViews
   Scalar<dim, spacedim>::third_derivative(const unsigned int shape_function,
                                           const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_3rd_derivatives,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_3rd_derivatives")));
@@ -4213,7 +4213,7 @@ namespace FEValuesViews
   Vector<dim, spacedim>::value(const unsigned int shape_function,
                                const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_values,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_values")));
@@ -4251,7 +4251,7 @@ namespace FEValuesViews
   Vector<dim, spacedim>::gradient(const unsigned int shape_function,
                                   const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4291,7 +4291,7 @@ namespace FEValuesViews
                                     const unsigned int q_point) const
   {
     // this function works like in the case above
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4328,7 +4328,7 @@ namespace FEValuesViews
   {
     // this function works like in the case above
 
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4500,7 +4500,7 @@ namespace FEValuesViews
                                  const unsigned int q_point) const
   {
     // this function works like in the case above
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_hessians,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_hessians")));
@@ -4540,7 +4540,7 @@ namespace FEValuesViews
                                           const unsigned int q_point) const
   {
     // this function works like in the case above
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_3rd_derivatives,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_3rd_derivatives")));
@@ -4647,7 +4647,7 @@ namespace FEValuesViews
   Vector<dim, spacedim>::symmetric_gradient(const unsigned int shape_function,
                                             const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4682,7 +4682,7 @@ namespace FEValuesViews
   SymmetricTensor<2, dim, spacedim>::value(const unsigned int shape_function,
                                            const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_values,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_values")));
@@ -4727,7 +4727,7 @@ namespace FEValuesViews
     const unsigned int shape_function,
     const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4805,7 +4805,7 @@ namespace FEValuesViews
   Tensor<2, dim, spacedim>::value(const unsigned int shape_function,
                                   const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_values,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_values")));
@@ -4855,7 +4855,7 @@ namespace FEValuesViews
   Tensor<2, dim, spacedim>::divergence(const unsigned int shape_function,
                                        const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -4911,7 +4911,7 @@ namespace FEValuesViews
   Tensor<2, dim, spacedim>::gradient(const unsigned int shape_function,
                                      const unsigned int q_point) const
   {
-    AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+    AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
     Assert(fe_values->update_flags & update_gradients,
            (typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
              "update_gradients")));
@@ -5027,7 +5027,7 @@ inline const double &
 FEValuesBase<dim, spacedim>::shape_value(const unsigned int i,
                                          const unsigned int j) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_values,
          ExcAccessToUninitializedField("update_values"));
   Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
@@ -5064,7 +5064,7 @@ FEValuesBase<dim, spacedim>::shape_value_component(
   const unsigned int j,
   const unsigned int component) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_values,
          ExcAccessToUninitializedField("update_values"));
   AssertIndexRange(component, fe->n_components());
@@ -5093,7 +5093,7 @@ inline const Tensor<1, spacedim> &
 FEValuesBase<dim, spacedim>::shape_grad(const unsigned int i,
                                         const unsigned int j) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_gradients,
          ExcAccessToUninitializedField("update_gradients"));
   Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
@@ -5130,7 +5130,7 @@ FEValuesBase<dim, spacedim>::shape_grad_component(
   const unsigned int j,
   const unsigned int component) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_gradients,
          ExcAccessToUninitializedField("update_gradients"));
   AssertIndexRange(component, fe->n_components());
@@ -5158,7 +5158,7 @@ inline const Tensor<2, spacedim> &
 FEValuesBase<dim, spacedim>::shape_hessian(const unsigned int i,
                                            const unsigned int j) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
@@ -5195,7 +5195,7 @@ FEValuesBase<dim, spacedim>::shape_hessian_component(
   const unsigned int j,
   const unsigned int component) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   AssertIndexRange(component, fe->n_components());
@@ -5223,7 +5223,7 @@ inline const Tensor<3, spacedim> &
 FEValuesBase<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
                                                   const unsigned int j) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
   Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
@@ -5260,7 +5260,7 @@ FEValuesBase<dim, spacedim>::shape_3rd_derivative_component(
   const unsigned int j,
   const unsigned int component) const
 {
-  AssertIndexRange(i, fe->dofs_per_cell);
+  AssertIndexRange(i, fe->n_dofs_per_cell());
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
   AssertIndexRange(component, fe->n_components());
index 0489e2e15ef12ba56e050794abda6a7803613593..cf2138110f8b938251afee5e388569606a15f779 100644 (file)
@@ -884,8 +884,8 @@ namespace hp
 
     unsigned int max = 0;
     for (unsigned int i = 0; i < finite_elements.size(); ++i)
-      if (finite_elements[i]->dofs_per_vertex > max)
-        max = finite_elements[i]->dofs_per_vertex;
+      if (finite_elements[i]->n_dofs_per_vertex() > max)
+        max = finite_elements[i]->n_dofs_per_vertex();
 
     return max;
   }
@@ -964,8 +964,8 @@ namespace hp
 
     unsigned int max = 0;
     for (unsigned int i = 0; i < finite_elements.size(); ++i)
-      if (finite_elements[i]->dofs_per_cell > max)
-        max = finite_elements[i]->dofs_per_cell;
+      if (finite_elements[i]->n_dofs_per_cell() > max)
+        max = finite_elements[i]->n_dofs_per_cell();
 
     return max;
   }
index ea0bfa3220381cac3df5bd449371f34e1fe4cafe..fe7b8060ca9525c0895d4758ef332ccce45ae948 100644 (file)
@@ -244,8 +244,8 @@ namespace LocalIntegrators
                 const double             factor1 = 1.,
                 const double             factor2 = 1.)
     {
-      const unsigned int n1_dofs      = fe1.dofs_per_cell;
-      const unsigned int n2_dofs      = fe2.dofs_per_cell;
+      const unsigned int n1_dofs      = fe1.n_dofs_per_cell();
+      const unsigned int n2_dofs      = fe2.n_dofs_per_cell();
       const unsigned int n_components = fe1.get_fe().n_components();
 
       Assert(n1_dofs == n2_dofs, ExcNotImplemented());
index cb311005754bbedfd86cdbb1f28dd391e9514d5d..4ec7ccd2e458b0ba94aa5ee8d6e186fcd5ae3f27 100644 (file)
@@ -392,7 +392,7 @@ namespace LocalIntegrators
                    const double             factor1 = 1.,
                    const double             factor2 = -1.)
     {
-      const unsigned int n_dofs = fe1.dofs_per_cell;
+      const unsigned int n_dofs = fe1.n_dofs_per_cell();
 
       AssertDimension(fe1.get_fe().n_components(), dim);
       AssertDimension(fe2.get_fe().n_components(), dim);
index d488792a67ef5918a7adc89292928963bc6e95df..21f725b9af56dcd699d094aec01c4de4e51d3659 100644 (file)
@@ -261,7 +261,7 @@ namespace CUDAWrappers
       const UpdateFlags &    update_flags)
       : data(data)
       , fe_degree(data->fe_degree)
-      , dofs_per_cell(data->dofs_per_cell)
+      , dofs_per_cell(data->n_dofs_per_cell())
       , q_points_per_cell(data->q_points_per_cell)
       , fe_values(mapping,
                   fe,
@@ -273,7 +273,7 @@ namespace CUDAWrappers
       , padding_length(data->get_padding_length())
       , hanging_nodes(fe_degree, dof_handler, lexicographic_inv)
     {
-      local_dof_indices.resize(data->dofs_per_cell);
+      local_dof_indices.resize(data->n_dofs_per_cell());
       lexicographic_dof_indices.resize(dofs_per_cell);
     }
 
@@ -503,7 +503,7 @@ namespace CUDAWrappers
       const AffineConstraints<number> &constraints)
     {
       std::vector<types::global_dof_index> local_dof_indices(
-        cell->get_fe().dofs_per_cell);
+        cell->get_fe().n_dofs_per_cell());
       cell->get_dof_indices(local_dof_indices);
       constraints.resolve_indices(local_dof_indices);
 
@@ -888,7 +888,7 @@ namespace CUDAWrappers
     padding_length = 1 << static_cast<unsigned int>(
                        std::ceil(dim * std::log2(fe_degree + 1.)));
 
-    dofs_per_cell     = fe.dofs_per_cell;
+    dofs_per_cell     = fe.n_dofs_per_cell();
     q_points_per_cell = std::pow(n_q_points_1d, dim);
 
     const ::dealii::internal::MatrixFreeFunctions::ShapeInfo<Number> shape_info(
index 8d0f6761b40fda1585cabd87379768301f4816b6..b5b172956e10e5c1033c48416737e1b70822b6be 100644 (file)
@@ -7068,7 +7068,7 @@ FEEvaluation<dim,
   Assert(this->mapped_geometry.get() != nullptr, ExcNotInitialized());
   this->mapped_geometry->reinit(
     static_cast<typename Triangulation<dim>::cell_iterator>(cell));
-  this->local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+  this->local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
   if (level_dof_access)
     cell->get_mg_dof_indices(this->local_dof_indices);
   else
index 9aadc8521f00f4731ce16c4d1e2038bc639f9544..e1a33459e069e2906ecaad6d02be3e64f5a4cd38 100644 (file)
@@ -408,7 +408,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::internal_reinit(
                 dof_info[i].start_components[c] + dof_info[i].n_components[c];
             }
           dof_info[i].dofs_per_cell.push_back(
-            dof_handler[i]->get_fe(0).dofs_per_cell);
+            dof_handler[i]->get_fe(0).n_dofs_per_cell());
 
           // if indices are not initialized, the cell_level_index might not be
           // divisible by the vectorization length. But it must be for
@@ -746,7 +746,7 @@ namespace internal
           dof_info[no].cell_active_fe_index.resize(
             n_active_cells, numbers::invalid_unsigned_int);
 
-        is_fe_dg[no] = fes[0].dofs_per_vertex == 0;
+        is_fe_dg[no] = fes[0].n_dofs_per_vertex() == 0;
 
         lexicographic[no].resize(fes.size());
 
@@ -759,7 +759,7 @@ namespace internal
           {
             const FiniteElement<dim> &fe = fes[fe_index];
             // cache number of finite elements and dofs_per_cell
-            dof_info[no].dofs_per_cell.push_back(fe.dofs_per_cell);
+            dof_info[no].dofs_per_cell.push_back(fe.n_dofs_per_cell());
             dof_info[no].dofs_per_face.push_back(fe.dofs_per_face);
             dof_info[no].dimension       = dim;
             dof_info[no].n_base_elements = fe.n_base_elements();
@@ -780,7 +780,7 @@ namespace internal
                       .push_back(dof_info[no]
                                    .component_dof_indices_offset[fe_index]
                                    .back() +
-                                 fe.base_element(c).dofs_per_cell);
+                                 fe.base_element(c).n_dofs_per_cell());
                     dof_info[no].fe_index_conversion[fe_index].push_back(
                       fe.base_element(c).degree);
                   }
@@ -942,7 +942,7 @@ namespace internal
                           dof_indices.resize(
                             cell->neighbor_or_periodic_neighbor(f)
                               ->get_fe()
-                              .dofs_per_cell);
+                              .n_dofs_per_cell());
                           cell->neighbor_or_periodic_neighbor(f)
                             ->get_mg_dof_indices(dof_indices);
                           for (const auto dof_index : dof_indices)
index 26e07726cd5968c05dfefb033711649ce9cdfede..4bced728889da95bc01fab2ccf68d286f25185a0 100644 (file)
@@ -124,7 +124,8 @@ namespace internal
 
       const unsigned int fe_degree     = fe->degree;
       const unsigned int n_q_points_1d = quad.size();
-      const unsigned int n_dofs_1d = std::min(fe->dofs_per_cell, fe_degree + 1);
+      const unsigned int n_dofs_1d =
+        std::min(fe->n_dofs_per_cell(), fe_degree + 1);
 
       // renumber (this is necessary for FE_Q, for example, since there the
       // vertex DoFs come first, which is incompatible with the lexicographic
@@ -154,8 +155,8 @@ namespace internal
           scalar_lexicographic = fe_poly->get_poly_space_numbering_inverse();
         else if (fe_dgp != nullptr)
           {
-            scalar_lexicographic.resize(fe_dgp->dofs_per_cell);
-            for (unsigned int i = 0; i < fe_dgp->dofs_per_cell; ++i)
+            scalar_lexicographic.resize(fe_dgp->n_dofs_per_cell());
+            for (unsigned int i = 0; i < fe_dgp->n_dofs_per_cell(); ++i)
               scalar_lexicographic[i] = i;
             element_type = truncated_tensor;
           }
@@ -164,7 +165,7 @@ namespace internal
             scalar_lexicographic = fe_q_dg0->get_poly_space_numbering_inverse();
             element_type         = tensor_symmetric_plus_dg0;
           }
-        else if (fe->dofs_per_cell == 0)
+        else if (fe->n_dofs_per_cell() == 0)
           {
             // FE_Nothing case -> nothing to do here
           }
@@ -183,7 +184,7 @@ namespace internal
             std::vector<unsigned int> scalar_inv =
               Utilities::invert_permutation(scalar_lexicographic);
             std::vector<unsigned int> lexicographic(
-              fe_in.dofs_per_cell, numbers::invalid_unsigned_int);
+              fe_in.n_dofs_per_cell(), numbers::invalid_unsigned_int);
             unsigned int components_before = 0;
             for (unsigned int e = 0; e < base_element_number; ++e)
               components_before += fe_in.element_multiplicity(e);
@@ -199,7 +200,7 @@ namespace internal
             // have undefined blocks
             lexicographic_numbering.resize(fe_in.element_multiplicity(
                                              base_element_number) *
-                                             fe->dofs_per_cell,
+                                             fe->n_dofs_per_cell(),
                                            numbers::invalid_unsigned_int);
             for (unsigned int i = 0; i < lexicographic.size(); ++i)
               if (lexicographic[i] != numbers::invalid_unsigned_int)
@@ -216,7 +217,7 @@ namespace internal
         // by reading the name, as done before r29356)
         if (fe->has_support_points())
           unit_point = fe->get_unit_support_points()[scalar_lexicographic[0]];
-        Assert(fe->dofs_per_cell == 0 ||
+        Assert(fe->n_dofs_per_cell() == 0 ||
                  std::abs(fe->shape_value(scalar_lexicographic[0], unit_point) -
                           1) < 1e-13,
                ExcInternalError("Could not decode 1D shape functions for the "
@@ -227,7 +228,7 @@ namespace internal
       n_q_points = Utilities::fixed_power<dim>(n_q_points_1d);
       n_q_points_face =
         dim > 1 ? Utilities::fixed_power<dim - 1>(n_q_points_1d) : 1;
-      dofs_per_component_on_cell = fe->dofs_per_cell;
+      dofs_per_component_on_cell = fe->n_dofs_per_cell();
       dofs_per_component_on_face =
         dim > 1 ? Utilities::fixed_power<dim - 1>(fe_degree + 1) : 1;
 
index 6bb11ae6938228948dd6dba29bef3f377e682d68..ad4d51ae13aa12e1d8ce3b24d5cabcd118c61d98 100644 (file)
@@ -304,7 +304,7 @@ namespace MeshWorker
     , level_cell(false)
   {
     std::vector<types::global_dof_index> aux(1);
-    aux[0] = dof_handler.get_fe().dofs_per_cell;
+    aux[0] = dof_handler.get_fe().n_dofs_per_cell();
     aux_local_indices.reinit(aux);
   }
 
@@ -314,12 +314,12 @@ namespace MeshWorker
   inline void
   DoFInfo<dim, spacedim, number>::get_indices(const DHCellIterator &c)
   {
-    indices.resize(c->get_fe().dofs_per_cell);
+    indices.resize(c->get_fe().n_dofs_per_cell());
     if (block_info == nullptr || block_info->local().size() == 0)
       c->get_active_or_mg_dof_indices(indices);
     else
       {
-        indices_org.resize(c->get_fe().dofs_per_cell);
+        indices_org.resize(c->get_fe().n_dofs_per_cell());
         c->get_active_or_mg_dof_indices(indices_org);
         set_block_indices();
       }
index 3a18fee1b0db053ba203e0f2f5c383c8d9c26d93..2d7b3b5255274beca6e732a746cf3b39fe829078 100644 (file)
@@ -998,7 +998,8 @@ namespace MeshWorker
     const std::string &global_vector_name,
     Number             dummy) const
   {
-    const unsigned int n_dofs = get_current_fe_values().get_fe().dofs_per_cell;
+    const unsigned int n_dofs =
+      get_current_fe_values().get_fe().n_dofs_per_cell();
 
     const std::string dofs_name =
       get_unique_dofs_name(global_vector_name, n_dofs, dummy);
index 494cdfd082dd8c004b787f4689e259d493a61a2c..7367914349e89468381305cfca1d62b77d379624 100644 (file)
@@ -97,7 +97,7 @@ namespace internal
 
       /**
        * A variable storing the number of degrees of freedom on all child cells.
-       * It is <tt>2<sup>dim</sup>*fe.dofs_per_cell</tt> for DG elements and
+       * It is <tt>2<sup>dim</sup>*fe.n_dofs_per_cell()</tt> for DG elements and
        * somewhat less for continuous elements.
        */
       unsigned int n_child_cell_dofs;
index 939641b1e01bc944ad5cf88508a095136b1373a2..76e24a29d678db6da519486e9058550aeab8aa84 100644 (file)
@@ -199,8 +199,8 @@ private:
 
   /**
    * A variable storing the number of degrees of freedom on all child cells. It
-   * is <tt>2<sup>dim</sup>*fe.dofs_per_cell</tt> for DG elements and somewhat
-   * less for continuous elements.
+   * is <tt>2<sup>dim</sup>*fe.n_dofs_per_cell()</tt> for DG elements and
+   * somewhat less for continuous elements.
    */
   unsigned int n_child_cell_dofs;
 
@@ -545,10 +545,10 @@ MGTransferMatrixFree<dim, Number>::interpolate_to_mg(
       ghosted_vector = dst[level];
       ghosted_vector.update_ghost_values();
 
-      std::vector<Number>                  dof_values_coarse(fe.dofs_per_cell);
-      Vector<Number>                       dof_values_fine(fe.dofs_per_cell);
-      Vector<Number>                       tmp(fe.dofs_per_cell);
-      std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+      std::vector<Number> dof_values_coarse(fe.n_dofs_per_cell());
+      Vector<Number>      dof_values_fine(fe.n_dofs_per_cell());
+      Vector<Number>      tmp(fe.n_dofs_per_cell());
+      std::vector<types::global_dof_index>    dof_indices(fe.n_dofs_per_cell());
       typename DoFHandler<dim>::cell_iterator cell =
         dof_handler.begin(level - 1);
       typename DoFHandler<dim>::cell_iterator endc = dof_handler.end(level - 1);
@@ -565,18 +565,18 @@ MGTransferMatrixFree<dim, Number>::interpolate_to_mg(
             for (unsigned int child = 0; child < cell->n_children(); ++child)
               {
                 cell->child(child)->get_mg_dof_indices(dof_indices);
-                for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
                   dof_values_fine(i) = ghosted_vector(dof_indices[i]);
                 fe.get_restriction_matrix(child, cell->refinement_case())
                   .vmult(tmp, dof_values_fine);
-                for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
                   if (fe.restriction_is_additive(i))
                     dof_values_coarse[i] += tmp[i];
                   else if (tmp(i) != 0.)
                     dof_values_coarse[i] = tmp[i];
               }
             cell->get_mg_dof_indices(dof_indices);
-            for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+            for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
               dst[level - 1](dof_indices[i]) = dof_values_coarse[i];
           }
 
index d0545803c90d036ac5bff3f1572b0f9bf635803b..d9af4fb6206b8e3f38f2262c145519b5d1636779 100644 (file)
@@ -1251,7 +1251,7 @@ namespace internal
       const VectorType *vector = &((*vectors)[dof_cell->level()]);
 
       const unsigned int dofs_per_cell =
-        this->dof_handler->get_fe(0).dofs_per_cell;
+        this->dof_handler->get_fe(0).n_dofs_per_cell();
 
       std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
       dof_cell->get_mg_dof_indices(dof_indices);
@@ -1290,7 +1290,7 @@ namespace internal
       const VectorType *vector = &((*vectors)[dof_cell->level()]);
 
       const unsigned int dofs_per_cell =
-        this->dof_handler->get_fe(0).dofs_per_cell;
+        this->dof_handler->get_fe(0).n_dofs_per_cell();
 
       std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
       dof_cell->get_mg_dof_indices(dof_indices);
index bbbdf0467a2523428241ef86a284cf96c9fde530..d1fd6b72f0858f865e1f8b944962fe49c4634caa 100644 (file)
@@ -951,7 +951,7 @@ namespace MatrixCreator
       const unsigned int dofs_per_face = fe.dofs_per_face;
 
       copy_data.cell          = cell;
-      copy_data.dofs_per_cell = fe.dofs_per_cell;
+      copy_data.dofs_per_cell = fe.n_dofs_per_cell();
 
       UpdateFlags update_flags =
         UpdateFlags(update_values | update_JxW_values | update_normal_vectors |
@@ -1382,7 +1382,7 @@ namespace MatrixCreator
       const unsigned int                  dofs_per_face   = fe.dofs_per_face;
 
       copy_data.cell          = cell;
-      copy_data.dofs_per_cell = fe.dofs_per_cell;
+      copy_data.dofs_per_cell = fe.n_dofs_per_cell();
       copy_data.dofs.resize(copy_data.dofs_per_cell);
       cell->get_dof_indices(copy_data.dofs);
 
index df11dd947a6686e7905c6f8395dc23f9fa88c5b0..0088a8d8ba7c2dfe6aee3c73171c80f9ad0ba52e 100644 (file)
@@ -130,7 +130,7 @@ namespace VectorTools
                     boundary_function.vector_value(cell->vertex(direction),
                                                    function_values);
 
-                  for (unsigned int i = 0; i < fe.dofs_per_vertex; ++i)
+                  for (unsigned int i = 0; i < fe.n_dofs_per_vertex(); ++i)
                     if (component_mask[fe.face_system_to_component_index(i)
                                          .first])
                       boundary_values[cell->vertex_dof_index(
@@ -229,7 +229,7 @@ namespace VectorTools
                   // interested in, however. make sure that all shape functions
                   // that are non-zero for the components we are interested in,
                   // are in fact primitive
-                  for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+                  for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell();
                        ++i)
                     {
                       const ComponentMask &nonzero_component_array =
@@ -310,19 +310,23 @@ namespace VectorTools
                                     (dim == 1 ?
                                        i :
                                        (dim == 2 ?
-                                          (i < 2 * fe.dofs_per_vertex ?
+                                          (i < 2 * fe.n_dofs_per_vertex() ?
                                              i :
-                                             i + 2 * fe.dofs_per_vertex) :
+                                             i + 2 * fe.n_dofs_per_vertex()) :
                                           (dim == 3 ?
-                                             (i < 4 * fe.dofs_per_vertex ?
+                                             (i < 4 * fe.n_dofs_per_vertex() ?
                                                 i :
-                                                (i < 4 * fe.dofs_per_vertex +
+                                                (i < 4 * fe.n_dofs_per_vertex() +
                                                        4 * fe.dofs_per_line ?
-                                                   i + 4 * fe.dofs_per_vertex :
-                                                   i + 4 * fe.dofs_per_vertex +
+                                                   i +
+                                                     4 *
+                                                       fe.n_dofs_per_vertex() :
+                                                   i +
+                                                     4 *
+                                                       fe.n_dofs_per_vertex() +
                                                      8 * fe.dofs_per_line)) :
                                              numbers::invalid_unsigned_int)));
-                                  Assert(cell_i < fe.dofs_per_cell,
+                                  Assert(cell_i < fe.n_dofs_per_cell(),
                                          ExcInternalError());
 
                                   // make sure that if this is not a primitive
@@ -2150,7 +2154,7 @@ namespace VectorTools
           //      and so on.
 
           const unsigned int face_dof_idx =
-            GeometryInfo<dim>::vertices_per_face * fe.dofs_per_vertex +
+            GeometryInfo<dim>::vertices_per_face * fe.n_dofs_per_vertex() +
             line * fe.dofs_per_line + line_dof_idx;
 
           // Note, assuming that the edge orientations are "standard"
@@ -2586,7 +2590,7 @@ namespace VectorTools
                       //      (degree+1),..,2*(degree+1) and so on.
                       const unsigned int face_dof_idx =
                         GeometryInfo<dim>::vertices_per_face *
-                          fe.dofs_per_vertex +
+                          fe.n_dofs_per_vertex() +
                         line * fe.dofs_per_line + line_dof_idx;
 
                       // Next, translate from face to cell. Note, this might be
@@ -2661,7 +2665,8 @@ namespace VectorTools
                    ++quad_dof_idx)
                 {
                   const unsigned int face_idx =
-                    GeometryInfo<dim>::vertices_per_face * fe.dofs_per_vertex +
+                    GeometryInfo<dim>::vertices_per_face *
+                      fe.n_dofs_per_vertex() +
                     lines_per_face * fe.dofs_per_line + quad_dof_idx;
                   const unsigned int cell_idx =
                     fe.face_to_cell_index(face_idx, face);
index 511400948cabe822b2505be9111442752780e335..eac1231721fafaaaeb99debee493e2061da21648 100644 (file)
@@ -334,7 +334,7 @@ namespace VectorTools
           const unsigned int fe_index = cell->active_fe_index();
 
           // Do nothing if there are no local degrees of freedom.
-          if (fe[fe_index].dofs_per_cell == 0)
+          if (fe[fe_index].n_dofs_per_cell() == 0)
             continue;
 
           // Skip processing of the current cell if the function object is
@@ -349,7 +349,7 @@ namespace VectorTools
             fe_values.get_present_fe_values().get_quadrature_points();
 
           // Get indices of the dofs on this cell
-          const auto n_dofs = fe[fe_index].dofs_per_cell;
+          const auto n_dofs = fe[fe_index].n_dofs_per_cell();
           dofs_on_cell.resize(n_dofs);
           cell->get_dof_indices(dofs_on_cell);
 
@@ -533,8 +533,8 @@ namespace VectorTools
               OutVector &                      data_2)
   {
     using number = typename OutVector::value_type;
-    Vector<number> cell_data_1(dof_1.get_fe().dofs_per_cell);
-    Vector<number> cell_data_2(dof_2.get_fe().dofs_per_cell);
+    Vector<number> cell_data_1(dof_1.get_fe().n_dofs_per_cell());
+    Vector<number> cell_data_2(dof_2.get_fe().n_dofs_per_cell());
 
     // Reset output vector.
     data_2 = static_cast<number>(0);
@@ -544,7 +544,7 @@ namespace VectorTools
     touch_count.reinit(data_2);
 
     std::vector<types::global_dof_index> local_dof_indices(
-      dof_2.get_fe().dofs_per_cell);
+      dof_2.get_fe().n_dofs_per_cell());
 
     typename DoFHandler<dim, spacedim>::active_cell_iterator cell_1 =
       dof_1.begin_active();
@@ -565,7 +565,7 @@ namespace VectorTools
             cell_2->get_dof_indices(local_dof_indices);
 
             // Distribute cell vector.
-            for (unsigned int j = 0; j < dof_2.get_fe().dofs_per_cell; ++j)
+            for (unsigned int j = 0; j < dof_2.get_fe().n_dofs_per_cell(); ++j)
               {
                 ::dealii::internal::ElementAccess<OutVector>::add(
                   cell_data_2(j), local_dof_indices[j], data_2);
@@ -638,9 +638,10 @@ namespace VectorTools
 
         MappingQGeneric<dim, spacedim> map_q(fe.degree);
         FEValues<dim, spacedim> fe_v(map_q, fe, quad, update_quadrature_points);
-        std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
+        std::vector<types::global_dof_index> dofs(fe.n_dofs_per_cell());
 
-        AssertDimension(fe.dofs_per_cell, fe.get_unit_support_points().size());
+        AssertDimension(fe.n_dofs_per_cell(),
+                        fe.get_unit_support_points().size());
         Assert(fe.is_primitive(),
                ExcMessage("FE is not Primitive! This won't work."));
 
@@ -699,8 +700,9 @@ namespace VectorTools
         const ComponentMask maskq(spacedim, true);
         get_position_vector(dhq, eulerq);
 
-        FullMatrix<double> transfer(fe.dofs_per_cell, feq.dofs_per_cell);
-        FullMatrix<double> local_transfer(feq.dofs_per_cell);
+        FullMatrix<double>             transfer(fe.n_dofs_per_cell(),
+                                    feq.n_dofs_per_cell());
+        FullMatrix<double>             local_transfer(feq.n_dofs_per_cell());
         const std::vector<Point<dim>> &points = feq.get_unit_support_points();
 
         // Here we construct the interpolation matrix from
@@ -735,18 +737,18 @@ namespace VectorTools
         // and check that this is the case. If not, we bail out, not
         // knowing what to do in this case.
 
-        std::vector<unsigned int> fe_to_feq(fe.dofs_per_cell,
+        std::vector<unsigned int> fe_to_feq(fe.n_dofs_per_cell(),
                                             numbers::invalid_unsigned_int);
         unsigned int              index = 0;
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           if (fe_mask[fe.system_to_component_index(i).first])
             fe_to_feq[i] = index++;
 
-        // If index is not the same as feq.dofs_per_cell, we won't
+        // If index is not the same as feq.n_dofs_per_cell(), we won't
         // know how to invert the resulting matrix. Bail out.
-        Assert(index == feq.dofs_per_cell, ExcNotImplemented());
+        Assert(index == feq.n_dofs_per_cell(), ExcNotImplemented());
 
-        for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+        for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
           {
             const unsigned int comp_j = fe.system_to_component_index(j).first;
             if (fe_mask[comp_j])
@@ -763,9 +765,9 @@ namespace VectorTools
         // one is filled only with the information from the components
         // of the displacement. The rest is set to zero.
         local_transfer.invert(local_transfer);
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           if (fe_to_feq[i] != numbers::invalid_unsigned_int)
-            for (unsigned int j = 0; j < feq.dofs_per_cell; ++j)
+            for (unsigned int j = 0; j < feq.n_dofs_per_cell(); ++j)
               transfer(i, j) = local_transfer(fe_to_feq[i], j);
 
         // The interpolation matrix is then passed to the
@@ -927,7 +929,7 @@ namespace VectorTools
         // dof_values by interpolation.
         if (cell1->is_active())
           {
-            cache.reinit(cell1->get_fe().dofs_per_cell);
+            cache.reinit(cell1->get_fe().n_dofs_per_cell());
             cell1->get_interpolated_dof_values(u1,
                                                cache,
                                                cell1->active_fe_index());
@@ -937,7 +939,7 @@ namespace VectorTools
           }
         else
           {
-            cache.reinit(cell2->get_fe().dofs_per_cell);
+            cache.reinit(cell2->get_fe().n_dofs_per_cell());
             cell1->get_interpolated_dof_values(u1,
                                                cache,
                                                cell2->active_fe_index());
index 05c831c63ce641a413d44b516b15579b159fba26..5c4da1c075b3c4756748e8b2b9a7a03d36492806 100644 (file)
@@ -299,7 +299,7 @@ namespace VectorTools
                                       UpdateFlags(update_values));
     fe_values.reinit(cell_point.first);
 
-    const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
 
     std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
     cell_point.first->get_dof_indices(local_dof_indices);
@@ -358,7 +358,8 @@ namespace VectorTools
                             UpdateFlags(update_values));
     fe_values.reinit(cell_point.first);
 
-    const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell =
+      cell_point.first->get_fe().n_dofs_per_cell();
 
     std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
     cell_point.first->get_dof_indices(local_dof_indices);
@@ -400,7 +401,7 @@ namespace VectorTools
                                       UpdateFlags(update_values));
     fe_values.reinit(cell_point.first);
 
-    const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
 
     std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
     cell_point.first->get_dof_indices(local_dof_indices);
@@ -466,7 +467,8 @@ namespace VectorTools
                             UpdateFlags(update_values));
     fe_values.reinit(cell_point.first);
 
-    const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell =
+      cell_point.first->get_fe().n_dofs_per_cell();
 
     std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
     cell_point.first->get_dof_indices(local_dof_indices);
index f4c730afd19cc27fcc20eeca95c3caa268bf5065..8748496ebe76527801bb616be379d8c85da9d172 100644 (file)
@@ -639,7 +639,7 @@ namespace VectorTools
                                 quadrature,
                                 update_values | update_JxW_values);
 
-        const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
         const unsigned int n_q_points    = quadrature.size();
         Vector<Number>     cell_rhs(dofs_per_cell);
         std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
index cf06c04a3726234041cad228ee2753b080a38668..e3f3bd6fa3a3fefef385dce67cdeedd05fa59596 100644 (file)
@@ -220,7 +220,7 @@ namespace Particles
         if (comps[i])
           space_gtl[i] = j++;
 
-      std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+      std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
 
       while (particle != particle_handler.end())
         {
@@ -238,7 +238,7 @@ namespace Particles
 
               const auto id = particle->get_id();
 
-              for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+              for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
                 {
                   const auto comp_j =
                     space_gtl[fe.system_to_component_index(j).first];
index 01d1ae9982c02f46fb3fc1889a83d230aaf56e6e..fb8dfff2bcf678c1ca3e21ccb5e2d4705d49e7f6 100644 (file)
@@ -82,7 +82,7 @@ namespace parallel
              const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
       const float result =
         std::trunc(coefficients.first *
-                   std::pow(future_fe.dofs_per_cell, coefficients.second));
+                   std::pow(future_fe.n_dofs_per_cell(), coefficients.second));
 
       Assert(result >= 0. &&
                result <=
@@ -106,7 +106,8 @@ namespace parallel
              const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
       float result = 0;
       for (const auto &pair : coefficients)
-        result += pair.first * std::pow(future_fe.dofs_per_cell, pair.second);
+        result +=
+          pair.first * std::pow(future_fe.n_dofs_per_cell(), pair.second);
       result = std::trunc(result);
 
       Assert(result >= 0. &&
index 2e4652abbdce06b98a5574b56eb91588ee1fc544..481990c56d8550e58a1ec93f59ca8e6a28e6ebe1 100644 (file)
@@ -343,7 +343,7 @@ namespace parallel
         }
 
       const unsigned int dofs_per_cell =
-        dof_handler->get_fe(fe_index).dofs_per_cell;
+        dof_handler->get_fe(fe_index).n_dofs_per_cell();
 
       if (dofs_per_cell == 0)
         return std::vector<char>(); // nothing to do for FE_Nothing
@@ -418,7 +418,7 @@ namespace parallel
         }
 
       const unsigned int dofs_per_cell =
-        dof_handler->get_fe(fe_index).dofs_per_cell;
+        dof_handler->get_fe(fe_index).n_dofs_per_cell();
 
       if (dofs_per_cell == 0)
         return; // nothing to do for FE_Nothing
index 836f4dbc33c93d7e613059621fb959c7858f2a6b..863d584cd49fd421bf6a573ff615f437ab83756b 100644 (file)
@@ -130,7 +130,7 @@ DoFCellAccessor<dim, spacedim, lda>::set_dof_indices(
 
   Assert(this->dof_handler != nullptr, typename BaseClass::ExcInvalidObject());
 
-  AssertDimension(local_dof_indices.size(), this->get_fe().dofs_per_cell);
+  AssertDimension(local_dof_indices.size(), this->get_fe().n_dofs_per_cell());
 
   internal::DoFAccessorImplementation::Implementation::
     template set_dof_indices<dim, spacedim, lda, dim>(*this,
index b9b2f7c6feba216a2d869e5d720c69851061efa5..0569e0475e3810f7105518246d3677c893aea551 100644 (file)
@@ -73,7 +73,7 @@ DoFCellAccessor<dim, spacedim, lda>::get_interpolated_dof_values(
           // well, here we need to first get the values from the current
           // cell and then interpolate it to the element requested. this
           // can clearly only happen for hp::DoFHandler objects
-          const unsigned int dofs_per_cell = this->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = this->get_fe().n_dofs_per_cell();
           if (dofs_per_cell == 0)
             {
               interpolated_values = 0;
@@ -84,8 +84,8 @@ DoFCellAccessor<dim, spacedim, lda>::get_interpolated_dof_values(
               this->get_dof_values(values, tmp);
 
               FullMatrix<double> interpolation(
-                this->dof_handler->get_fe(fe_index).dofs_per_cell,
-                this->get_fe().dofs_per_cell);
+                this->dof_handler->get_fe(fe_index).n_dofs_per_cell(),
+                this->get_fe().n_dofs_per_cell());
               this->dof_handler->get_fe(fe_index).get_interpolation_matrix(
                 this->get_fe(), interpolation);
               interpolation.vmult(interpolated_values, tmp);
@@ -115,7 +115,7 @@ DoFCellAccessor<dim, spacedim, lda>::get_interpolated_dof_values(
 
       const FiniteElement<dim, spacedim> &fe =
         this->get_dof_handler().get_fe(fe_index);
-      const unsigned int dofs_per_cell = fe.dofs_per_cell;
+      const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
       Assert(this->dof_handler != nullptr,
              typename BaseClass::ExcInvalidObject());
@@ -130,7 +130,7 @@ DoFCellAccessor<dim, spacedim, lda>::get_interpolated_dof_values(
       // interpolating FE_Nothing), then simply skip all of the
       // following since the output vector would be of size zero
       // anyway (and in fact is of size zero, see the assertion above)
-      if (fe.dofs_per_cell > 0)
+      if (fe.n_dofs_per_cell() > 0)
         {
           Vector<number> tmp1(dofs_per_cell);
           Vector<number> tmp2(dofs_per_cell);
index b5c11438199c053a9afa13768db428b54708cd86..b9fd3d0ab174a7651f726ec3ec6ee6c469c2781d 100644 (file)
@@ -69,12 +69,12 @@ DoFCellAccessor<dim, spacedim, lda>::set_dof_values_by_interpolation(
       else
         {
           Assert(local_values.size() ==
-                   this->dof_handler->get_fe(fe_index).dofs_per_cell,
+                   this->dof_handler->get_fe(fe_index).n_dofs_per_cell(),
                  ExcMessage("Incorrect size of local_values vector."));
 
           FullMatrix<double> interpolation(
-            this->get_fe().dofs_per_cell,
-            this->dof_handler->get_fe(fe_index).dofs_per_cell);
+            this->get_fe().n_dofs_per_cell(),
+            this->dof_handler->get_fe(fe_index).n_dofs_per_cell());
 
           this->get_fe().get_interpolation_matrix(
             this->dof_handler->get_fe(fe_index), interpolation);
@@ -82,7 +82,7 @@ DoFCellAccessor<dim, spacedim, lda>::set_dof_values_by_interpolation(
           // do the interpolation to the target space. for historical
           // reasons, matrices are set to size 0x0 internally even
           // we reinit as 4x0, so we have to treat this case specially
-          Vector<number> tmp(this->get_fe().dofs_per_cell);
+          Vector<number> tmp(this->get_fe().n_dofs_per_cell());
           if ((tmp.size() > 0) && (local_values.size() > 0))
             interpolation.vmult(tmp, local_values);
 
@@ -105,7 +105,7 @@ DoFCellAccessor<dim, spacedim, lda>::set_dof_values_by_interpolation(
 
       const FiniteElement<dim, spacedim> &fe =
         this->get_dof_handler().get_fe(fe_index);
-      const unsigned int dofs_per_cell = fe.dofs_per_cell;
+      const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
 
       Assert(this->dof_handler != nullptr,
              typename BaseClass::ExcInvalidObject());
index dd0b53f1c6e65e712386d28f4ec37fbeae39ee6a..ec9004b8915012f0dde890806bc8f13d4d099668 100644 (file)
@@ -160,8 +160,8 @@ namespace internal
 
             // the following numbers are not based on actual counting but by
             // extrapolating the number sequences from the previous ones (for
-            // example, for dofs_per_vertex, the sequence above is 19, 21, 28,
-            // 30, 37, and is continued as follows):
+            // example, for n_dofs_per_vertex(), the sequence above is 19, 21,
+            // 28, 30, 37, and is continued as follows):
             case 9:
               max_couplings =
                 39 * dof_handler.fe_collection.max_dofs_per_vertex() +
@@ -260,7 +260,8 @@ namespace internal
       static void reserve_space(DoFHandler<1, spacedim> &dof_handler)
       {
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
 
         for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
@@ -279,7 +280,7 @@ namespace internal
 
             dof_handler.cell_dof_cache_indices[i].resize(
               dof_handler.tria->n_raw_cells(i) *
-                dof_handler.get_fe().dofs_per_cell,
+                dof_handler.get_fe().n_dofs_per_cell(),
               numbers::invalid_dof_index);
 
             dof_handler.cell_dof_cache_ptr[i].reserve(
@@ -287,11 +288,12 @@ namespace internal
             for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
                  j++)
               dof_handler.cell_dof_cache_ptr[i].push_back(
-                j * dof_handler.get_fe().dofs_per_cell);
+                j * dof_handler.get_fe().n_dofs_per_cell());
           }
 
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
       }
 
@@ -299,7 +301,8 @@ namespace internal
       static void reserve_space(DoFHandler<2, spacedim> &dof_handler)
       {
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
 
         for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
@@ -318,7 +321,7 @@ namespace internal
 
             dof_handler.cell_dof_cache_indices[i].resize(
               dof_handler.tria->n_raw_cells(i) *
-                dof_handler.get_fe().dofs_per_cell,
+                dof_handler.get_fe().n_dofs_per_cell(),
               numbers::invalid_dof_index);
 
             dof_handler.cell_dof_cache_ptr[i].reserve(
@@ -326,11 +329,12 @@ namespace internal
             for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
                  j++)
               dof_handler.cell_dof_cache_ptr[i].push_back(
-                j * dof_handler.get_fe().dofs_per_cell);
+                j * dof_handler.get_fe().n_dofs_per_cell());
           }
 
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
 
         if (dof_handler.tria->n_cells() > 0)
@@ -354,7 +358,8 @@ namespace internal
       static void reserve_space(DoFHandler<3, spacedim> &dof_handler)
       {
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
 
         for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
@@ -373,7 +378,7 @@ namespace internal
 
             dof_handler.cell_dof_cache_indices[i].resize(
               dof_handler.tria->n_raw_cells(i) *
-                dof_handler.get_fe().dofs_per_cell,
+                dof_handler.get_fe().n_dofs_per_cell(),
               numbers::invalid_dof_index);
 
             dof_handler.cell_dof_cache_ptr[i].reserve(
@@ -381,11 +386,12 @@ namespace internal
             for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
                  j++)
               dof_handler.cell_dof_cache_ptr[i].push_back(
-                j * dof_handler.get_fe().dofs_per_cell);
+                j * dof_handler.get_fe().n_dofs_per_cell());
           }
 
         dof_handler.object_dof_indices[0][0].resize(
-          dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+          dof_handler.tria->n_vertices() *
+            dof_handler.get_fe().n_dofs_per_vertex(),
           numbers::invalid_dof_index);
 
         if (dof_handler.tria->n_cells() > 0)
@@ -475,7 +481,7 @@ namespace internal
               dof_handler.mg_vertex_dofs[vertex].init(
                 min_level[vertex],
                 max_level[vertex],
-                dof_handler.get_fe().dofs_per_vertex);
+                dof_handler.get_fe().n_dofs_per_vertex());
             }
 
           else
@@ -548,7 +554,7 @@ namespace internal
                      ExcInternalError());
               dof_handler.mg_vertex_dofs[vertex].init(min_level[vertex],
                                                       max_level[vertex],
-                                                      fe.dofs_per_vertex);
+                                                      fe.n_dofs_per_vertex());
             }
 
           else
@@ -623,7 +629,7 @@ namespace internal
                      ExcInternalError());
               dof_handler.mg_vertex_dofs[vertex].init(min_level[vertex],
                                                       max_level[vertex],
-                                                      fe.dofs_per_vertex);
+                                                      fe.n_dofs_per_vertex());
             }
 
           else
@@ -1078,7 +1084,7 @@ namespace internal
                       {
                         fe_slots_needed++;
                         vertex_slots_needed +=
-                          dof_handler.get_fe(fe).dofs_per_vertex;
+                          dof_handler.get_fe(fe).n_dofs_per_vertex();
                       }
                 }
             }
@@ -1102,7 +1108,7 @@ namespace internal
                         dof_handler.object_dof_indices[l][d].size());
 
                       for (unsigned int i = 0;
-                           i < dof_handler.get_fe(fe).dofs_per_vertex;
+                           i < dof_handler.get_fe(fe).n_dofs_per_vertex();
                            i++)
                         dof_handler.object_dof_indices[l][d].push_back(
                           numbers::invalid_dof_index);
@@ -1173,7 +1179,7 @@ namespace internal
 
                     dof_handler.cell_dof_cache_ptr[level][cell->index()] =
                       cache_size;
-                    cache_size += cell->get_fe().dofs_per_cell;
+                    cache_size += cell->get_fe().n_dofs_per_cell();
                   }
 
               dof_handler.object_dof_indices[level][dim] =
index 0df5e7a642765a03894b3a9afefbf7f1cf9fb316..4803ec877b587690a1c90cc6fa08d81d03bbcc75 100644 (file)
@@ -1702,7 +1702,7 @@ namespace internal
               if ((subdomain_id == numbers::invalid_subdomain_id) ||
                   (cell->subdomain_id() == subdomain_id))
                 {
-                  dof_indices.resize(cell->get_fe().dofs_per_cell);
+                  dof_indices.resize(cell->get_fe().n_dofs_per_cell());
 
                   // circumvent cache
                   internal::DoFAccessorImplementation::Implementation::
@@ -1755,7 +1755,7 @@ namespace internal
                 // delete all dofs that live there and that we have
                 // previously assigned a number to (i.e. the ones on
                 // the interface)
-                local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+                local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_indices(local_dof_indices);
                 for (const auto &local_dof_index : local_dof_indices)
                   if (local_dof_index != numbers::invalid_dof_index)
@@ -1792,7 +1792,7 @@ namespace internal
             if ((level_subdomain_id == numbers::invalid_subdomain_id) ||
                 (cell->level_subdomain_id() == level_subdomain_id))
               {
-                dof_indices.resize(cell->get_fe().dofs_per_cell);
+                dof_indices.resize(cell->get_fe().n_dofs_per_cell());
 
                 cell->get_mg_dof_indices(dof_indices);
 
@@ -1865,7 +1865,7 @@ namespace internal
                   // really is unused
                   Assert(dof_handler.get_triangulation().vertex_used(
                            (i - dof_handler.object_dof_indices[0][0].begin()) /
-                           dof_handler.get_fe().dofs_per_vertex) == false,
+                           dof_handler.get_fe().n_dofs_per_vertex()) == false,
                          ExcInternalError());
               return;
             }
@@ -1906,7 +1906,7 @@ namespace internal
                         std::integral_constant<int, 0>());
 
                   for (unsigned int d = 0;
-                       d < dof_handler.get_fe(fe_index).dofs_per_vertex;
+                       d < dof_handler.get_fe(fe_index).n_dofs_per_vertex();
                        ++d)
                     {
                       const types::global_dof_index old_dof_index =
@@ -2457,13 +2457,14 @@ namespace internal
             // if the present vertex lives on the current level
             if ((i->get_coarsest_level() <= level) &&
                 (i->get_finest_level() >= level))
-              for (unsigned int d = 0; d < dof_handler.get_fe().dofs_per_vertex;
+              for (unsigned int d = 0;
+                   d < dof_handler.get_fe().n_dofs_per_vertex();
                    ++d)
                 {
                   const dealii::types::global_dof_index idx =
                     i->get_index(level,
                                  d,
-                                 dof_handler.get_fe().dofs_per_vertex);
+                                 dof_handler.get_fe().n_dofs_per_vertex());
 
                   if (idx != numbers::invalid_dof_index)
                     {
@@ -2474,7 +2475,7 @@ namespace internal
                              ExcInternalError());
                       i->set_index(level,
                                    d,
-                                   dof_handler.get_fe().dofs_per_vertex,
+                                   dof_handler.get_fe().n_dofs_per_vertex(),
                                    (indices_we_care_about.size() == 0) ?
                                      (new_numbers[idx]) :
                                      (new_numbers[indices_we_care_about
@@ -2908,7 +2909,8 @@ namespace internal
               // that all cells are either locally owned or ghosts (not
               // artificial), so this call will always yield the true owner
               const types::subdomain_id subdomain_id = cell->subdomain_id();
-              const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+              const unsigned int        dofs_per_cell =
+                cell->get_fe().n_dofs_per_cell();
               local_dof_indices.resize(dofs_per_cell);
               cell->get_dof_indices(local_dof_indices);
 
@@ -2970,7 +2972,8 @@ namespace internal
               // artificial), so this call will always yield the true owner
               const types::subdomain_id level_subdomain_id =
                 cell->level_subdomain_id();
-              const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+              const unsigned int dofs_per_cell =
+                cell->get_fe().n_dofs_per_cell();
               local_dof_indices.resize(dofs_per_cell);
               cell->get_mg_dof_indices(local_dof_indices);
 
@@ -3554,14 +3557,14 @@ namespace internal
                    ExcInternalError());
 
             std::vector<dealii::types::global_dof_index> data(
-              cell->get_fe().dofs_per_cell);
+              cell->get_fe().n_dofs_per_cell());
             cell->get_mg_dof_indices(data);
 
             return data;
           };
 
           const auto unpack = [](const auto &cell, const auto &dofs) {
-            Assert(cell->get_fe().dofs_per_cell == dofs.size(),
+            Assert(cell->get_fe().n_dofs_per_cell() == dofs.size(),
                    ExcInternalError());
 
             Assert(cell->level_subdomain_id() !=
@@ -3569,7 +3572,7 @@ namespace internal
                    ExcInternalError());
 
             std::vector<dealii::types::global_dof_index> dof_indices(
-              cell->get_fe().dofs_per_cell);
+              cell->get_fe().n_dofs_per_cell());
             cell->get_mg_dof_indices(dof_indices);
 
             bool complete = true;
@@ -3655,20 +3658,20 @@ namespace internal
             Assert(cell->is_locally_owned(), ExcInternalError());
 
             std::vector<dealii::types::global_dof_index> data(
-              cell->get_fe().dofs_per_cell);
+              cell->get_fe().n_dofs_per_cell());
             cell->get_dof_indices(data);
 
             return data;
           };
 
           const auto unpack = [](const auto &cell, const auto &dofs) {
-            Assert(cell->get_fe().dofs_per_cell == dofs.size(),
+            Assert(cell->get_fe().n_dofs_per_cell() == dofs.size(),
                    ExcInternalError());
 
             Assert(cell->is_ghost(), ExcInternalError());
 
             std::vector<dealii::types::global_dof_index> dof_indices(
-              cell->get_fe().dofs_per_cell);
+              cell->get_fe().n_dofs_per_cell());
             cell->update_cell_dof_indices_cache();
             cell->get_dof_indices(dof_indices);
 
@@ -3941,7 +3944,7 @@ namespace internal
           for (const auto &cell : dof_handler->active_cell_iterators())
             if (!cell->is_artificial())
               {
-                local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+                local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_indices(local_dof_indices);
                 if (local_dof_indices.end() !=
                     std::find(local_dof_indices.begin(),
@@ -4041,9 +4044,11 @@ namespace internal
                       // delete all dofs that live there and that we
                       // have previously assigned a number to
                       // (i.e. the ones on the interface)
-                      local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+                      local_dof_indices.resize(
+                        cell->get_fe().n_dofs_per_cell());
                       cell->get_mg_dof_indices(local_dof_indices);
-                      for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+                      for (unsigned int i = 0;
+                           i < cell->get_fe().n_dofs_per_cell();
                            ++i)
                         if (local_dof_indices[i] != numbers::invalid_dof_index)
                           renumbering[local_dof_indices[i]] =
@@ -4176,7 +4181,7 @@ namespace internal
             if (cell->level_subdomain_id() !=
                 dealii::numbers::artificial_subdomain_id)
               {
-                local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+                local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
                 cell->get_mg_dof_indices(local_dof_indices);
                 if (local_dof_indices.end() !=
                     std::find(local_dof_indices.begin(),
@@ -4369,10 +4374,11 @@ namespace internal
               for (auto cell : dof_handler->active_cell_iterators())
                 if (cell->is_ghost())
                   {
-                    local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+                    local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
                     cell->get_dof_indices(local_dof_indices);
 
-                    for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+                    for (unsigned int i = 0;
+                         i < cell->get_fe().n_dofs_per_cell();
                          ++i)
                       // delete a DoF index if it has not already been deleted
                       // (e.g., by visiting a neighboring cell, if it is on the
index 80932f51f461356d51cff8af8917e66cfaaaa1cc..91dd5cc960943c989e52f42a9fbb20cc41119ef4 100644 (file)
@@ -293,7 +293,7 @@ namespace DoFRenumbering
 
       for (const auto &cell : dof_handler.active_cell_iterators())
         {
-          const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
 
           dofs_on_this_cell.resize(dofs_per_cell);
 
@@ -756,8 +756,8 @@ namespace DoFRenumbering
     std::vector<std::vector<unsigned int>> component_list(fe_collection.size());
     for (unsigned int f = 0; f < fe_collection.size(); ++f)
       {
-        const FiniteElement<dim, spacedim> &fe            = fe_collection[f];
-        const unsigned int                  dofs_per_cell = fe.dofs_per_cell;
+        const FiniteElement<dim, spacedim> &fe = fe_collection[f];
+        const unsigned int dofs_per_cell       = fe.n_dofs_per_cell();
         component_list[f].resize(dofs_per_cell);
         for (unsigned int i = 0; i < dofs_per_cell; ++i)
           if (fe.is_primitive(i))
@@ -815,7 +815,7 @@ namespace DoFRenumbering
         // list using their component
         const unsigned int fe_index = cell->active_fe_index();
         const unsigned int dofs_per_cell =
-          fe_collection[fe_index].dofs_per_cell;
+          fe_collection[fe_index].n_dofs_per_cell();
         local_dof_indices.resize(dofs_per_cell);
         cell->get_active_or_mg_dof_indices(local_dof_indices);
 
@@ -1047,8 +1047,8 @@ namespace DoFRenumbering
     for (unsigned int f = 0; f < fe_collection.size(); ++f)
       {
         const FiniteElement<dim, spacedim> &fe = fe_collection[f];
-        block_list[f].resize(fe.dofs_per_cell);
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        block_list[f].resize(fe.n_dofs_per_cell());
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           block_list[f][i] = fe.system_to_block_index(i).first;
       }
 
@@ -1092,7 +1092,7 @@ namespace DoFRenumbering
         // list using their component
         const unsigned int fe_index = cell->active_fe_index();
         const unsigned int dofs_per_cell =
-          fe_collection[fe_index].dofs_per_cell;
+          fe_collection[fe_index].n_dofs_per_cell();
         local_dof_indices.resize(dofs_per_cell);
         cell->get_active_or_mg_dof_indices(local_dof_indices);
 
@@ -1255,7 +1255,8 @@ namespace DoFRenumbering
           if (cell->is_locally_owned())
             {
               // first get the existing DoF indices
-              const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+              const unsigned int dofs_per_cell =
+                cell->get_fe().n_dofs_per_cell();
               std::vector<types::global_dof_index> local_dof_indices(
                 dofs_per_cell);
               cell->get_dof_indices(local_dof_indices);
@@ -1760,7 +1761,7 @@ namespace DoFRenumbering
 
         for (const auto &cell : dof.active_cell_iterators())
           {
-            const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+            const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
             local_dof_indices.resize(dofs_per_cell);
             hp_fe_values.reinit(cell);
             const FEValues<dim> &fe_values =
@@ -1854,7 +1855,7 @@ namespace DoFRenumbering
 
         std::vector<bool> already_touched(dof.n_dofs(), false);
 
-        const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
         std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
         typename DoFHandler<dim, spacedim>::level_cell_iterator begin =
           dof.begin(level);
index 632236dcd18741a88f788286f8d2dbf8768292e5..0df1d77db1d718ecfae4b15ed1d4f7e4b248600c 100644 (file)
@@ -128,13 +128,13 @@ namespace DoFTools
                                     const ComponentMask &component_mask)
     {
       std::vector<unsigned char> local_component_association(
-        fe.dofs_per_cell, static_cast<unsigned char>(-1));
+        fe.n_dofs_per_cell(), static_cast<unsigned char>(-1));
 
       // compute the component each local dof belongs to.
       // if the shape function is primitive, then this
       // is simple and we can just associate it with
       // what system_to_component_index gives us
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
         if (fe.is_primitive(i))
           local_component_association[i] =
             fe.system_to_component_index(i).first;
@@ -228,7 +228,7 @@ namespace DoFTools
         if (c->is_locally_owned())
           {
             const unsigned int fe_index      = c->active_fe_index();
-            const unsigned int dofs_per_cell = c->get_fe().dofs_per_cell;
+            const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
             indices.resize(dofs_per_cell);
             c->get_dof_indices(indices);
             for (unsigned int i = 0; i < dofs_per_cell; ++i)
@@ -270,9 +270,9 @@ namespace DoFTools
       for (unsigned int f = 0; f < fe_collection.size(); ++f)
         {
           const FiniteElement<dim, spacedim> &fe = fe_collection[f];
-          local_block_association[f].resize(fe.dofs_per_cell,
+          local_block_association[f].resize(fe.n_dofs_per_cell(),
                                             static_cast<unsigned char>(-1));
-          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+          for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
             local_block_association[f][i] = fe.system_to_block_index(i).first;
 
           Assert(std::find(local_block_association[f].begin(),
@@ -288,7 +288,7 @@ namespace DoFTools
         if (cell->is_locally_owned())
           {
             const unsigned int fe_index      = cell->active_fe_index();
-            const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+            const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
             indices.resize(dofs_per_cell);
             cell->get_dof_indices(indices);
             for (unsigned int i = 0; i < dofs_per_cell; ++i)
@@ -355,7 +355,7 @@ namespace DoFTools
 
     for (unsigned int present_cell = 0; cell != endc; ++cell, ++present_cell)
       {
-        const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
         dof_indices.resize(dofs_per_cell);
         cell->get_dof_indices(dof_indices);
 
@@ -471,8 +471,9 @@ namespace DoFTools
                                                     component_mask);
 
         // Check which dofs were selected
-        std::vector<bool> this_selected_dofs(fe_collection[f].dofs_per_cell);
-        for (unsigned int i = 0; i < fe_collection[f].dofs_per_cell; ++i)
+        std::vector<bool> this_selected_dofs(
+          fe_collection[f].n_dofs_per_cell());
+        for (unsigned int i = 0; i < fe_collection[f].n_dofs_per_cell(); ++i)
           this_selected_dofs[i] =
             component_mask[local_component_association[i]];
 
@@ -486,7 +487,7 @@ namespace DoFTools
       if (c->is_locally_owned())
         {
           const unsigned int fe_index      = c->active_fe_index();
-          const unsigned int dofs_per_cell = c->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
           local_dof_indices.resize(dofs_per_cell);
           c->get_dof_indices(local_dof_indices);
           for (unsigned int i = 0; i < dofs_per_cell; ++i)
@@ -599,17 +600,17 @@ namespace DoFTools
     // whether it is something interesting or not
     std::vector<unsigned char> local_component_asssociation =
       internal::get_local_component_association(fe, component_mask);
-    std::vector<bool> local_selected_dofs(fe.dofs_per_cell);
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    std::vector<bool> local_selected_dofs(fe.n_dofs_per_cell());
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       local_selected_dofs[i] = component_mask[local_component_asssociation[i]];
 
     // then loop over all cells and do work
-    std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
+    std::vector<types::global_dof_index> indices(fe.n_dofs_per_cell());
     typename DoFHandler<dim, spacedim>::level_cell_iterator c;
     for (c = dof.begin(level); c != dof.end(level); ++c)
       {
         c->get_mg_dof_indices(indices);
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           selected_dofs[indices[i]] = local_selected_dofs[i];
       }
   }
@@ -730,15 +731,15 @@ namespace DoFTools
                         (dim == 1 ?
                            i :
                            (dim == 2 ?
-                              (i < 2 * fe.dofs_per_vertex ?
+                              (i < 2 * fe.n_dofs_per_vertex() ?
                                  i :
-                                 i + 2 * fe.dofs_per_vertex) :
-                              (dim == 3 ? (i < 4 * fe.dofs_per_vertex ?
+                                 i + 2 * fe.n_dofs_per_vertex()) :
+                              (dim == 3 ? (i < 4 * fe.n_dofs_per_vertex() ?
                                              i :
-                                             (i < 4 * fe.dofs_per_vertex +
+                                             (i < 4 * fe.n_dofs_per_vertex() +
                                                     4 * fe.dofs_per_line ?
-                                                i + 4 * fe.dofs_per_vertex :
-                                                i + 4 * fe.dofs_per_vertex +
+                                                i + 4 * fe.n_dofs_per_vertex() :
+                                                i + 4 * fe.n_dofs_per_vertex() +
                                                   8 * fe.dofs_per_line)) :
                                           numbers::invalid_unsigned_int)));
                       if (fe.is_primitive(cell_index))
@@ -811,11 +812,11 @@ namespace DoFTools
             {
               const FiniteElement<dim, spacedim> &fe = cell->get_fe();
 
-              const unsigned int dofs_per_cell = fe.dofs_per_cell;
+              const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
               cell_dof_indices.resize(dofs_per_cell);
               cell->get_dof_indices(cell_dof_indices);
 
-              for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+              for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
                 if (fe.has_support_on_face(i, face))
                   {
                     if (!check_vector_component)
@@ -876,7 +877,7 @@ namespace DoFTools
     for (; cell != endc; ++cell)
       if (!cell->is_artificial() && predicate(cell))
         {
-          local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+          local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
           cell->get_dof_indices(local_dof_indices);
           predicate_dofs.insert(local_dof_indices.begin(),
                                 local_dof_indices.end());
@@ -903,7 +904,7 @@ namespace DoFTools
             continue;
           }
 
-        const unsigned int dofs_per_cell = (*it)->get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = (*it)->get_fe().n_dofs_per_cell();
         local_dof_indices.resize(dofs_per_cell);
         (*it)->get_dof_indices(local_dof_indices);
         dofs_with_support_on_halo_cells.insert(local_dof_indices.begin(),
@@ -991,7 +992,8 @@ namespace DoFTools
                                                       spacedim>::line_iterator
                       line = cell->face(face);
 
-                    for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                    for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+                         ++dof)
                       selected_dofs.add_index(
                         line->child(0)->vertex_dof_index(1, dof));
 
@@ -1047,7 +1049,7 @@ namespace DoFTools
                     // and subtract (in the end) all the indices which a shared
                     // between this face and its subfaces
                     for (unsigned int vertex = 0; vertex < 4; ++vertex)
-                      for (unsigned int dof = 0; dof != fe.dofs_per_vertex;
+                      for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
                            ++dof)
                         unconstrained_dofs.add_index(
                           face->vertex_dof_index(vertex, dof));
@@ -1111,7 +1113,7 @@ namespace DoFTools
     for (; cell != endc; ++cell)
       if (cell->subdomain_id() == subdomain_id)
         {
-          const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
           local_dof_indices.resize(dofs_per_cell);
           cell->get_dof_indices(local_dof_indices);
           for (unsigned int i = 0; i < dofs_per_cell; ++i)
@@ -1141,7 +1143,7 @@ namespace DoFTools
     for (; cell != endc; ++cell)
       if (cell->is_locally_owned())
         {
-          dof_indices.resize(cell->get_fe().dofs_per_cell);
+          dof_indices.resize(cell->get_fe().n_dofs_per_cell());
           cell->get_dof_indices(dof_indices);
 
           for (const types::global_dof_index dof_index : dof_indices)
@@ -1181,7 +1183,7 @@ namespace DoFTools
     for (; cell != endc; ++cell)
       if (cell->is_ghost())
         {
-          dof_indices.resize(cell->get_fe().dofs_per_cell);
+          dof_indices.resize(cell->get_fe().n_dofs_per_cell());
           cell->get_dof_indices(dof_indices);
           for (const auto dof_index : dof_indices)
             if (!dof_set.is_element(dof_index))
@@ -1232,7 +1234,7 @@ namespace DoFTools
             id == numbers::artificial_subdomain_id)
           continue;
 
-        dof_indices.resize(cell->get_fe().dofs_per_cell);
+        dof_indices.resize(cell->get_fe().n_dofs_per_cell());
         cell->get_mg_dof_indices(dof_indices);
         for (const auto dof_index : dof_indices)
           if (!dof_set.is_element(dof_index))
@@ -1323,7 +1325,7 @@ namespace DoFTools
     for (const auto &cell : dof_handler.active_cell_iterators())
       if (cell->is_locally_owned())
         {
-          dof_indices.resize(cell->get_fe().dofs_per_cell);
+          dof_indices.resize(cell->get_fe().n_dofs_per_cell());
           cell->get_dof_indices(dof_indices);
 
           for (unsigned int i = 0; i < dof_indices.size(); ++i)
@@ -1513,7 +1515,7 @@ namespace DoFTools
               ExcMessage(
                 "The subdomain ID of the halo cell should not match that of the vector entry."));
 
-            local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+            local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
             cell->get_dof_indices(local_dof_indices);
 
             for (const types::global_dof_index local_dof_index :
@@ -1600,7 +1602,7 @@ namespace DoFTools
       {
         const types::subdomain_id subdomain_id =
           cell_owners[cell->active_cell_index()];
-        const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+        const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
         local_dof_indices.resize(dofs_per_cell);
         cell->get_dof_indices(local_dof_indices);
 
@@ -1681,7 +1683,7 @@ namespace DoFTools
       if ((cell->is_artificial() == false) &&
           (cell->subdomain_id() == subdomain))
         {
-          const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
           local_dof_indices.resize(dofs_per_cell);
           cell->get_dof_indices(local_dof_indices);
           subdomain_indices.insert(subdomain_indices.end(),
@@ -2223,12 +2225,13 @@ namespace DoFTools
               const FEValues<dim, spacedim> &fe_values =
                 hp_fe_values.get_present_fe_values();
 
-              local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+              local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
               cell->get_dof_indices(local_dof_indices);
 
               const std::vector<Point<spacedim>> &points =
                 fe_values.get_quadrature_points();
-              for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell; ++i)
+              for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell();
+                   ++i)
                 {
                   const unsigned int dof_comp =
                     cell->get_fe().system_to_component_index(i).first;
@@ -2478,12 +2481,12 @@ namespace DoFTools
         ++i;
     block_list.reinit(i,
                       dof_handler.n_dofs(),
-                      dof_handler.get_fe().dofs_per_cell);
+                      dof_handler.get_fe().n_dofs_per_cell());
     i = 0;
     for (cell = dof_handler.begin(level); cell != endc; ++cell)
       if (cell->is_locally_owned_on_level())
         {
-          indices.resize(cell->get_fe().dofs_per_cell);
+          indices.resize(cell->get_fe().n_dofs_per_cell());
           cell->get_mg_dof_indices(indices);
 
           if (selected_dofs.size() != 0)
@@ -2522,13 +2525,13 @@ namespace DoFTools
 
     for (cell = dof_handler.begin(level); cell != endc; ++cell)
       {
-        indices.resize(cell->get_fe().dofs_per_cell);
+        indices.resize(cell->get_fe().n_dofs_per_cell());
         cell->get_mg_dof_indices(indices);
 
         if (interior_only)
           {
             // Exclude degrees of freedom on faces opposite to the vertex
-            exclude.resize(fe.dofs_per_cell);
+            exclude.resize(fe.n_dofs_per_cell());
             std::fill(exclude.begin(), exclude.end(), false);
             const unsigned int dpf = fe.dofs_per_face;
 
@@ -2581,7 +2584,7 @@ namespace DoFTools
 
             // For hp, only this line here would have to be replaced.
             const FiniteElement<dim> &fe     = dof_handler.get_fe();
-            const unsigned int        n_dofs = fe.dofs_per_cell;
+            const unsigned int        n_dofs = fe.n_dofs_per_cell();
             indices.resize(n_dofs);
             exclude.resize(n_dofs);
             std::fill(exclude.begin(), exclude.end(), false);
@@ -2680,7 +2683,7 @@ namespace DoFTools
       for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
         {
           const unsigned int vg = cell->vertex_index(v);
-          vertex_dof_count[vg] += cell->get_fe().dofs_per_cell;
+          vertex_dof_count[vg] += cell->get_fe().n_dofs_per_cell();
           ++vertex_cell_count[vg];
           for (unsigned int d = 0; d < dim; ++d)
             {
@@ -2728,7 +2731,7 @@ namespace DoFTools
     for (cell = dof_handler.begin(level); cell != endc; ++cell)
       {
         const FiniteElement<dim> &fe = cell->get_fe();
-        indices.resize(fe.dofs_per_cell);
+        indices.resize(fe.n_dofs_per_cell());
         cell->get_mg_dof_indices(indices);
 
         for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
@@ -2745,7 +2748,7 @@ namespace DoFTools
               {
                 // Exclude degrees of freedom on faces opposite to the
                 // vertex
-                exclude.resize(fe.dofs_per_cell);
+                exclude.resize(fe.n_dofs_per_cell());
                 std::fill(exclude.begin(), exclude.end(), false);
                 const unsigned int dpf = fe.dofs_per_face;
 
@@ -2813,7 +2816,7 @@ namespace DoFTools
         Assert(cell->is_artificial() == false,
                ExcMessage("This function can not be called with cells that are "
                           "not either locally owned or ghost cells."));
-        local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+        local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
         cell->get_dof_indices(local_dof_indices);
         dofs_on_patch.insert(local_dof_indices.begin(),
                              local_dof_indices.end());
@@ -2844,7 +2847,7 @@ namespace DoFTools
         Assert(cell->is_artificial() == false,
                ExcMessage("This function can not be called with cells that are "
                           "not either locally owned or ghost cells."));
-        local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+        local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
         cell->get_dof_indices(local_dof_indices);
         dofs_on_patch.insert(local_dof_indices.begin(),
                              local_dof_indices.end());
index 26a4fc88dbbad8ed69e40919864b216c8ba75777..f701ba8e6a0b4a24474a472d0661da3a5c920f32 100644 (file)
@@ -178,7 +178,8 @@ namespace DoFTools
         Assert(fe1.dofs_per_face >= fe2.dofs_per_face, ExcInternalError());
         AssertDimension(primary_dof_mask.size(), fe1.dofs_per_face);
 
-        Assert(fe2.dofs_per_vertex <= fe1.dofs_per_vertex, ExcInternalError());
+        Assert(fe2.n_dofs_per_vertex() <= fe1.n_dofs_per_vertex(),
+               ExcInternalError());
         Assert(fe2.dofs_per_line <= fe1.dofs_per_line, ExcInternalError());
         Assert((dim < 3) || (fe2.dofs_per_quad <= fe1.dofs_per_quad),
                ExcInternalError());
@@ -211,11 +212,11 @@ namespace DoFTools
           {
             unsigned int dofs_added = 0;
             unsigned int i          = 0;
-            while (dofs_added < fe2.dofs_per_vertex)
+            while (dofs_added < fe2.n_dofs_per_vertex())
               {
                 // make sure that we were able to find a set of primary dofs and
                 // that the code down below didn't just reject all our efforts
-                Assert(i < fe1.dofs_per_vertex, ExcInternalError());
+                Assert(i < fe1.n_dofs_per_vertex(), ExcInternalError());
 
                 // tentatively push this vertex dof
                 primary_dof_list.push_back(index + i);
@@ -232,7 +233,7 @@ namespace DoFTools
                 // forward counter by one
                 ++i;
               }
-            index += fe1.dofs_per_vertex;
+            index += fe1.n_dofs_per_vertex();
           }
 
         for (int l = 0;
@@ -646,9 +647,10 @@ namespace DoFTools
                 const unsigned int fe_index = cell->active_fe_index();
 
                 const unsigned int n_dofs_on_mother =
-                                     2 * fe.dofs_per_vertex + fe.dofs_per_line,
-                                   n_dofs_on_children =
-                                     fe.dofs_per_vertex + 2 * fe.dofs_per_line;
+                                     2 * fe.n_dofs_per_vertex() +
+                                     fe.dofs_per_line,
+                                   n_dofs_on_children = fe.n_dofs_per_vertex() +
+                                                        2 * fe.dofs_per_line;
 
                 dofs_on_mother.resize(n_dofs_on_mother);
                 // we might not use all of those in case of artificial cells, so
@@ -670,7 +672,8 @@ namespace DoFTools
                 // @p{FiniteElement::constraints()}
                 unsigned int next_index = 0;
                 for (unsigned int vertex = 0; vertex < 2; ++vertex)
-                  for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                  for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+                       ++dof)
                     dofs_on_mother[next_index++] =
                       this_face->vertex_dof_index(vertex, dof, fe_index);
                 for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
@@ -678,7 +681,7 @@ namespace DoFTools
                     this_face->dof_index(dof, fe_index);
                 AssertDimension(next_index, dofs_on_mother.size());
 
-                for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex(); ++dof)
                   dofs_on_children.push_back(
                     this_face->child(0)->vertex_dof_index(1, dof, fe_index));
                 for (unsigned int child = 0; child < 2; ++child)
@@ -829,7 +832,7 @@ namespace DoFTools
 
                 const unsigned int n_dofs_on_mother = fe.dofs_per_face;
                 const unsigned int n_dofs_on_children =
-                  (5 * fe.dofs_per_vertex + 12 * fe.dofs_per_line +
+                  (5 * fe.n_dofs_per_vertex() + 12 * fe.dofs_per_line +
                    4 * fe.dofs_per_quad);
 
                 // TODO[TL]: think about this and the following in case of
@@ -855,7 +858,8 @@ namespace DoFTools
                 // @p{FiniteElement::constraints()}
                 unsigned int next_index = 0;
                 for (unsigned int vertex = 0; vertex < 4; ++vertex)
-                  for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                  for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+                       ++dof)
                     dofs_on_mother[next_index++] =
                       this_face->vertex_dof_index(vertex, dof, fe_index);
                 for (unsigned int line = 0; line < 4; ++line)
@@ -881,13 +885,14 @@ namespace DoFTools
                            this_face->child(3)->vertex_index(0))),
                        ExcInternalError());
 
-                for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex(); ++dof)
                   dofs_on_children.push_back(
                     this_face->child(0)->vertex_dof_index(3, dof));
 
                 // dof numbers on the centers of the lines bounding this face
                 for (unsigned int line = 0; line < 4; ++line)
-                  for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+                  for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+                       ++dof)
                     dofs_on_children.push_back(
                       this_face->line(line)->child(0)->vertex_dof_index(
                         1, dof, fe_index));
@@ -2617,7 +2622,7 @@ namespace DoFTools
         // vector to hold the representation of a single degree of freedom on
         // the coarse grid (for the selected fe) on the fine grid
 
-        copy_data.dofs_per_cell = coarse_fe.dofs_per_cell;
+        copy_data.dofs_per_cell = coarse_fe.n_dofs_per_cell();
         copy_data.parameter_dof_indices.resize(copy_data.dofs_per_cell);
 
         // get the global indices of the parameter dofs on this parameter grid
@@ -2744,7 +2749,7 @@ namespace DoFTools
 
         unsigned int n_interesting_dofs = 0;
         for (unsigned int local_dof = 0;
-             local_dof < coarse_grid.get_fe().dofs_per_cell;
+             local_dof < coarse_grid.get_fe().n_dofs_per_cell();
              ++local_dof)
           if (coarse_grid.get_fe().system_to_component_index(local_dof).first ==
               coarse_component)
@@ -2866,7 +2871,7 @@ namespace DoFTools
                                       n_fine_dofs   = fine_grid.n_dofs();
 
         // local numbers of dofs
-        const unsigned int fine_dofs_per_cell = fine_fe.dofs_per_cell;
+        const unsigned int fine_dofs_per_cell = fine_fe.n_dofs_per_cell();
 
         // alias the number of dofs per cell belonging to the coarse_component
         // which is to be the restriction of the fine grid:
@@ -2874,7 +2879,7 @@ namespace DoFTools
           coarse_fe
             .base_element(
               coarse_fe.component_to_base_index(coarse_component).first)
-            .dofs_per_cell;
+            .n_dofs_per_cell();
 
 
         // Try to find out whether the grids stem from the same coarse grid.
@@ -2939,7 +2944,7 @@ namespace DoFTools
         for (unsigned int local_coarse_dof = 0;
              local_coarse_dof < coarse_dofs_per_cell_component;
              ++local_coarse_dof)
-          for (unsigned int fine_dof = 0; fine_dof < fine_fe.dofs_per_cell;
+          for (unsigned int fine_dof = 0; fine_dof < fine_fe.n_dofs_per_cell();
                ++fine_dof)
             if (fine_fe.system_to_component_index(fine_dof) ==
                 std::make_pair(fine_component, local_coarse_dof))
@@ -2957,13 +2962,13 @@ namespace DoFTools
           // this is an interesting dof. finally count how many true's there
           std::vector<bool> dof_is_interesting(fine_grid.n_dofs(), false);
           std::vector<types::global_dof_index> local_dof_indices(
-            fine_fe.dofs_per_cell);
+            fine_fe.n_dofs_per_cell());
 
           for (const auto &cell : fine_grid.active_cell_iterators())
             if (cell->is_locally_owned())
               {
                 cell->get_dof_indices(local_dof_indices);
-                for (unsigned int i = 0; i < fine_fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fine_fe.n_dofs_per_cell(); ++i)
                   if (fine_fe.system_to_component_index(i).first ==
                       fine_component)
                     dof_is_interesting[local_dof_indices[i]] = true;
@@ -2984,13 +2989,13 @@ namespace DoFTools
 
         {
           std::vector<types::global_dof_index> local_dof_indices(
-            fine_fe.dofs_per_cell);
+            fine_fe.n_dofs_per_cell());
           unsigned int next_free_index = 0;
           for (const auto &cell : fine_grid.active_cell_iterators())
             if (cell->is_locally_owned())
               {
                 cell->get_dof_indices(local_dof_indices);
-                for (unsigned int i = 0; i < fine_fe.dofs_per_cell; ++i)
+                for (unsigned int i = 0; i < fine_fe.n_dofs_per_cell(); ++i)
                   // if this DoF is a parameter dof and has not yet been
                   // numbered, then do so
                   if ((fine_fe.system_to_component_index(i).first ==
@@ -3376,7 +3381,7 @@ namespace DoFTools
           const FiniteElement<dim, spacedim> &fe = cell->get_fe();
 
           // get global indices of dofs on the cell
-          cell_dofs.resize(fe.dofs_per_cell);
+          cell_dofs.resize(fe.n_dofs_per_cell());
           cell->get_dof_indices(cell_dofs);
 
           for (const auto face_no : cell->face_indices())
index a7b3bdcbbc1753263c202aafd0a45dc082462b53..5c3ab5441216ce9e3657d390bf4a58c2c9edb4aa 100644 (file)
@@ -102,7 +102,7 @@ namespace DoFTools
            (subdomain_id == cell->subdomain_id())) &&
           cell->is_locally_owned())
         {
-          const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
           dofs_on_this_cell.resize(dofs_per_cell);
           cell->get_dof_indices(dofs_on_this_cell);
 
@@ -168,11 +168,11 @@ namespace DoFTools
     for (unsigned int f = 0; f < fe_collection.size(); ++f)
       {
         bool_dof_mask[f].reinit(
-          TableIndices<2>(fe_collection[f].dofs_per_cell,
-                          fe_collection[f].dofs_per_cell));
+          TableIndices<2>(fe_collection[f].n_dofs_per_cell(),
+                          fe_collection[f].n_dofs_per_cell()));
         bool_dof_mask[f].fill(false);
-        for (unsigned int i = 0; i < fe_collection[f].dofs_per_cell; ++i)
-          for (unsigned int j = 0; j < fe_collection[f].dofs_per_cell; ++j)
+        for (unsigned int i = 0; i < fe_collection[f].n_dofs_per_cell(); ++i)
+          for (unsigned int j = 0; j < fe_collection[f].n_dofs_per_cell(); ++j)
             if (dof_mask[f](i, j) != none)
               bool_dof_mask[f](i, j) = true;
       }
@@ -193,7 +193,7 @@ namespace DoFTools
         {
           const unsigned int fe_index = cell->active_fe_index();
           const unsigned int dofs_per_cell =
-            fe_collection[fe_index].dofs_per_cell;
+            fe_collection[fe_index].n_dofs_per_cell();
 
           dofs_on_this_cell.resize(dofs_per_cell);
           cell->get_dof_indices(dofs_on_this_cell);
@@ -282,9 +282,9 @@ namespace DoFTools
         if (cell_row->is_active() && cell_col->is_active())
           {
             const unsigned int dofs_per_cell_row =
-              cell_row->get_fe().dofs_per_cell;
+              cell_row->get_fe().n_dofs_per_cell();
             const unsigned int dofs_per_cell_col =
-              cell_col->get_fe().dofs_per_cell;
+              cell_col->get_fe().n_dofs_per_cell();
             std::vector<types::global_dof_index> local_dof_indices_row(
               dofs_per_cell_row);
             std::vector<types::global_dof_index> local_dof_indices_col(
@@ -308,9 +308,9 @@ namespace DoFTools
                 const typename DoFHandler<dim, spacedim>::cell_iterator
                                    cell_row_child = child_cells[i];
                 const unsigned int dofs_per_cell_row =
-                  cell_row_child->get_fe().dofs_per_cell;
+                  cell_row_child->get_fe().n_dofs_per_cell();
                 const unsigned int dofs_per_cell_col =
-                  cell_col->get_fe().dofs_per_cell;
+                  cell_col->get_fe().n_dofs_per_cell();
                 std::vector<types::global_dof_index> local_dof_indices_row(
                   dofs_per_cell_row);
                 std::vector<types::global_dof_index> local_dof_indices_col(
@@ -335,9 +335,9 @@ namespace DoFTools
                 const typename DoFHandler<dim, spacedim>::active_cell_iterator
                                    cell_col_child = child_cells[i];
                 const unsigned int dofs_per_cell_row =
-                  cell_row->get_fe().dofs_per_cell;
+                  cell_row->get_fe().n_dofs_per_cell();
                 const unsigned int dofs_per_cell_col =
-                  cell_col_child->get_fe().dofs_per_cell;
+                  cell_col_child->get_fe().n_dofs_per_cell();
                 std::vector<types::global_dof_index> local_dof_indices_row(
                   dofs_per_cell_row);
                 std::vector<types::global_dof_index> local_dof_indices_col(
@@ -452,7 +452,8 @@ namespace DoFTools
             while (!cell->is_active())
               cell = cell->child(direction);
 
-            const unsigned int dofs_per_vertex = cell->get_fe().dofs_per_vertex;
+            const unsigned int dofs_per_vertex =
+              cell->get_fe().n_dofs_per_vertex();
             std::vector<types::global_dof_index> boundary_dof_boundary_indices(
               dofs_per_vertex);
 
@@ -572,7 +573,8 @@ namespace DoFTools
            (subdomain_id == cell->subdomain_id())) &&
           cell->is_locally_owned())
         {
-          const unsigned int n_dofs_on_this_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int n_dofs_on_this_cell =
+            cell->get_fe().n_dofs_per_cell();
           dofs_on_this_cell.resize(n_dofs_on_this_cell);
           cell->get_dof_indices(dofs_on_this_cell);
 
@@ -615,7 +617,7 @@ namespace DoFTools
                                 cell->neighbor_child_on_subface(face, sub_nr);
 
                           const unsigned int n_dofs_on_neighbor =
-                            sub_neighbor->get_fe().dofs_per_cell;
+                            sub_neighbor->get_fe().n_dofs_per_cell();
                           dofs_on_other_cell.resize(n_dofs_on_neighbor);
                           sub_neighbor->get_dof_indices(dofs_on_other_cell);
 
@@ -652,7 +654,7 @@ namespace DoFTools
                           continue;
 
                       const unsigned int n_dofs_on_neighbor =
-                        neighbor->get_fe().dofs_per_cell;
+                        neighbor->get_fe().n_dofs_per_cell();
                       dofs_on_other_cell.resize(n_dofs_on_neighbor);
 
                       neighbor->get_dof_indices(dofs_on_other_cell);
@@ -712,7 +714,7 @@ namespace DoFTools
            ExcDimensionMismatch(component_couplings.n_cols(),
                                 fe.n_components()));
 
-    const unsigned int n_dofs = fe.dofs_per_cell;
+    const unsigned int n_dofs = fe.n_dofs_per_cell();
 
     Table<2, Coupling> dof_couplings(n_dofs, n_dofs);
 
@@ -784,9 +786,9 @@ namespace DoFTools
             const FiniteElement<dim, spacedim> &fe = dof.get_fe();
 
             std::vector<types::global_dof_index> dofs_on_this_cell(
-              fe.dofs_per_cell);
+              fe.n_dofs_per_cell());
             std::vector<types::global_dof_index> dofs_on_other_cell(
-              fe.dofs_per_cell);
+              fe.n_dofs_per_cell());
 
             const Table<2, Coupling>
               int_dof_mask =
@@ -794,19 +796,19 @@ namespace DoFTools
               flux_dof_mask =
                 dof_couplings_from_component_couplings(fe, flux_mask);
 
-            Table<2, bool> support_on_face(fe.dofs_per_cell,
+            Table<2, bool> support_on_face(fe.n_dofs_per_cell(),
                                            GeometryInfo<dim>::faces_per_cell);
-            for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+            for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
               for (const unsigned int f : GeometryInfo<dim>::face_indices())
                 support_on_face(i, f) = fe.has_support_on_face(i, f);
 
             // Convert the int_dof_mask to bool_int_dof_mask so we can pass it
             // to constraints.add_entries_local_to_global()
-            Table<2, bool> bool_int_dof_mask(fe.dofs_per_cell,
-                                             fe.dofs_per_cell);
+            Table<2, bool> bool_int_dof_mask(fe.n_dofs_per_cell(),
+                                             fe.n_dofs_per_cell());
             bool_int_dof_mask.fill(false);
-            for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
-              for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+            for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+              for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
                 if (int_dof_mask(i, j) != none)
                   bool_int_dof_mask(i, j) = true;
 
@@ -836,11 +838,12 @@ namespace DoFTools
 
                       if (cell->at_boundary(face_n) && (!periodic_neighbor))
                         {
-                          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+                          for (unsigned int i = 0; i < fe.n_dofs_per_cell();
+                               ++i)
                             {
                               const bool i_non_zero_i =
                                 support_on_face(i, face_n);
-                              for (unsigned int j = 0; j < fe.dofs_per_cell;
+                              for (unsigned int j = 0; j < fe.n_dofs_per_cell();
                                    ++j)
                                 {
                                   const bool j_non_zero_i =
@@ -925,7 +928,8 @@ namespace DoFTools
 
                                   sub_neighbor->get_dof_indices(
                                     dofs_on_other_cell);
-                                  for (unsigned int i = 0; i < fe.dofs_per_cell;
+                                  for (unsigned int i = 0;
+                                       i < fe.n_dofs_per_cell();
                                        ++i)
                                     {
                                       const bool i_non_zero_i =
@@ -933,7 +937,7 @@ namespace DoFTools
                                       const bool i_non_zero_e =
                                         support_on_face(i, neighbor_face_n);
                                       for (unsigned int j = 0;
-                                           j < fe.dofs_per_cell;
+                                           j < fe.n_dofs_per_cell();
                                            ++j)
                                         {
                                           const bool j_non_zero_i =
@@ -1019,14 +1023,15 @@ namespace DoFTools
                           else
                             {
                               neighbor->get_dof_indices(dofs_on_other_cell);
-                              for (unsigned int i = 0; i < fe.dofs_per_cell;
+                              for (unsigned int i = 0; i < fe.n_dofs_per_cell();
                                    ++i)
                                 {
                                   const bool i_non_zero_i =
                                     support_on_face(i, face_n);
                                   const bool i_non_zero_e =
                                     support_on_face(i, neighbor_face_n);
-                                  for (unsigned int j = 0; j < fe.dofs_per_cell;
+                                  for (unsigned int j = 0;
+                                       j < fe.n_dofs_per_cell();
                                        ++j)
                                     {
                                       const bool j_non_zero_i =
@@ -1134,10 +1139,11 @@ namespace DoFTools
             for (unsigned int f = 0; f < fe.size(); ++f)
               {
                 bool_int_and_flux_dof_mask[f].reinit(
-                  TableIndices<2>(fe[f].dofs_per_cell, fe[f].dofs_per_cell));
+                  TableIndices<2>(fe[f].n_dofs_per_cell(),
+                                  fe[f].n_dofs_per_cell()));
                 bool_int_and_flux_dof_mask[f].fill(false);
-                for (unsigned int i = 0; i < fe[f].dofs_per_cell; ++i)
-                  for (unsigned int j = 0; j < fe[f].dofs_per_cell; ++j)
+                for (unsigned int i = 0; i < fe[f].n_dofs_per_cell(); ++i)
+                  for (unsigned int j = 0; j < fe[f].n_dofs_per_cell(); ++j)
                     if (int_and_flux_dof_mask[f](i, j) != none)
                       bool_int_and_flux_dof_mask[f](i, j) = true;
               }
@@ -1151,7 +1157,7 @@ namespace DoFTools
                    (subdomain_id == cell->subdomain_id())) &&
                   cell->is_locally_owned())
                 {
-                  dofs_on_this_cell.resize(cell->get_fe().dofs_per_cell);
+                  dofs_on_this_cell.resize(cell->get_fe().n_dofs_per_cell());
                   cell->get_dof_indices(dofs_on_this_cell);
 
                   // make sparsity pattern for this cell also taking into
@@ -1239,11 +1245,11 @@ namespace DoFTools
                                                                         sub_nr);
 
                                   dofs_on_other_cell.resize(
-                                    sub_neighbor->get_fe().dofs_per_cell);
+                                    sub_neighbor->get_fe().n_dofs_per_cell());
                                   sub_neighbor->get_dof_indices(
                                     dofs_on_other_cell);
                                   for (unsigned int i = 0;
-                                       i < cell->get_fe().dofs_per_cell;
+                                       i < cell->get_fe().n_dofs_per_cell();
                                        ++i)
                                     {
                                       const unsigned int ii =
@@ -1259,8 +1265,8 @@ namespace DoFTools
                                              ExcInternalError());
 
                                       for (unsigned int j = 0;
-                                           j <
-                                           sub_neighbor->get_fe().dofs_per_cell;
+                                           j < sub_neighbor->get_fe()
+                                                 .n_dofs_per_cell();
                                            ++j)
                                         {
                                           const unsigned int jj =
@@ -1299,10 +1305,10 @@ namespace DoFTools
                           else
                             {
                               dofs_on_other_cell.resize(
-                                neighbor->get_fe().dofs_per_cell);
+                                neighbor->get_fe().n_dofs_per_cell());
                               neighbor->get_dof_indices(dofs_on_other_cell);
                               for (unsigned int i = 0;
-                                   i < cell->get_fe().dofs_per_cell;
+                                   i < cell->get_fe().n_dofs_per_cell();
                                    ++i)
                                 {
                                   const unsigned int ii =
@@ -1318,7 +1324,7 @@ namespace DoFTools
                                          ExcInternalError());
 
                                   for (unsigned int j = 0;
-                                       j < neighbor->get_fe().dofs_per_cell;
+                                       j < neighbor->get_fe().n_dofs_per_cell();
                                        ++j)
                                     {
                                       const unsigned int jj =
index a13d88cee02fcb1f7dc5b10bd135b5aa96f76e2e..87254982c9c9839eb8d56d0d26bfbf0d73e87d7c 100644 (file)
@@ -65,7 +65,7 @@ FiniteElement<dim, spacedim>::FiniteElement(
                                                      dim == 3 ? 8 : 0)
   , adjust_line_dof_index_for_line_orientation_table(
       dim == 3 ? this->dofs_per_line : 0)
-  , system_to_base_table(this->dofs_per_cell)
+  , system_to_base_table(this->n_dofs_per_cell())
   , face_system_to_base_table(this->dofs_per_face)
   , component_to_base_table(this->components,
                             std::make_pair(std::make_pair(0U, 0U), 0U))
@@ -74,11 +74,12 @@ FiniteElement<dim, spacedim>::FiniteElement(
   // Special handling of vectors of length one: in this case, we
   // assume that all entries were supposed to be equal
   restriction_is_additive_flags(
-    r_i_a_f.size() == 1 ? std::vector<bool>(fe_data.dofs_per_cell, r_i_a_f[0]) :
-                          r_i_a_f)
+    r_i_a_f.size() == 1 ?
+      std::vector<bool>(fe_data.n_dofs_per_cell(), r_i_a_f[0]) :
+      r_i_a_f)
   , nonzero_components(
       nonzero_c.size() == 1 ?
-        std::vector<ComponentMask>(fe_data.dofs_per_cell, nonzero_c[0]) :
+        std::vector<ComponentMask>(fe_data.n_dofs_per_cell(), nonzero_c[0]) :
         nonzero_c)
   , n_nonzero_components_table(compute_n_nonzero_components(nonzero_components))
   , cached_primitivity(std::find_if(n_nonzero_components_table.begin(),
@@ -87,10 +88,10 @@ FiniteElement<dim, spacedim>::FiniteElement(
                                       return n_components != 1U;
                                     }) == n_nonzero_components_table.end())
 {
-  Assert(restriction_is_additive_flags.size() == this->dofs_per_cell,
+  Assert(restriction_is_additive_flags.size() == this->n_dofs_per_cell(),
          ExcDimensionMismatch(restriction_is_additive_flags.size(),
-                              this->dofs_per_cell));
-  AssertDimension(nonzero_components.size(), this->dofs_per_cell);
+                              this->n_dofs_per_cell()));
+  AssertDimension(nonzero_components.size(), this->n_dofs_per_cell());
   for (unsigned int i = 0; i < nonzero_components.size(); ++i)
     {
       Assert(nonzero_components[i].size() == this->n_components(),
@@ -107,15 +108,15 @@ FiniteElement<dim, spacedim>::FiniteElement(
   // empty.
   if (this->is_primitive())
     {
-      system_to_component_table.resize(this->dofs_per_cell);
+      system_to_component_table.resize(this->n_dofs_per_cell());
       face_system_to_component_table.resize(this->dofs_per_face);
-      for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+      for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
         system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
       for (unsigned int j = 0; j < this->dofs_per_face; ++j)
         face_system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
     }
 
-  for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+  for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
     system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
   for (unsigned int j = 0; j < this->dofs_per_face; ++j)
     face_system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
@@ -285,16 +286,18 @@ FiniteElement<dim, spacedim>::reinit_restriction_and_prolongation_matrices(
 
       for (unsigned int i = 0; i < nc; ++i)
         {
-          if (this->restriction[ref_case - 1][i].m() != this->dofs_per_cell &&
+          if (this->restriction[ref_case - 1][i].m() !=
+                this->n_dofs_per_cell() &&
               (!isotropic_restriction_only ||
                ref_case == RefinementCase<dim>::isotropic_refinement))
-            this->restriction[ref_case - 1][i].reinit(this->dofs_per_cell,
-                                                      this->dofs_per_cell);
-          if (this->prolongation[ref_case - 1][i].m() != this->dofs_per_cell &&
+            this->restriction[ref_case - 1][i].reinit(this->n_dofs_per_cell(),
+                                                      this->n_dofs_per_cell());
+          if (this->prolongation[ref_case - 1][i].m() !=
+                this->n_dofs_per_cell() &&
               (!isotropic_prolongation_only ||
                ref_case == RefinementCase<dim>::isotropic_refinement))
-            this->prolongation[ref_case - 1][i].reinit(this->dofs_per_cell,
-                                                       this->dofs_per_cell);
+            this->prolongation[ref_case - 1][i].reinit(this->n_dofs_per_cell(),
+                                                       this->n_dofs_per_cell());
         }
     }
 }
@@ -316,7 +319,7 @@ FiniteElement<dim, spacedim>::get_restriction_matrix(
   // we use refinement_case-1 here. the -1 takes care of the origin of the
   // vector, as for RefinementCase<dim>::no_refinement (=0) there is no data
   // available and so the vector indices are shifted
-  Assert(restriction[refinement_case - 1][child].n() == this->dofs_per_cell,
+  Assert(restriction[refinement_case - 1][child].n() == this->n_dofs_per_cell(),
          ExcProjectionVoid());
   return restriction[refinement_case - 1][child];
 }
@@ -341,7 +344,8 @@ FiniteElement<dim, spacedim>::get_prolongation_matrix(
   // RefinementCase::no_refinement (=0) there is no
   // data available and so the vector indices
   // are shifted
-  Assert(prolongation[refinement_case - 1][child].n() == this->dofs_per_cell,
+  Assert(prolongation[refinement_case - 1][child].n() ==
+           this->n_dofs_per_cell(),
          ExcEmbeddingVoid());
   return prolongation[refinement_case - 1][child];
 }
@@ -572,15 +576,15 @@ FiniteElement<dim, spacedim>::face_to_cell_index(const unsigned int face_index,
     {
       // get the number of the vertex on the face that corresponds to this DoF,
       // along with the number of the DoF on this vertex
-      const unsigned int face_vertex = face_index / this->dofs_per_vertex;
+      const unsigned int face_vertex = face_index / this->n_dofs_per_vertex();
       const unsigned int dof_index_on_vertex =
-        face_index % this->dofs_per_vertex;
+        face_index % this->n_dofs_per_vertex();
 
       // then get the number of this vertex on the cell and translate
       // this to a DoF number on the cell
       return (GeometryInfo<dim>::face_to_cell_vertices(
                 face, face_vertex, face_orientation, face_flip, face_rotation) *
-                this->dofs_per_vertex +
+                this->n_dofs_per_vertex() +
               dof_index_on_vertex);
     }
   else if (face_index < this->first_face_quad_index)
@@ -686,10 +690,10 @@ FiniteElement<dim, spacedim>::prolongation_is_implemented() const
       {
         // make sure also the lazily initialized matrices are created
         get_prolongation_matrix(c, RefinementCase<dim>(ref_case));
-        Assert((prolongation[ref_case - 1][c].m() == this->dofs_per_cell) ||
+        Assert((prolongation[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
                  (prolongation[ref_case - 1][c].m() == 0),
                ExcInternalError());
-        Assert((prolongation[ref_case - 1][c].n() == this->dofs_per_cell) ||
+        Assert((prolongation[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
                  (prolongation[ref_case - 1][c].n() == 0),
                ExcInternalError());
         if ((prolongation[ref_case - 1][c].m() == 0) ||
@@ -714,10 +718,10 @@ FiniteElement<dim, spacedim>::restriction_is_implemented() const
       {
         // make sure also the lazily initialized matrices are created
         get_restriction_matrix(c, RefinementCase<dim>(ref_case));
-        Assert((restriction[ref_case - 1][c].m() == this->dofs_per_cell) ||
+        Assert((restriction[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
                  (restriction[ref_case - 1][c].m() == 0),
                ExcInternalError());
-        Assert((restriction[ref_case - 1][c].n() == this->dofs_per_cell) ||
+        Assert((restriction[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
                  (restriction[ref_case - 1][c].n() == 0),
                ExcInternalError());
         if ((restriction[ref_case - 1][c].m() == 0) ||
@@ -742,10 +746,10 @@ FiniteElement<dim, spacedim>::isotropic_prolongation_is_implemented() const
     {
       // make sure also the lazily initialized matrices are created
       get_prolongation_matrix(c, RefinementCase<dim>(ref_case));
-      Assert((prolongation[ref_case - 1][c].m() == this->dofs_per_cell) ||
+      Assert((prolongation[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
                (prolongation[ref_case - 1][c].m() == 0),
              ExcInternalError());
-      Assert((prolongation[ref_case - 1][c].n() == this->dofs_per_cell) ||
+      Assert((prolongation[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
                (prolongation[ref_case - 1][c].n() == 0),
              ExcInternalError());
       if ((prolongation[ref_case - 1][c].m() == 0) ||
@@ -770,10 +774,10 @@ FiniteElement<dim, spacedim>::isotropic_restriction_is_implemented() const
     {
       // make sure also the lazily initialized matrices are created
       get_restriction_matrix(c, RefinementCase<dim>(ref_case));
-      Assert((restriction[ref_case - 1][c].m() == this->dofs_per_cell) ||
+      Assert((restriction[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
                (restriction[ref_case - 1][c].m() == 0),
              ExcInternalError());
-      Assert((restriction[ref_case - 1][c].n() == this->dofs_per_cell) ||
+      Assert((restriction[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
                (restriction[ref_case - 1][c].n() == 0),
              ExcInternalError());
       if ((restriction[ref_case - 1][c].m() == 0) ||
@@ -843,10 +847,10 @@ FiniteElement<dim, spacedim>::interface_constraints_size() const
       case 1:
         return {0U, 0U};
       case 2:
-        return {this->dofs_per_vertex + 2 * this->dofs_per_line,
+        return {this->n_dofs_per_vertex() + 2 * this->dofs_per_line,
                 this->dofs_per_face};
       case 3:
-        return {5 * this->dofs_per_vertex + 12 * this->dofs_per_line +
+        return {5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line +
                   4 * this->dofs_per_quad,
                 this->dofs_per_face};
       default:
@@ -985,7 +989,7 @@ FiniteElement<dim, spacedim>::get_unit_support_points() const
   // there are as many as there are
   // degrees of freedom
   Assert((unit_support_points.size() == 0) ||
-           (unit_support_points.size() == this->dofs_per_cell),
+           (unit_support_points.size() == this->n_dofs_per_cell()),
          ExcInternalError());
   return unit_support_points;
 }
@@ -1027,8 +1031,8 @@ template <int dim, int spacedim>
 Point<dim>
 FiniteElement<dim, spacedim>::unit_support_point(const unsigned int index) const
 {
-  AssertIndexRange(index, this->dofs_per_cell);
-  Assert(unit_support_points.size() == this->dofs_per_cell,
+  AssertIndexRange(index, this->n_dofs_per_cell());
+  Assert(unit_support_points.size() == this->n_dofs_per_cell(),
          ExcFEHasNoSupportPoints());
   return unit_support_points[index];
 }
@@ -1141,7 +1145,7 @@ FiniteElement<dim, spacedim>::get_constant_modes() const
 {
   Assert(false, ExcNotImplemented());
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
-    Table<2, bool>(this->n_components(), this->dofs_per_cell),
+    Table<2, bool>(this->n_components(), this->n_dofs_per_cell()),
     std::vector<unsigned int>(this->n_components()));
 }
 
index 85eb12392b326f72ccaf3f3aa966d487d5b8bc3e..455b4ebf6e89e762023322e28e7d74cc222fd65f 100644 (file)
@@ -58,7 +58,7 @@ FE_ABF<dim>::FE_ABF(const unsigned int deg)
   , rt_order(deg)
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_raviart_thomas};
   // First, initialize the
@@ -343,9 +343,10 @@ FE_ABF<dim>::initialize_restriction()
       // Store shape values, since the
       // evaluation suffers if not
       // ordered by point
-      Table<2, double> cached_values_face(this->dofs_per_cell, q_face.size());
+      Table<2, double> cached_values_face(this->n_dofs_per_cell(),
+                                          q_face.size());
       for (unsigned int k = 0; k < q_face.size(); ++k)
-        for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
           cached_values_face(i, k) = this->shape_value_component(
             i, q_face.point(k), GeometryInfo<dim>::unit_normal_direction[face]);
 
@@ -374,7 +375,7 @@ FE_ABF<dim>::initialize_restriction()
           // corresponding shape
           // functions.
           for (unsigned int k = 0; k < n_face_points; ++k)
-            for (unsigned int i_child = 0; i_child < this->dofs_per_cell;
+            for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
                  ++i_child)
               for (unsigned int i_face = 0; i_face < this->dofs_per_face;
                    ++i_face)
@@ -421,9 +422,11 @@ FE_ABF<dim>::initialize_restriction()
   // Store shape values, since the
   // evaluation suffers if not
   // ordered by point
-  Table<3, double> cached_values_cell(this->dofs_per_cell, q_cell.size(), dim);
+  Table<3, double> cached_values_cell(this->n_dofs_per_cell(),
+                                      q_cell.size(),
+                                      dim);
   for (unsigned int k = 0; k < q_cell.size(); ++k)
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       for (unsigned int d = 0; d < dim; ++d)
         cached_values_cell(i, k, d) =
           this->shape_value_component(i, q_cell.point(k), d);
@@ -434,7 +437,8 @@ FE_ABF<dim>::initialize_restriction()
       Quadrature<dim> q_sub = QProjector<dim>::project_to_child(q_cell, child);
 
       for (unsigned int k = 0; k < q_sub.size(); ++k)
-        for (unsigned int i_child = 0; i_child < this->dofs_per_cell; ++i_child)
+        for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
+             ++i_child)
           for (unsigned int d = 0; d < dim; ++d)
             for (unsigned int i_weight = 0; i_weight < polynomials[d]->n();
                  ++i_weight)
@@ -491,7 +495,7 @@ bool
 FE_ABF<dim>::has_support_on_face(const unsigned int shape_index,
                                  const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // Return computed values if we
@@ -540,8 +544,8 @@ FE_ABF<dim>::convert_generalized_support_point_values_to_dof_values(
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
 
   std::fill(nodal_values.begin(), nodal_values.end(), 0.);
 
index ba126082e558c7f149e8f7326b766890ae91442f..baa4a173064c73dbba37e83dd3868b07a084a7c9 100644 (file)
@@ -54,7 +54,7 @@ FE_BDM<dim>::FE_BDM(const unsigned int deg)
     ExcMessage(
       "Lowest order BDM element are degree 1, but you asked for degree 0"));
 
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_bdm};
   // These must be done first, since
@@ -139,8 +139,8 @@ FE_BDM<dim>::convert_generalized_support_point_values_to_dof_values(
          ExcDimensionMismatch(support_point_values.size(),
                               this->generalized_support_points.size()));
   AssertDimension(support_point_values[0].size(), dim);
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
 
   // First do interpolation on faces. There, the component evaluated
   // depends on the face direction and orientation.
@@ -185,14 +185,14 @@ FE_BDM<dim>::convert_generalized_support_point_values_to_dof_values(
                     test_values_cell.size());
 
   // Done for BDM1
-  if (dbase == this->dofs_per_cell)
+  if (dbase == this->n_dofs_per_cell())
     return;
 
   // What's missing are the interior
   // degrees of freedom. In each
   // point, we take all components of
   // the solution.
-  Assert((this->dofs_per_cell - dbase) % dim == 0, ExcInternalError());
+  Assert((this->n_dofs_per_cell() - dbase) % dim == 0, ExcInternalError());
 
   for (unsigned int d = 0; d < dim; ++d, dbase += test_values_cell[0].size())
     {
@@ -205,7 +205,7 @@ FE_BDM<dim>::convert_generalized_support_point_values_to_dof_values(
         }
     }
 
-  Assert(dbase == this->dofs_per_cell, ExcInternalError());
+  Assert(dbase == this->n_dofs_per_cell(), ExcInternalError());
 }
 
 
index f51963d69f9e883530f7f18d249f221f1024ec4a..147db9986c053e713faf43c17f7d80480a22ad18 100644 (file)
@@ -52,7 +52,7 @@ FE_BernardiRaugel<dim>::FE_BernardiRaugel(const unsigned int p)
   Assert(dim == 2 || dim == 3, ExcImpossibleInDim(dim));
   Assert(p == 1, ExcMessage("Only BR1 elements are available"));
 
-  // const unsigned int n_dofs = this->dofs_per_cell;
+  // const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_none};
   // These must be done first, since
@@ -97,8 +97,8 @@ FE_BernardiRaugel<dim>::convert_generalized_support_point_values_to_dof_values(
          ExcDimensionMismatch(support_point_values.size(),
                               this->generalized_support_points.size()));
   AssertDimension(support_point_values[0].size(), dim);
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
 
   std::vector<Tensor<1, dim>> normals;
   for (unsigned int i : GeometryInfo<dim>::face_indices())
@@ -150,7 +150,7 @@ FE_BernardiRaugel<dim>::initialize_support_points()
 {
   // The support points for our shape functions are the vertices and
   // the face midpoints, for a total of #vertices + #faces points
-  this->generalized_support_points.resize(this->dofs_per_cell);
+  this->generalized_support_points.resize(this->n_dofs_per_cell());
 
   // We need dim copies of each vertex for the first dim*vertices_per_cell
   // generalized support points
index 49725dc3a65748e7b91b90404cd96821ab3a08c9..7505623561c2451e646485291994736b102a67f2 100644 (file)
@@ -34,10 +34,12 @@ FE_DGP<dim, spacedim>::FE_DGP(const unsigned int degree)
                              degree,
                              FiniteElementData<dim>::L2),
       std::vector<bool>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         true),
       std::vector<ComponentMask>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         std::vector<bool>(1, true)))
 {
   // Reinit the vectors of restriction and prolongation matrices to the right
@@ -272,7 +274,7 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_DGP<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   constant_modes(0, 0) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
index e123dbc0be981a060e665fab1adef86cf5fc39b9..80780dfdc7b2acbd3da6bb96f8d0737f81acf1ab 100644 (file)
@@ -130,20 +130,21 @@ namespace internal
 
 template <int dim>
 FE_DGPMonomial<dim>::FE_DGPMonomial(const unsigned int degree)
-  : FE_Poly<dim>(
-      PolynomialsP<dim>(degree),
-      FiniteElementData<dim>(get_dpo_vector(degree),
-                             1,
-                             degree,
-                             FiniteElementData<dim>::L2),
-      std::vector<bool>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
-        true),
-      std::vector<ComponentMask>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
-        std::vector<bool>(1, true)))
+  : FE_Poly<dim>(PolynomialsP<dim>(degree),
+                 FiniteElementData<dim>(get_dpo_vector(degree),
+                                        1,
+                                        degree,
+                                        FiniteElementData<dim>::L2),
+                 std::vector<bool>(
+                   FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+                     .n_dofs_per_cell(),
+                   true),
+                 std::vector<ComponentMask>(
+                   FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+                     .n_dofs_per_cell(),
+                   std::vector<bool>(1, true)))
 {
-  Assert(this->poly_space->n() == this->dofs_per_cell, ExcInternalError());
+  Assert(this->poly_space->n() == this->n_dofs_per_cell(), ExcInternalError());
   Assert(this->poly_space->degree() == this->degree, ExcInternalError());
 
   // DG doesn't have constraints, so
@@ -208,10 +209,10 @@ FE_DGPMonomial<dim>::get_interpolation_matrix(
       const unsigned int n = interpolation_matrix.n();
       (void)m;
       (void)n;
-      Assert(m == this->dofs_per_cell,
-             ExcDimensionMismatch(m, this->dofs_per_cell));
-      Assert(n == source_dgp_monomial->dofs_per_cell,
-             ExcDimensionMismatch(n, source_dgp_monomial->dofs_per_cell));
+      Assert(m == this->n_dofs_per_cell(),
+             ExcDimensionMismatch(m, this->n_dofs_per_cell()));
+      Assert(n == source_dgp_monomial->n_dofs_per_cell(),
+             ExcDimensionMismatch(n, source_dgp_monomial->n_dofs_per_cell()));
 
       const unsigned int min_mn =
         interpolation_matrix.m() < interpolation_matrix.n() ?
@@ -223,17 +224,18 @@ FE_DGPMonomial<dim>::get_interpolation_matrix(
     }
   else
     {
-      std::vector<Point<dim>> unit_points(this->dofs_per_cell);
+      std::vector<Point<dim>> unit_points(this->n_dofs_per_cell());
       internal::FE_DGPMonomial::generate_unit_points(this->degree, unit_points);
 
       FullMatrix<double> source_fe_matrix(unit_points.size(),
-                                          source_fe.dofs_per_cell);
-      for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+                                          source_fe.n_dofs_per_cell());
+      for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
         for (unsigned int k = 0; k < unit_points.size(); ++k)
           source_fe_matrix(k, j) = source_fe.shape_value(j, unit_points[k]);
 
-      FullMatrix<double> this_matrix(this->dofs_per_cell, this->dofs_per_cell);
-      for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+      FullMatrix<double> this_matrix(this->n_dofs_per_cell(),
+                                     this->n_dofs_per_cell());
+      for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
         for (unsigned int k = 0; k < unit_points.size(); ++k)
           this_matrix(k, j) =
             this->poly_space->compute_value(j, unit_points[k]);
index 341a81bf9405527c1e2d112e548fe337b364f167..bf0b92051309ae1f96ce3a1fd307e15dc564ac1f 100644 (file)
@@ -42,14 +42,16 @@ FE_DGPNonparametric<dim, spacedim>::FE_DGPNonparametric(
                              degree,
                              FiniteElementData<dim>::L2),
       std::vector<bool>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         true),
       std::vector<ComponentMask>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         std::vector<bool>(1, true)))
   , polynomial_space(Polynomials::Legendre::generate_complete_basis(degree))
 {
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
   for (unsigned int ref_case = RefinementCase<dim>::cut_x;
        ref_case < RefinementCase<dim>::isotropic_refinement + 1;
        ++ref_case)
@@ -139,7 +141,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_value(const unsigned int i,
 {
   (void)i;
   (void)p;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
   return 0;
@@ -157,7 +159,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_value_component(
   (void)i;
   (void)p;
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
@@ -173,7 +175,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_grad(const unsigned int i,
 {
   (void)i;
   (void)p;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
   return Tensor<1, dim>();
@@ -190,7 +192,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_grad_component(
   (void)i;
   (void)p;
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
@@ -206,7 +208,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_grad_grad(const unsigned int i,
 {
   (void)i;
   (void)p;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
   return Tensor<2, dim>();
@@ -224,7 +226,7 @@ FE_DGPNonparametric<dim, spacedim>::shape_grad_grad_component(
   (void)i;
   (void)p;
   (void)component;
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, 1);
   AssertThrow(false,
               (typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
@@ -321,11 +323,11 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_values(
   const unsigned int n_q_points = mapping_data.quadrature_points.size();
 
   std::vector<double> values(
-    (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<1, dim>> grads(
-    (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<2, dim>> grad_grads(
-    (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
   std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
 
@@ -340,15 +342,15 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_values(
                                   empty_vector_of_4th_order_tensors);
 
         if (fe_internal.update_each & update_values)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_values[k][i] = values[k];
 
         if (fe_internal.update_each & update_gradients)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_gradients[k][i] = grads[k];
 
         if (fe_internal.update_each & update_hessians)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_hessians[k][i] = grad_grads[k];
       }
 }
@@ -377,11 +379,11 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_face_values(
   const unsigned int n_q_points = mapping_data.quadrature_points.size();
 
   std::vector<double> values(
-    (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<1, dim>> grads(
-    (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<2, dim>> grad_grads(
-    (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
   std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
 
@@ -396,15 +398,15 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_face_values(
                                   empty_vector_of_4th_order_tensors);
 
         if (fe_internal.update_each & update_values)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_values[k][i] = values[k];
 
         if (fe_internal.update_each & update_gradients)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_gradients[k][i] = grads[k];
 
         if (fe_internal.update_each & update_hessians)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_hessians[k][i] = grad_grads[k];
       }
 }
@@ -434,11 +436,11 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_subface_values(
   const unsigned int n_q_points = mapping_data.quadrature_points.size();
 
   std::vector<double> values(
-    (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<1, dim>> grads(
-    (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<2, dim>> grad_grads(
-    (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+    (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
   std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
   std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
 
@@ -453,15 +455,15 @@ FE_DGPNonparametric<dim, spacedim>::fill_fe_subface_values(
                                   empty_vector_of_4th_order_tensors);
 
         if (fe_internal.update_each & update_values)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_values[k][i] = values[k];
 
         if (fe_internal.update_each & update_gradients)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_gradients[k][i] = grads[k];
 
         if (fe_internal.update_each & update_hessians)
-          for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+          for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
             output_data.shape_hessians[k][i] = grad_grads[k];
       }
 }
index 429221ebfadf8e6b35d9c25d422dd250c5b56db6..0034f68c8849cfdfe8ef00a5dddc6f4ea0cad6b5 100644 (file)
@@ -69,10 +69,12 @@ FE_DGQ<dim, spacedim>::FE_DGQ(const unsigned int degree)
                              degree,
                              FiniteElementData<dim>::L2),
       std::vector<bool>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         true),
       std::vector<ComponentMask>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+          .n_dofs_per_cell(),
         std::vector<bool>(1, true)))
 {
   // Compute support points, which are the tensor product of the Lagrange
@@ -103,13 +105,13 @@ FE_DGQ<dim, spacedim>::FE_DGQ(
                                                  polynomials.size() - 1),
                                                1,
                                                polynomials.size() - 1)
-                          .dofs_per_cell,
+                          .n_dofs_per_cell(),
                         true),
       std::vector<ComponentMask>(
         FiniteElementData<dim>(get_dpo_vector(polynomials.size() - 1),
                                1,
                                polynomials.size() - 1)
-          .dofs_per_cell,
+          .n_dofs_per_cell(),
         std::vector<bool>(1, true)))
 {
   // No support points can be defined in general. Derived classes might define
@@ -147,9 +149,9 @@ FE_DGQ<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
@@ -281,32 +283,33 @@ FE_DGQ<dim, spacedim>::get_interpolation_matrix(
   const FE_DGQ<dim, spacedim> &source_fe =
     dynamic_cast<const FE_DGQ<dim, spacedim> &>(x_source_fe);
 
-  Assert(interpolation_matrix.m() == this->dofs_per_cell,
-         ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
-  Assert(interpolation_matrix.n() == source_fe.dofs_per_cell,
+  Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(interpolation_matrix.m(),
+                              this->n_dofs_per_cell()));
+  Assert(interpolation_matrix.n() == source_fe.n_dofs_per_cell(),
          ExcDimensionMismatch(interpolation_matrix.n(),
-                              source_fe.dofs_per_cell));
+                              source_fe.n_dofs_per_cell()));
 
 
   // compute the interpolation
   // matrices in much the same way as
   // we do for the embedding matrices
   // from mother to child.
-  FullMatrix<double> cell_interpolation(this->dofs_per_cell,
-                                        this->dofs_per_cell);
-  FullMatrix<double> source_interpolation(this->dofs_per_cell,
-                                          source_fe.dofs_per_cell);
-  FullMatrix<double> tmp(this->dofs_per_cell, source_fe.dofs_per_cell);
-  for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+  FullMatrix<double> cell_interpolation(this->n_dofs_per_cell(),
+                                        this->n_dofs_per_cell());
+  FullMatrix<double> source_interpolation(this->n_dofs_per_cell(),
+                                          source_fe.n_dofs_per_cell());
+  FullMatrix<double> tmp(this->n_dofs_per_cell(), source_fe.n_dofs_per_cell());
+  for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
     {
       // generate a point on this
       // cell and evaluate the
       // shape functions there
       const Point<dim> p = this->unit_support_points[j];
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
         cell_interpolation(j, i) = this->poly_space->compute_value(i, p);
 
-      for (unsigned int i = 0; i < source_fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < source_fe.n_dofs_per_cell(); ++i)
         source_interpolation(j, i) = source_fe.poly_space->compute_value(i, p);
     }
 
@@ -318,8 +321,8 @@ FE_DGQ<dim, spacedim>::get_interpolation_matrix(
   cell_interpolation.mmult(interpolation_matrix, source_interpolation);
 
   // cut off very small values
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-    for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+    for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
       if (std::fabs(interpolation_matrix(i, j)) < 1e-15)
         interpolation_matrix(i, j) = 0.;
 
@@ -328,10 +331,10 @@ FE_DGQ<dim, spacedim>::get_interpolation_matrix(
   // this point. this must be so
   // since the shape functions sum up
   // to 1
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       double sum = 0.;
-      for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+      for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
         sum += interpolation_matrix(i, j);
 
       Assert(std::fabs(sum - 1) < 5e-14 * std::max(this->degree, 1U) * dim,
@@ -414,7 +417,7 @@ FE_DGQ<dim, spacedim>::get_prolongation_matrix(
 
       // if matrix got updated while waiting for the lock
       if (this->prolongation[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->prolongation[refinement_case - 1][child];
 
       // now do the work. need to get a non-const version of data in order to
@@ -427,7 +430,8 @@ FE_DGQ<dim, spacedim>::get_prolongation_matrix(
             RefinementCase<dim>::isotropic_refinement);
           isotropic_matrices.back().resize(
             GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)),
-            FullMatrix<double>(this->dofs_per_cell, this->dofs_per_cell));
+            FullMatrix<double>(this->n_dofs_per_cell(),
+                               this->n_dofs_per_cell()));
           if (dim == spacedim)
             FETools::compute_embedding_matrices(*this,
                                                 isotropic_matrices,
@@ -489,7 +493,7 @@ FE_DGQ<dim, spacedim>::get_restriction_matrix(
 
       // if matrix got updated while waiting for the lock...
       if (this->restriction[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->restriction[refinement_case - 1][child];
 
       // now do the work. need to get a non-const version of data in order to
@@ -502,7 +506,8 @@ FE_DGQ<dim, spacedim>::get_restriction_matrix(
             RefinementCase<dim>::isotropic_refinement);
           isotropic_matrices.back().resize(
             GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)),
-            FullMatrix<double>(this->dofs_per_cell, this->dofs_per_cell));
+            FullMatrix<double>(this->n_dofs_per_cell(),
+                               this->n_dofs_per_cell()));
           if (dim == spacedim)
             FETools::compute_projection_matrices(*this,
                                                  isotropic_matrices,
@@ -709,7 +714,7 @@ bool
 FE_DGQ<dim, spacedim>::has_support_on_face(const unsigned int shape_index,
                                            const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   unsigned int n = this->degree + 1;
@@ -757,7 +762,7 @@ FE_DGQ<dim, spacedim>::has_support_on_face(const unsigned int shape_index,
             return true;
           if (face_index == 2 && shape_index < n)
             return true;
-          if (face_index == 3 && shape_index >= this->dofs_per_cell - n)
+          if (face_index == 3 && shape_index >= this->n_dofs_per_cell() - n)
             return true;
           return false;
         }
@@ -782,7 +787,7 @@ FE_DGQ<dim, spacedim>::has_support_on_face(const unsigned int shape_index,
           if (face_index == 4 && shape_index < n2)
             return true;
           // z=1
-          if (face_index == 5 && shape_index >= this->dofs_per_cell - n2)
+          if (face_index == 5 && shape_index >= this->n_dofs_per_cell() - n2)
             return true;
           return false;
         }
@@ -799,7 +804,7 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_DGQ<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   constant_modes.fill(true);
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
@@ -931,9 +936,9 @@ FE_DGQArbitraryNodes<dim, spacedim>::
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
@@ -979,7 +984,7 @@ FE_DGQLegendre<dim, spacedim>::get_constant_modes() const
 {
   // Legendre represents a constant function by one in the first basis
   // function and zero in all others
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   constant_modes(0, 0) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
index 46c57d264616fd4b5cd7d1d8818d66e1347e1db4..11ededa2861c0e23cbc952cf1821a59a332da9d3 100644 (file)
@@ -211,7 +211,7 @@ FE_Enriched<dim, spacedim>::FE_Enriched(
                               this->n_base_elements()));
 
   // build the map: (base_no, base_m) -> vector of local element DoFs
-  for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+  for (unsigned int system_index = 0; system_index < this->n_dofs_per_cell();
        ++system_index)
     {
       const unsigned int base_no =
@@ -248,10 +248,10 @@ FE_Enriched<dim, spacedim>::FE_Enriched(
            m < base_no_mult_local_enriched_dofs[base_no].size();
            m++)
         Assert(base_no_mult_local_enriched_dofs[base_no][m].size() ==
-                 fes[base_no]->dofs_per_cell,
+                 fes[base_no]->n_dofs_per_cell(),
                ExcDimensionMismatch(
                  base_no_mult_local_enriched_dofs[base_no][m].size(),
-                 fes[base_no]->dofs_per_cell));
+                 fes[base_no]->n_dofs_per_cell()));
     }
 }
 
@@ -439,7 +439,7 @@ FE_Enriched<dim, spacedim>::initialize(
   {
     // If the system is not primitive, these have not been initialized by
     // FiniteElement
-    this->system_to_component_table.resize(this->dofs_per_cell);
+    this->system_to_component_table.resize(this->n_dofs_per_cell());
     this->face_system_to_component_table.resize(this->dofs_per_face);
 
     FETools::Compositing::build_cell_tables(this->system_to_base_table,
@@ -659,13 +659,15 @@ FE_Enriched<dim, spacedim>::multiply_by_enrichment(
 
         const UpdateFlags base_flags = base_fe_data.update_each;
 
-        for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+        for (unsigned int system_index = 0;
+             system_index < this->n_dofs_per_cell();
              ++system_index)
           if (this->system_to_base_table[system_index].first.first == base_no)
             {
               const unsigned int base_index =
                 this->system_to_base_table[system_index].second;
-              Assert(base_index < base_fe.dofs_per_cell, ExcInternalError());
+              Assert(base_index < base_fe.n_dofs_per_cell(),
+                     ExcInternalError());
 
               // now copy. if the shape function is primitive, then there
               // is only one value to be copied, but for non-primitive
index 9789720605ffac571622e56b93b29549b5eedddf..b0bb00e993410f4699982bc8cfce8d273e6b65a1 100644 (file)
@@ -475,8 +475,8 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_FaceQ<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     constant_modes(0, i) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
@@ -491,9 +491,9 @@ FE_FaceQ<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
@@ -647,8 +647,8 @@ template <int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_FaceQ<1, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     constant_modes(0, i) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
@@ -712,7 +712,7 @@ FE_FaceQ<1, spacedim>::fill_fe_face_values(
   const unsigned int foffset = face;
   if (fe_internal.update_each & update_values)
     {
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_values(k, 0) = 0.;
       output_data.shape_values(foffset, 0) = 1;
     }
@@ -978,7 +978,7 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_FaceP<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   for (unsigned int face : GeometryInfo<dim>::face_indices())
     constant_modes(0, face * this->dofs_per_face) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
index e46ba88a06d98a09bf98414f8e36e18c4ba2af70..c774591786621cd298967750ea92fc2f6360915e 100644 (file)
@@ -85,7 +85,7 @@ FE_Nedelec<dim>::FE_Nedelec(const unsigned int order)
 
   Assert(dim >= 2, ExcImpossibleInDim(dim));
 
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_nedelec};
   // First, initialize the
@@ -534,7 +534,7 @@ FE_Nedelec<dim>::initialize_restriction()
           // functions of the child cells
           // to the lowest order shape
           // functions of the parent cell.
-          for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+          for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
             for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
                  ++q_point)
               {
@@ -626,7 +626,7 @@ FE_Nedelec<dim>::initialize_restriction()
               FullMatrix<double> system_rhs(this->degree - 1, 4);
               Vector<double>     tmp(4);
 
-              for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+              for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
                 for (unsigned int i = 0; i < 2; ++i)
                   {
                     system_rhs = 0.0;
@@ -801,7 +801,7 @@ FE_Nedelec<dim>::initialize_restriction()
               system_rhs.reinit(system_matrix_inv.m(), 8);
               tmp.reinit(8);
 
-              for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+              for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
                 {
                   system_rhs = 0.0;
 
@@ -963,7 +963,7 @@ FE_Nedelec<dim>::initialize_restriction()
           // functions of the child cells
           // to the lowest order shape
           // functions of the parent cell.
-          for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+          for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
             for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
                  ++q_point)
               {
@@ -1068,7 +1068,8 @@ FE_Nedelec<dim>::initialize_restriction()
 
               for (unsigned int i = 0; i < 2; ++i)
                 for (unsigned int j = 0; j < 2; ++j)
-                  for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+                  for (unsigned int dof = 0; dof < this->n_dofs_per_cell();
+                       ++dof)
                     {
                       system_rhs = 0.0;
 
@@ -1300,7 +1301,7 @@ FE_Nedelec<dim>::initialize_restriction()
               tmp.reinit(24);
 
               for (unsigned int i = 0; i < 2; ++i)
-                for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+                for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
                   {
                     system_rhs = 0.0;
 
@@ -1641,7 +1642,7 @@ FE_Nedelec<dim>::initialize_restriction()
               system_rhs.reinit(system_matrix_inv.m(), 24);
               tmp.reinit(24);
 
-              for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+              for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
                 {
                   system_rhs = 0.0;
 
@@ -2035,7 +2036,7 @@ bool
 FE_Nedelec<dim>::has_support_on_face(const unsigned int shape_index,
                                      const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   const unsigned int deg = this->degree - 1;
@@ -2970,7 +2971,7 @@ FE_Nedelec<dim>::get_prolongation_matrix(
 
       // if matrix got updated while waiting for the lock
       if (this->prolongation[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->prolongation[refinement_case - 1][child];
 
       // now do the work. need to get a non-const version of data in order to
@@ -3026,7 +3027,7 @@ FE_Nedelec<dim>::get_restriction_matrix(
 
       // if matrix got updated while waiting for the lock...
       if (this->restriction[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->restriction[refinement_case - 1][child];
 
       // now do the work. need to get a non-const version of data in order to
@@ -3081,8 +3082,8 @@ FE_Nedelec<dim>::convert_generalized_support_point_values_to_dof_values(
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
   std::fill(nodal_values.begin(), nodal_values.end(), 0.0);
 
   switch (dim)
@@ -4018,9 +4019,9 @@ template <int dim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_Nedelec<dim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(dim, this->dofs_per_cell);
+  Table<2, bool> constant_modes(dim, this->n_dofs_per_cell());
   for (unsigned int d = 0; d < dim; ++d)
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       constant_modes(d, i) = true;
   std::vector<unsigned int> components;
   for (unsigned int d = 0; d < dim; ++d)
index 03221321ba1440d644f7a8aa2084402e0b3ca24d..861bb8afb49059d42470e1b1047aeff4ac524ade 100644 (file)
@@ -165,13 +165,13 @@ FE_NedelecSZ<dim, spacedim>::get_data(
   // Resize shape function arrays according to update flags:
   if (flags & update_values)
     {
-      data.shape_values.resize(this->dofs_per_cell,
+      data.shape_values.resize(this->n_dofs_per_cell(),
                                std::vector<Tensor<1, dim>>(n_q_points));
     }
 
   if (flags & update_gradients)
     {
-      data.shape_grads.resize(this->dofs_per_cell,
+      data.shape_grads.resize(this->n_dofs_per_cell(),
                               std::vector<DerivativeForm<1, dim, dim>>(
                                 n_q_points));
     }
@@ -1128,9 +1128,9 @@ FE_NedelecSZ<dim, spacedim>::fill_edge_values(
   const unsigned int n_q_points = quadrature.size();
 
   Assert(!(flags & update_values) ||
-           fe_data.shape_values.size() == this->dofs_per_cell,
+           fe_data.shape_values.size() == this->n_dofs_per_cell(),
          ExcDimensionMismatch(fe_data.shape_values.size(),
-                              this->dofs_per_cell));
+                              this->n_dofs_per_cell()));
   Assert(!(flags & update_values) ||
            fe_data.shape_values[0].size() == n_q_points,
          ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
@@ -1565,9 +1565,9 @@ FE_NedelecSZ<dim, spacedim>::fill_face_values(
           const unsigned int n_q_points = quadrature.size();
 
           Assert(!(flags & update_values) ||
-                   fe_data.shape_values.size() == this->dofs_per_cell,
+                   fe_data.shape_values.size() == this->n_dofs_per_cell(),
                  ExcDimensionMismatch(fe_data.shape_values.size(),
-                                      this->dofs_per_cell));
+                                      this->n_dofs_per_cell()));
           Assert(!(flags & update_values) ||
                    fe_data.shape_values[0].size() == n_q_points,
                  ExcDimensionMismatch(fe_data.shape_values[0].size(),
@@ -1939,9 +1939,9 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_values(
   const unsigned int n_q_points = quadrature.size();
 
   Assert(!(flags & update_values) ||
-           fe_data.shape_values.size() == this->dofs_per_cell,
+           fe_data.shape_values.size() == this->n_dofs_per_cell(),
          ExcDimensionMismatch(fe_data.shape_values.size(),
-                              this->dofs_per_cell));
+                              this->n_dofs_per_cell()));
   Assert(!(flags & update_values) ||
            fe_data.shape_values[0].size() == n_q_points,
          ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
@@ -1951,7 +1951,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_values(
       // Now have all shape_values stored on the reference cell.
       // Must now transform to the physical cell.
       std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
-      for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+      for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
         {
           const unsigned int first =
             data.shape_function_to_row_table[dof * this->n_components() +
@@ -1978,7 +1978,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_values(
       // Must now transform to the physical cell.
       std::vector<Tensor<2, dim>> input(n_q_points);
       std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
-      for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+      for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
         {
           for (unsigned int q = 0; q < n_q_points; ++q)
             {
@@ -2079,7 +2079,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_face_values(
       // Now have all shape_values stored on the reference cell.
       // Must now transform to the physical cell.
       std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
-      for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+      for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
         {
           mapping.transform(make_array_view(fe_data.shape_values[dof],
                                             offset,
@@ -2109,7 +2109,7 @@ FE_NedelecSZ<dim, spacedim>::fill_fe_face_values(
       // Must now transform to the physical cell.
       std::vector<Tensor<2, dim>> input(n_q_points);
       std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
-      for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+      for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
         {
           for (unsigned int q = 0; q < n_q_points; ++q)
             {
index 6b5215786ecade7ea086127aa7148697befc4e08..e66652bebc0d2e1b4429d38dac00bd4b43c4bb8e 100644 (file)
@@ -228,14 +228,14 @@ FE_P1NC::fill_fe_values(
   // compute on the cell
   if (flags & update_values)
     for (unsigned int i = 0; i < n_q_points; ++i)
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_values[k][i] =
           (coeffs[k][0] * mapping_data.quadrature_points[i](0) +
            coeffs[k][1] * mapping_data.quadrature_points[i](1) + coeffs[k][2]);
 
   if (flags & update_gradients)
     for (unsigned int i = 0; i < n_q_points; ++i)
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
           Point<2>(coeffs[k][0], coeffs[k][1]);
 }
@@ -266,7 +266,7 @@ FE_P1NC::fill_fe_face_values(
 
   if (flags & update_values)
     for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         {
           const Point<2> quadrature_point =
             mapping.transform_unit_to_real_cell(cell,
@@ -279,7 +279,7 @@ FE_P1NC::fill_fe_face_values(
 
   if (flags & update_gradients)
     for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
           Point<2>(coeffs[k][0], coeffs[k][1]);
 }
@@ -312,7 +312,7 @@ FE_P1NC::fill_fe_subface_values(
   if (flags & update_values)
     for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
       {
-        for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+        for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
           {
             const Point<2> quadrature_point =
               mapping.transform_unit_to_real_cell(
@@ -326,7 +326,7 @@ FE_P1NC::fill_fe_subface_values(
 
   if (flags & update_gradients)
     for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         output_data.shape_gradients[k][i] =
           Point<2>(coeffs[k][0], coeffs[k][1]);
 }
index f92894054f18b106d432bdb096aff4237ad7cd25..21efff6175a169313eb5efd0d1f971cb59777876 100644 (file)
@@ -243,7 +243,7 @@ FE_PolyTensor<dim, spacedim>::shape_value_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, dim);
 
   std::lock_guard<std::mutex> lock(cache_mutex);
@@ -288,7 +288,7 @@ FE_PolyTensor<dim, spacedim>::shape_grad_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, dim);
 
   std::lock_guard<std::mutex> lock(cache_mutex);
@@ -334,7 +334,7 @@ FE_PolyTensor<dim, spacedim>::shape_grad_grad_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, dim);
 
   std::lock_guard<std::mutex> lock(cache_mutex);
@@ -392,9 +392,9 @@ FE_PolyTensor<dim, spacedim>::fill_fe_values(
   const unsigned int n_q_points = quadrature.size();
 
   Assert(!(fe_data.update_each & update_values) ||
-           fe_data.shape_values.size()[0] == this->dofs_per_cell,
+           fe_data.shape_values.size()[0] == this->n_dofs_per_cell(),
          ExcDimensionMismatch(fe_data.shape_values.size()[0],
-                              this->dofs_per_cell));
+                              this->n_dofs_per_cell()));
   Assert(!(fe_data.update_each & update_values) ||
            fe_data.shape_values.size()[1] == n_q_points,
          ExcDimensionMismatch(fe_data.shape_values.size()[1], n_q_points));
@@ -418,7 +418,7 @@ FE_PolyTensor<dim, spacedim>::fill_fe_values(
                                                         fe_data.sign_change);
 
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       const MappingKind mapping_kind = get_mapping_kind(i);
 
@@ -996,7 +996,7 @@ FE_PolyTensor<dim, spacedim>::fill_fe_face_values(
                                                         this->mapping_kind,
                                                         fe_data.sign_change);
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       const MappingKind mapping_kind = get_mapping_kind(i);
 
@@ -1626,7 +1626,7 @@ FE_PolyTensor<dim, spacedim>::fill_fe_subface_values(
                                                         this->mapping_kind,
                                                         fe_data.sign_change);
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       const MappingKind mapping_kind = get_mapping_kind(i);
 
@@ -2190,7 +2190,7 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
 {
   UpdateFlags out = update_default;
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       const MappingKind mapping_kind = get_mapping_kind(i);
 
index a085033cc56ec880b6b59263af543bf716c913a2..87fe157b6763f79061b5ad8307ce969800178157 100644 (file)
@@ -155,9 +155,9 @@ FE_Q<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
index c2353a0e649f781d05ce618dd506c7f9948fa12f..3cd7b0e002e1479a0a1f96796cd22dca4f8de888 100644 (file)
@@ -435,15 +435,15 @@ FE_Q_Base<PolynomialType, dim, spacedim>::initialize(
   // class FE_Q_DG0 that otherwise shares 95% of the code.
   const unsigned int q_dofs_per_cell =
     Utilities::fixed_power<dim>(q_degree + 1);
-  Assert(q_dofs_per_cell == this->dofs_per_cell ||
-           q_dofs_per_cell + 1 == this->dofs_per_cell ||
-           q_dofs_per_cell + dim == this->dofs_per_cell,
+  Assert(q_dofs_per_cell == this->n_dofs_per_cell() ||
+           q_dofs_per_cell + 1 == this->n_dofs_per_cell() ||
+           q_dofs_per_cell + dim == this->n_dofs_per_cell(),
          ExcInternalError());
 
   [this, q_dofs_per_cell]() {
     std::vector<unsigned int> renumber =
       FETools::hierarchic_to_lexicographic_numbering<dim>(q_degree);
-    for (unsigned int i = q_dofs_per_cell; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = q_dofs_per_cell; i < this->n_dofs_per_cell(); ++i)
       renumber.push_back(i);
     auto *tensor_poly_space_ptr =
       dynamic_cast<TensorProductPolynomials<dim> *>(this->poly_space.get());
@@ -509,12 +509,12 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_interpolation_matrix(
           &x_source_fe))
     {
       // ok, source is a Q element, so we will be able to do the work
-      Assert(interpolation_matrix.m() == this->dofs_per_cell,
+      Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
              ExcDimensionMismatch(interpolation_matrix.m(),
-                                  this->dofs_per_cell));
-      Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+                                  this->n_dofs_per_cell()));
+      Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
              ExcDimensionMismatch(interpolation_matrix.m(),
-                                  x_source_fe.dofs_per_cell));
+                                  x_source_fe.n_dofs_per_cell()));
 
       // only evaluate Q dofs
       const unsigned int q_dofs_per_cell =
@@ -542,9 +542,10 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_interpolation_matrix(
         }
 
       // for FE_Q_DG0, add one last row of identity
-      if (q_dofs_per_cell < this->dofs_per_cell)
+      if (q_dofs_per_cell < this->n_dofs_per_cell())
         {
-          AssertDimension(source_q_dofs_per_cell + 1, source_fe->dofs_per_cell);
+          AssertDimension(source_q_dofs_per_cell + 1,
+                          source_fe->n_dofs_per_cell());
           for (unsigned int i = 0; i < source_q_dofs_per_cell; ++i)
             interpolation_matrix(q_dofs_per_cell, i) = 0.;
           for (unsigned int j = 0; j < q_dofs_per_cell; ++j)
@@ -554,17 +555,17 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_interpolation_matrix(
 
       // cut off very small values
       const double eps = 2e-13 * q_degree * dim;
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-        for (unsigned int j = 0; j < source_fe->dofs_per_cell; ++j)
+      for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+        for (unsigned int j = 0; j < source_fe->n_dofs_per_cell(); ++j)
           if (std::fabs(interpolation_matrix(i, j)) < eps)
             interpolation_matrix(i, j) = 0.;
 
       // make sure that the row sum of each of the matrices is 1 at this
       // point. this must be so since the shape functions sum up to 1
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
         {
           double sum = 0.;
-          for (unsigned int j = 0; j < source_fe->dofs_per_cell; ++j)
+          for (unsigned int j = 0; j < source_fe->n_dofs_per_cell(); ++j)
             sum += interpolation_matrix(i, j);
 
           Assert(std::fabs(sum - 1) < eps, ExcInternalError());
@@ -578,13 +579,13 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_interpolation_matrix(
       // with a n_dofs x 0 matrix. there is nothing to do here
 
       // we would like to verify that the number of rows and columns of
-      // the matrix equals this->dofs_per_cell and zero. unfortunately,
+      // the matrix equals this->n_dofs_per_cell() and zero. unfortunately,
       // whenever we do FullMatrix::reinit(m,0), it sets both rows and
       // columns to zero, instead of m and zero. thus, only test the
       // number of columns
-      Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+      Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
              ExcDimensionMismatch(interpolation_matrix.m(),
-                                  x_source_fe.dofs_per_cell));
+                                  x_source_fe.n_dofs_per_cell()));
     }
   else
     AssertThrow(
@@ -1055,15 +1056,15 @@ FE_Q_Base<PolynomialType, dim, spacedim>::face_to_cell_index(
     {
       // get the number of the vertex on the face that corresponds to this DoF,
       // along with the number of the DoF on this vertex
-      const unsigned int face_vertex = face_index / this->dofs_per_vertex;
+      const unsigned int face_vertex = face_index / this->n_dofs_per_vertex();
       const unsigned int dof_index_on_vertex =
-        face_index % this->dofs_per_vertex;
+        face_index % this->n_dofs_per_vertex();
 
       // then get the number of this vertex on the cell and translate
       // this to a DoF number on the cell
       return (GeometryInfo<dim>::face_to_cell_vertices(
                 face, face_vertex, face_orientation, face_flip, face_rotation) *
-                this->dofs_per_vertex +
+                this->n_dofs_per_vertex() +
               dof_index_on_vertex);
     }
   else if (face_index < this->first_face_quad_index)
@@ -1186,7 +1187,7 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_prolongation_matrix(
 
       // if matrix got updated while waiting for the lock
       if (this->prolongation[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->prolongation[refinement_case - 1][child];
 
       // distinguish q/q_dg0 case: only treat Q dofs first
@@ -1251,7 +1252,8 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_prolongation_matrix(
           }
       }
 
-      FullMatrix<double> prolongate(this->dofs_per_cell, this->dofs_per_cell);
+      FullMatrix<double> prolongate(this->n_dofs_per_cell(),
+                                    this->n_dofs_per_cell());
 
       // go through the points in diagonal to capture variation in all
       // directions simultaneously
@@ -1331,19 +1333,19 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_prolongation_matrix(
 
       // the discontinuous node is simply mapped on the discontinuous node on
       // the child element
-      if (q_dofs_per_cell < this->dofs_per_cell)
+      if (q_dofs_per_cell < this->n_dofs_per_cell())
         prolongate(q_dofs_per_cell, q_dofs_per_cell) = 1.;
 
         // and make sure that the row sum is 1. this must be so since for this
         // element, the shape functions add up to one
 #ifdef DEBUG
-      for (unsigned int row = 0; row < this->dofs_per_cell; ++row)
+      for (unsigned int row = 0; row < this->n_dofs_per_cell(); ++row)
         {
           double sum = 0;
-          for (unsigned int col = 0; col < this->dofs_per_cell; ++col)
+          for (unsigned int col = 0; col < this->n_dofs_per_cell(); ++col)
             sum += prolongate(row, col);
           Assert(std::fabs(sum - 1.) <
-                   std::max(eps, 5e-16 * std::sqrt(this->dofs_per_cell)),
+                   std::max(eps, 5e-16 * std::sqrt(this->n_dofs_per_cell())),
                  ExcInternalError("The entries in a row of the local "
                                   "prolongation matrix do not add to one. "
                                   "This typically indicates that the "
@@ -1384,11 +1386,11 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_restriction_matrix(
 
       // if matrix got updated while waiting for the lock...
       if (this->restriction[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->restriction[refinement_case - 1][child];
 
-      FullMatrix<double> my_restriction(this->dofs_per_cell,
-                                        this->dofs_per_cell);
+      FullMatrix<double> my_restriction(this->n_dofs_per_cell(),
+                                        this->n_dofs_per_cell());
       // distinguish q/q_dg0 case
       const unsigned int q_dofs_per_cell =
         Utilities::fixed_power<dim>(q_degree + 1);
@@ -1418,7 +1420,7 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_restriction_matrix(
       const unsigned int          dofs1d = q_degree + 1;
       std::vector<Tensor<1, dim>> evaluations1d(dofs1d);
 
-      my_restriction.reinit(this->dofs_per_cell, this->dofs_per_cell);
+      my_restriction.reinit(this->n_dofs_per_cell(), this->n_dofs_per_cell());
 
       for (unsigned int i = 0; i < q_dofs_per_cell; ++i)
         {
@@ -1474,7 +1476,8 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_restriction_matrix(
                                                               dofs1d);
                 }
               Assert(std::fabs(sum_check - 1) <
-                       std::max(eps, 5e-16 * std::sqrt(this->dofs_per_cell)),
+                       std::max(eps,
+                                5e-16 * std::sqrt(this->n_dofs_per_cell())),
                      ExcInternalError("The entries in a row of the local "
                                       "restriction matrix do not add to one. "
                                       "This typically indicates that the "
@@ -1484,8 +1487,9 @@ FE_Q_Base<PolynomialType, dim, spacedim>::get_restriction_matrix(
             }
 
           // part for FE_Q_DG0
-          if (q_dofs_per_cell < this->dofs_per_cell)
-            my_restriction(this->dofs_per_cell - 1, this->dofs_per_cell - 1) =
+          if (q_dofs_per_cell < this->n_dofs_per_cell())
+            my_restriction(this->n_dofs_per_cell() - 1,
+                           this->n_dofs_per_cell() - 1) =
               1. / GeometryInfo<dim>::n_children(
                      RefinementCase<dim>(refinement_case));
         }
@@ -1512,7 +1516,7 @@ FE_Q_Base<PolynomialType, dim, spacedim>::has_support_on_face(
   const unsigned int shape_index,
   const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // in 1d, things are simple. since there is only one degree of freedom per
@@ -1610,7 +1614,7 @@ template <typename PolynomialType, int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_Q_Base<PolynomialType, dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   // We here just care for the constant mode due to the polynomial space
   // without any enrichments
   // As there may be more constant modes derived classes may to implement this
index 464d23a9a7bc9a3e9b18a6c281d0bbc8a222b363..dc38e9d687001a31ab87314b456089a91f0cc965 100644 (file)
@@ -52,7 +52,7 @@ namespace internal
         std::vector<std::vector<FullMatrix<double>>> &matrices,
         const bool                                    isotropic_only)
       {
-        const unsigned int dpc    = fe.dofs_per_cell;
+        const unsigned int dpc    = fe.n_dofs_per_cell();
         const unsigned int degree = fe.degree;
 
         // Initialize quadrature formula on fine cells
@@ -134,7 +134,7 @@ namespace internal
             FullMatrix<double> coarse_rhs_matrix(n_dofs, dpc);
 
             std::vector<std::vector<types::global_dof_index>> child_ldi(
-              nc, std::vector<types::global_dof_index>(fe.dofs_per_cell));
+              nc, std::vector<types::global_dof_index>(fe.n_dofs_per_cell()));
 
             // now create the mass matrix and all the right_hand sides
             unsigned int                                           child_no = 0;
@@ -210,7 +210,7 @@ FE_Q_Bubbles<dim, spacedim>::FE_Q_Bubbles(const unsigned int q_degree)
     point[d] = 0.5;
   for (unsigned int i = 0; i < n_bubbles; ++i)
     this->unit_support_points.push_back(point);
-  AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+  AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
 
   this->reinit_restriction_and_prolongation_matrices();
   if (dim == spacedim)
@@ -249,7 +249,7 @@ FE_Q_Bubbles<dim, spacedim>::FE_Q_Bubbles(const Quadrature<1> &points)
     point[d] = 0.5;
   for (unsigned int i = 0; i < n_bubbles; ++i)
     this->unit_support_points.push_back(point);
-  AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+  AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
 
   this->reinit_restriction_and_prolongation_matrices();
   if (dim == spacedim)
@@ -276,7 +276,7 @@ FE_Q_Bubbles<dim, spacedim>::get_name() const
   bool                           type     = true;
   const unsigned int             n_points = this->degree;
   std::vector<double>            points(n_points);
-  const unsigned int             dofs_per_cell = this->dofs_per_cell;
+  const unsigned int             dofs_per_cell = this->n_dofs_per_cell();
   const std::vector<Point<dim>> &unit_support_points =
     this->unit_support_points;
   unsigned int index = 0;
@@ -362,13 +362,13 @@ FE_Q_Bubbles<dim, spacedim>::
   Assert(support_point_values.size() == this->unit_support_points.size(),
          ExcDimensionMismatch(support_point_values.size(),
                               this->unit_support_points.size()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
 
-  for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
     {
       const std::pair<unsigned int, unsigned int> index =
         this->system_to_component_index(i);
@@ -397,11 +397,12 @@ FE_Q_Bubbles<dim, spacedim>::get_interpolation_matrix(
     (x_source_fe.get_name().find("FE_Q_Bubbles<") == 0) ||
       (dynamic_cast<const FEQBUBBLES *>(&x_source_fe) != nullptr),
     (typename FiniteElement<dim, spacedim>::ExcInterpolationNotImplemented()));
-  Assert(interpolation_matrix.m() == this->dofs_per_cell,
-         ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
-  Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+  Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
          ExcDimensionMismatch(interpolation_matrix.m(),
-                              x_source_fe.dofs_per_cell));
+                              this->n_dofs_per_cell()));
+  Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
+         ExcDimensionMismatch(interpolation_matrix.m(),
+                              x_source_fe.n_dofs_per_cell()));
 
   // Provide a short cut in case we are just inquiring the identity
   auto casted_fe = dynamic_cast<const FEQBUBBLES *>(&x_source_fe);
index 2003961a0ab787794bd9bae781dc9d6eb2b75d10..3f1b209c35d1f2641bdb0f00df2a01438c74b38d 100644 (file)
@@ -55,7 +55,7 @@ FE_Q_DG0<dim, spacedim>::FE_Q_DG0(const unsigned int degree)
   for (unsigned int d = 0; d < dim; ++d)
     point[d] = 0.5;
   this->unit_support_points.push_back(point);
-  AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+  AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
 }
 
 
@@ -85,7 +85,7 @@ FE_Q_DG0<dim, spacedim>::FE_Q_DG0(const Quadrature<1> &points)
   for (unsigned int d = 0; d < dim; ++d)
     point[d] = 0.5;
   this->unit_support_points.push_back(point);
-  AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+  AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
 }
 
 
@@ -102,7 +102,7 @@ FE_Q_DG0<dim, spacedim>::get_name() const
   bool                           type     = true;
   const unsigned int             n_points = this->degree + 1;
   std::vector<double>            points(n_points);
-  const unsigned int             dofs_per_cell = this->dofs_per_cell;
+  const unsigned int             dofs_per_cell = this->n_dofs_per_cell();
   const std::vector<Point<dim>> &unit_support_points =
     this->unit_support_points;
   unsigned int index = 0;
@@ -187,13 +187,13 @@ FE_Q_DG0<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
   Assert(support_point_values.size() == this->unit_support_points.size(),
          ExcDimensionMismatch(support_point_values.size(),
                               this->unit_support_points.size()));
-  Assert(nodal_dofs.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_dofs.size(), this->dofs_per_cell));
+  Assert(nodal_dofs.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_dofs.size(), this->n_dofs_per_cell()));
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
 
-  for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
     {
       const std::pair<unsigned int, unsigned int> index =
         this->system_to_component_index(i);
@@ -220,11 +220,12 @@ FE_Q_DG0<dim, spacedim>::get_interpolation_matrix(
       (dynamic_cast<const FEQDG0 *>(&x_source_fe) != nullptr),
     (typename FiniteElement<dim, spacedim>::ExcInterpolationNotImplemented()));
 
-  Assert(interpolation_matrix.m() == this->dofs_per_cell,
-         ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
-  Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+  Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
          ExcDimensionMismatch(interpolation_matrix.m(),
-                              x_source_fe.dofs_per_cell));
+                              this->n_dofs_per_cell()));
+  Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
+         ExcDimensionMismatch(interpolation_matrix.m(),
+                              x_source_fe.n_dofs_per_cell()));
 
   this->FE_Q_Base<TensorProductPolynomialsConst<dim>, dim, spacedim>::
     get_interpolation_matrix(x_source_fe, interpolation_matrix);
@@ -264,7 +265,7 @@ FE_Q_DG0<dim, spacedim>::has_support_on_face(
   const unsigned int face_index) const
 {
   // discontinuous function has support on all faces
-  if (shape_index == this->dofs_per_cell - 1)
+  if (shape_index == this->n_dofs_per_cell() - 1)
     return true;
   else
     return FE_Q_Base<TensorProductPolynomialsConst<dim>, dim, spacedim>::
@@ -277,14 +278,14 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_Q_DG0<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(2, this->dofs_per_cell);
+  Table<2, bool> constant_modes(2, this->n_dofs_per_cell());
 
   // 1 represented by FE_Q part
-  for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
     constant_modes(0, i) = true;
 
   // 1 represented by DG0 part
-  constant_modes(1, this->dofs_per_cell - 1) = true;
+  constant_modes(1, this->n_dofs_per_cell() - 1) = true;
 
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(2, 0));
index ea724014ab9fa5ed6587d12fcef8d9c9aec47343..d20ba0b49b0ac2a94ffe4e5d5f6870d271d59c6f 100644 (file)
@@ -57,19 +57,20 @@ namespace internal
 
 template <int dim>
 FE_Q_Hierarchical<dim>::FE_Q_Hierarchical(const unsigned int degree)
-  : FE_Poly<dim>(
-      TensorProductPolynomials<dim>(
-        Polynomials::Hierarchical::generate_complete_basis(degree)),
-      FiniteElementData<dim>(get_dpo_vector(degree),
-                             1,
-                             degree,
-                             FiniteElementData<dim>::H1),
-      std::vector<bool>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
-        false),
-      std::vector<ComponentMask>(
-        FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
-        std::vector<bool>(1, true)))
+  : FE_Poly<dim>(TensorProductPolynomials<dim>(
+                   Polynomials::Hierarchical::generate_complete_basis(degree)),
+                 FiniteElementData<dim>(get_dpo_vector(degree),
+                                        1,
+                                        degree,
+                                        FiniteElementData<dim>::H1),
+                 std::vector<bool>(
+                   FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+                     .n_dofs_per_cell(),
+                   false),
+                 std::vector<ComponentMask>(
+                   FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+                     .n_dofs_per_cell(),
+                   std::vector<bool>(1, true)))
   , face_renumber(face_fe_q_hierarchical_to_hierarchic_numbering(degree))
 {
   TensorProductPolynomials<dim> *poly_space_derived_ptr =
@@ -93,12 +94,12 @@ FE_Q_Hierarchical<dim>::FE_Q_Hierarchical(const unsigned int degree)
   // for all dimensions.
   std::vector<FullMatrix<double>> dofs_cell(
     GeometryInfo<1>::max_children_per_cell,
-    FullMatrix<double>(2 * this->dofs_per_vertex + this->dofs_per_line,
-                       2 * this->dofs_per_vertex + this->dofs_per_line));
+    FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
+                       2 * this->n_dofs_per_vertex() + this->dofs_per_line));
   std::vector<FullMatrix<double>> dofs_subcell(
     GeometryInfo<1>::max_children_per_cell,
-    FullMatrix<double>(2 * this->dofs_per_vertex + this->dofs_per_line,
-                       2 * this->dofs_per_vertex + this->dofs_per_line));
+    FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
+                       2 * this->n_dofs_per_vertex() + this->dofs_per_line));
   // build these fields, as they are
   // needed as auxiliary fields later
   // on
@@ -157,10 +158,10 @@ FE_Q_Hierarchical<dim>::get_interpolation_matrix(
     {
       // ok, source is a Q_Hierarchical element, so we will be able to do the
       // work
-      Assert(matrix.m() == this->dofs_per_cell,
-             ExcDimensionMismatch(matrix.m(), this->dofs_per_cell));
-      Assert(matrix.n() == source.dofs_per_cell,
-             ExcDimensionMismatch(matrix.m(), source_fe->dofs_per_cell));
+      Assert(matrix.m() == this->n_dofs_per_cell(),
+             ExcDimensionMismatch(matrix.m(), this->n_dofs_per_cell()));
+      Assert(matrix.n() == source.n_dofs_per_cell(),
+             ExcDimensionMismatch(matrix.m(), source_fe->n_dofs_per_cell()));
 
       // Recall that DoFs are renumbered in the following order:
       // vertices, lines, quads, hexes.
@@ -171,7 +172,7 @@ FE_Q_Hierarchical<dim>::get_interpolation_matrix(
       matrix = 0.;
 
       // distinguish between the case when we interpolate to a richer element
-      if (this->dofs_per_cell >= source_fe->dofs_per_cell)
+      if (this->n_dofs_per_cell() >= source_fe->n_dofs_per_cell())
         {
           const std::vector<unsigned int> dof_map =
             this->get_embedding_dofs(source_fe->degree);
@@ -388,7 +389,8 @@ FE_Q_Hierarchical<dim>::build_dofs_cell(
   std::vector<FullMatrix<double>> &dofs_cell,
   std::vector<FullMatrix<double>> &dofs_subcell) const
 {
-  const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+  const unsigned int dofs_1d =
+    2 * this->n_dofs_per_vertex() + this->dofs_per_line;
 
   // The dofs_subcell matrices are transposed
   // (4.19), (4.21) and (4.27),(4.28),(4.30) in
@@ -501,7 +503,8 @@ void
 FE_Q_Hierarchical<dim>::initialize_constraints(
   const std::vector<FullMatrix<double>> &dofs_subcell)
 {
-  const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+  const unsigned int dofs_1d =
+    2 * this->n_dofs_per_vertex() + this->dofs_per_line;
 
   this->interface_constraints.TableBase<2, double>::reinit(
     this->interface_constraints_size());
@@ -674,7 +677,8 @@ FE_Q_Hierarchical<dim>::initialize_embedding_and_restriction(
 {
   unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
 
-  const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+  const unsigned int dofs_1d =
+    2 * this->n_dofs_per_vertex() + this->dofs_per_line;
   TensorProductPolynomials<dim> *poly_space_derived_ptr =
     dynamic_cast<TensorProductPolynomials<dim> *>(this->poly_space.get());
   const std::vector<unsigned int> &renumber =
@@ -682,10 +686,10 @@ FE_Q_Hierarchical<dim>::initialize_embedding_and_restriction(
 
   for (unsigned int c = 0; c < GeometryInfo<dim>::max_children_per_cell; ++c)
     {
-      this->prolongation[iso][c].reinit(this->dofs_per_cell,
-                                        this->dofs_per_cell);
-      this->restriction[iso][c].reinit(this->dofs_per_cell,
-                                       this->dofs_per_cell);
+      this->prolongation[iso][c].reinit(this->n_dofs_per_cell(),
+                                        this->n_dofs_per_cell());
+      this->restriction[iso][c].reinit(this->n_dofs_per_cell(),
+                                       this->n_dofs_per_cell());
     }
 
   // the 1d case is particularly
@@ -711,8 +715,8 @@ FE_Q_Hierarchical<dim>::initialize_embedding_and_restriction(
   // i loops over the dofs in the
   // parent cell. These are the
   // columns in the embedding matrix.
-  for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       switch (dim)
         {
           case 2:
@@ -1950,7 +1954,7 @@ FE_Q_Hierarchical<dim>::hierarchic_to_fe_q_hierarchical_numbering(
   const FiniteElementData<dim> &fe)
 {
   Assert(fe.n_components() == 1, ExcInternalError());
-  std::vector<unsigned int> h2l(fe.dofs_per_cell);
+  std::vector<unsigned int> h2l(fe.n_dofs_per_cell());
 
   // polynomial degree
   const unsigned int degree = fe.dofs_per_line + 1;
@@ -1974,7 +1978,7 @@ FE_Q_Hierarchical<dim>::hierarchic_to_fe_q_hierarchical_numbering(
     {
       case 1:
         {
-          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+          for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
             h2l[i] = i;
 
           break;
@@ -2020,7 +2024,7 @@ FE_Q_Hierarchical<dim>::hierarchic_to_fe_q_hierarchical_numbering(
             for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
               h2l[next_index++] = (2 + i) * n + 2 + j;
 
-          Assert(next_index == fe.dofs_per_cell, ExcInternalError());
+          Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
 
           break;
         }
@@ -2106,7 +2110,7 @@ FE_Q_Hierarchical<dim>::hierarchic_to_fe_q_hierarchical_numbering(
               for (unsigned int k = 0; k < fe.dofs_per_line; ++k)
                 h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 2 + k;
 
-          Assert(next_index == fe.dofs_per_cell, ExcInternalError());
+          Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
 
           break;
         }
@@ -2146,7 +2150,7 @@ bool
 FE_Q_Hierarchical<1>::has_support_on_face(const unsigned int shape_index,
                                           const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<1>::faces_per_cell);
 
 
@@ -2167,7 +2171,7 @@ bool
 FE_Q_Hierarchical<dim>::has_support_on_face(const unsigned int shape_index,
                                             const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // first, special-case interior
@@ -2275,8 +2279,8 @@ FE_Q_Hierarchical<dim>::get_embedding_dofs(const unsigned int sub_degree) const
     }
   else if (sub_degree == this->degree)
     {
-      std::vector<unsigned int> embedding_dofs(this->dofs_per_cell);
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+      std::vector<unsigned int> embedding_dofs(this->n_dofs_per_cell());
+      for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
         embedding_dofs[i] = i;
 
       return embedding_dofs;
@@ -2392,11 +2396,11 @@ template <int dim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_Q_Hierarchical<dim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
   for (const unsigned int i : GeometryInfo<dim>::vertex_indices())
     constant_modes(0, i) = true;
   for (unsigned int i = GeometryInfo<dim>::vertices_per_cell;
-       i < this->dofs_per_cell;
+       i < this->n_dofs_per_cell();
        ++i)
     constant_modes(0, i) = false;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
index 9447a49032567b32a015c7e01a54a4793f0c7b34..27a01ea3ceab2b0d5c2f718be45428f0ce0ea435 100644 (file)
@@ -84,9 +84,9 @@ FE_Q_iso_Q1<dim, spacedim>::
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
index 84f532b573ca3f7c621aef0103c699e2cc896502..cab89759c079b389d2419ac8c5d9b58b73988b95 100644 (file)
@@ -115,7 +115,7 @@ FE_RannacherTurek<dim>::convert_generalized_support_point_values_to_dof_values(
 {
   AssertDimension(support_point_values.size(),
                   this->generalized_support_points.size());
-  AssertDimension(nodal_values.size(), this->dofs_per_cell);
+  AssertDimension(nodal_values.size(), this->n_dofs_per_cell());
 
   const unsigned int q_points_per_face = this->weights.size();
   std::fill(nodal_values.begin(), nodal_values.end(), 0.0);
index 47d6a43dde4fa0899e4c7e0bcc3a4ba520d50614..a24c029a6d05df841184a44b9817c9d89fbf9e29 100644 (file)
@@ -58,7 +58,7 @@ FE_RaviartThomas<dim>::FE_RaviartThomas(const unsigned int deg)
                                  std::vector<bool>(dim, true)))
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_raviart_thomas};
   // First, initialize the
@@ -280,10 +280,10 @@ FE_RaviartThomas<dim>::initialize_restriction()
       // Store shape values, since the
       // evaluation suffers if not
       // ordered by point
-      Table<2, double> cached_values_on_face(this->dofs_per_cell,
+      Table<2, double> cached_values_on_face(this->n_dofs_per_cell(),
                                              q_face.size());
       for (unsigned int k = 0; k < q_face.size(); ++k)
-        for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
           cached_values_on_face(i, k) = this->shape_value_component(
             i, q_face.point(k), GeometryInfo<dim>::unit_normal_direction[face]);
 
@@ -312,7 +312,7 @@ FE_RaviartThomas<dim>::initialize_restriction()
           // corresponding shape
           // functions.
           for (unsigned int k = 0; k < n_face_points; ++k)
-            for (unsigned int i_child = 0; i_child < this->dofs_per_cell;
+            for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
                  ++i_child)
               for (unsigned int i_face = 0; i_face < this->dofs_per_face;
                    ++i_face)
@@ -360,11 +360,11 @@ FE_RaviartThomas<dim>::initialize_restriction()
   // Store shape values, since the
   // evaluation suffers if not
   // ordered by point
-  Table<3, double> cached_values_on_cell(this->dofs_per_cell,
+  Table<3, double> cached_values_on_cell(this->n_dofs_per_cell(),
                                          q_cell.size(),
                                          dim);
   for (unsigned int k = 0; k < q_cell.size(); ++k)
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       for (unsigned int d = 0; d < dim; ++d)
         cached_values_on_cell(i, k, d) =
           this->shape_value_component(i, q_cell.point(k), d);
@@ -375,7 +375,8 @@ FE_RaviartThomas<dim>::initialize_restriction()
       Quadrature<dim> q_sub = QProjector<dim>::project_to_child(q_cell, child);
 
       for (unsigned int k = 0; k < q_sub.size(); ++k)
-        for (unsigned int i_child = 0; i_child < this->dofs_per_cell; ++i_child)
+        for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
+             ++i_child)
           for (unsigned int d = 0; d < dim; ++d)
             for (unsigned int i_weight = 0; i_weight < polynomials[d]->n();
                  ++i_weight)
@@ -417,9 +418,9 @@ template <int dim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_RaviartThomas<dim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(dim, this->dofs_per_cell);
+  Table<2, bool> constant_modes(dim, this->n_dofs_per_cell());
   for (unsigned int d = 0; d < dim; ++d)
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       constant_modes(d, i) = true;
   std::vector<unsigned int> components;
   for (unsigned int d = 0; d < dim; ++d)
@@ -440,7 +441,7 @@ bool
 FE_RaviartThomas<dim>::has_support_on_face(const unsigned int shape_index,
                                            const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // Return computed values if we
@@ -486,8 +487,8 @@ FE_RaviartThomas<dim>::convert_generalized_support_point_values_to_dof_values(
   Assert(support_point_values.size() == this->generalized_support_points.size(),
          ExcDimensionMismatch(support_point_values.size(),
                               this->generalized_support_points.size()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
index 895ba4c29d2aaacce5f637c5ed5e63344f2380ed..8e5f9161e26be536185ad0b9df3e081aecdfa98f 100644 (file)
@@ -49,7 +49,7 @@ FE_RaviartThomasNodal<dim>::FE_RaviartThomasNodal(const unsigned int deg)
                          std::vector<bool>(dim, true)))
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_raviart_thomas};
   // First, initialize the
@@ -147,7 +147,7 @@ template <int dim>
 void
 FE_RaviartThomasNodal<dim>::initialize_support_points(const unsigned int deg)
 {
-  this->generalized_support_points.resize(this->dofs_per_cell);
+  this->generalized_support_points.resize(this->n_dofs_per_cell());
   this->generalized_face_support_points.resize(this->dofs_per_face);
 
   // Number of the point being entered
@@ -211,7 +211,7 @@ FE_RaviartThomasNodal<dim>::initialize_support_points(const unsigned int deg)
       for (unsigned int k = 0; k < quadrature->size(); ++k)
         this->generalized_support_points[current++] = quadrature->point(k);
     }
-  Assert(current == this->dofs_per_cell, ExcInternalError());
+  Assert(current == this->n_dofs_per_cell(), ExcInternalError());
 }
 
 
@@ -278,7 +278,7 @@ FE_RaviartThomasNodal<dim>::has_support_on_face(
   const unsigned int shape_index,
   const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // The first degrees of freedom are
@@ -310,8 +310,8 @@ FE_RaviartThomasNodal<dim>::
   Assert(support_point_values.size() == this->generalized_support_points.size(),
          ExcDimensionMismatch(support_point_values.size(),
                               this->generalized_support_points.size()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
@@ -334,11 +334,11 @@ FE_RaviartThomasNodal<dim>::
 
   // The remaining points form dim
   // chunks, one for each component.
-  const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
-  Assert((this->dofs_per_cell - fbase) % dim == 0, ExcInternalError());
+  const unsigned int istep = (this->n_dofs_per_cell() - fbase) / dim;
+  Assert((this->n_dofs_per_cell() - fbase) % dim == 0, ExcInternalError());
 
   f = 0;
-  while (fbase < this->dofs_per_cell)
+  while (fbase < this->n_dofs_per_cell())
     {
       for (unsigned int i = 0; i < istep; ++i)
         {
@@ -347,7 +347,7 @@ FE_RaviartThomasNodal<dim>::
       fbase += istep;
       ++f;
     }
-  Assert(fbase == this->dofs_per_cell, ExcInternalError());
+  Assert(fbase == this->n_dofs_per_cell(), ExcInternalError());
 }
 
 
index beb7e69407484c0f58b400b1cf6328fc379548fe..d4d3554fcc1bb3b3c48979e312607ea450092546 100644 (file)
@@ -52,7 +52,7 @@ FE_RT_Bubbles<dim>::FE_RT_Bubbles(const unsigned int deg)
     deg >= 1,
     ExcMessage(
       "Lowest order RT_Bubbles element is degree 1, but you requested for degree 0"));
-  const unsigned int n_dofs = this->dofs_per_cell;
+  const unsigned int n_dofs = this->n_dofs_per_cell();
 
   this->mapping_kind = {mapping_raviart_thomas};
   // Initialize support points and quadrature weights
@@ -131,7 +131,7 @@ template <int dim>
 void
 FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
 {
-  this->generalized_support_points.resize(this->dofs_per_cell);
+  this->generalized_support_points.resize(this->n_dofs_per_cell());
   this->generalized_face_support_points.resize(this->dofs_per_face);
 
   // Index of the point being entered
@@ -197,7 +197,7 @@ FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
       for (unsigned int k = 0; k < quadrature->size(); ++k)
         this->generalized_support_points[current++] = quadrature->point(k);
     }
-  Assert(current == this->dofs_per_cell, ExcInternalError());
+  Assert(current == this->n_dofs_per_cell(), ExcInternalError());
 }
 
 
@@ -266,8 +266,8 @@ FE_RT_Bubbles<dim>::convert_generalized_support_point_values_to_dof_values(
   Assert(support_point_values.size() == this->generalized_support_points.size(),
          ExcDimensionMismatch(support_point_values.size(),
                               this->generalized_support_points.size()));
-  Assert(nodal_values.size() == this->dofs_per_cell,
-         ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+  Assert(nodal_values.size() == this->n_dofs_per_cell(),
+         ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
   Assert(support_point_values[0].size() == this->n_components(),
          ExcDimensionMismatch(support_point_values[0].size(),
                               this->n_components()));
@@ -287,11 +287,11 @@ FE_RT_Bubbles<dim>::convert_generalized_support_point_values_to_dof_values(
     }
 
   // The remaining points form dim chunks, one for each component.
-  const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
-  Assert((this->dofs_per_cell - fbase) % dim == 0, ExcInternalError());
+  const unsigned int istep = (this->n_dofs_per_cell() - fbase) / dim;
+  Assert((this->n_dofs_per_cell() - fbase) % dim == 0, ExcInternalError());
 
   f = 0;
-  while (fbase < this->dofs_per_cell)
+  while (fbase < this->n_dofs_per_cell())
     {
       for (unsigned int i = 0; i < istep; ++i)
         {
@@ -300,7 +300,7 @@ FE_RT_Bubbles<dim>::convert_generalized_support_point_values_to_dof_values(
       fbase += istep;
       ++f;
     }
-  Assert(fbase == this->dofs_per_cell, ExcInternalError());
+  Assert(fbase == this->n_dofs_per_cell(), ExcInternalError());
 }
 
 
index 814592253b4b154c2871b533d0335fc98af26047..5fb7aede3b151000f21cb1315cec8990f3218bd8 100644 (file)
@@ -97,11 +97,12 @@ namespace
 
     if (fourier_transform_matrices[fe].m() == 0)
       {
-        fourier_transform_matrices[fe].reinit(n_coefficients_per_direction[fe],
-                                              fe_collection[fe].dofs_per_cell);
+        fourier_transform_matrices[fe].reinit(
+          n_coefficients_per_direction[fe],
+          fe_collection[fe].n_dofs_per_cell());
 
         for (unsigned int k = 0; k < n_coefficients_per_direction[fe]; ++k)
-          for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+          for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell(); ++j)
             fourier_transform_matrices[fe](k, j) =
               integrate(fe_collection[fe], q_collection[fe], k_vectors(k), j);
       }
@@ -123,13 +124,14 @@ namespace
       {
         fourier_transform_matrices[fe].reinit(
           Utilities::fixed_power<2>(n_coefficients_per_direction[fe]),
-          fe_collection[fe].dofs_per_cell);
+          fe_collection[fe].n_dofs_per_cell());
 
         unsigned int k = 0;
         for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
           for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe];
                ++k2, ++k)
-            for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+            for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+                 ++j)
               fourier_transform_matrices[fe](k, j) = integrate(
                 fe_collection[fe], q_collection[fe], k_vectors(k1, k2), j);
       }
@@ -151,14 +153,15 @@ namespace
       {
         fourier_transform_matrices[fe].reinit(
           Utilities::fixed_power<3>(n_coefficients_per_direction[fe]),
-          fe_collection[fe].dofs_per_cell);
+          fe_collection[fe].n_dofs_per_cell());
 
         unsigned int k = 0;
         for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
           for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe]; ++k2)
             for (unsigned int k3 = 0; k3 < n_coefficients_per_direction[fe];
                  ++k3, ++k)
-              for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+              for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+                   ++j)
                 fourier_transform_matrices[fe](k, j) =
                   integrate(fe_collection[fe],
                             q_collection[fe],
index 17e1a7739bf062c9a14665eed2db5d46eee02322..c2c63f09236b3719df2d43ba2cc60e219c166355 100644 (file)
@@ -118,11 +118,12 @@ namespace
 
     if (legendre_transform_matrices[fe].m() == 0)
       {
-        legendre_transform_matrices[fe].reinit(n_coefficients_per_direction[fe],
-                                               fe_collection[fe].dofs_per_cell);
+        legendre_transform_matrices[fe].reinit(
+          n_coefficients_per_direction[fe],
+          fe_collection[fe].n_dofs_per_cell());
 
         for (unsigned int k = 0; k < n_coefficients_per_direction[fe]; ++k)
-          for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+          for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell(); ++j)
             legendre_transform_matrices[fe](k, j) = integrate(
               fe_collection[fe], q_collection[fe], TableIndices<1>(k), j);
       }
@@ -143,13 +144,14 @@ namespace
       {
         legendre_transform_matrices[fe].reinit(
           Utilities::fixed_power<2>(n_coefficients_per_direction[fe]),
-          fe_collection[fe].dofs_per_cell);
+          fe_collection[fe].n_dofs_per_cell());
 
         unsigned int k = 0;
         for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
           for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe];
                ++k2, k++)
-            for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+            for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+                 ++j)
               legendre_transform_matrices[fe](k, j) =
                 integrate(fe_collection[fe],
                           q_collection[fe],
@@ -173,14 +175,15 @@ namespace
       {
         legendre_transform_matrices[fe].reinit(
           Utilities::fixed_power<3>(n_coefficients_per_direction[fe]),
-          fe_collection[fe].dofs_per_cell);
+          fe_collection[fe].n_dofs_per_cell());
 
         unsigned int k = 0;
         for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
           for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe]; ++k2)
             for (unsigned int k3 = 0; k3 < n_coefficients_per_direction[fe];
                  ++k3, k++)
-              for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+              for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+                   ++j)
                 legendre_transform_matrices[fe](k, j) =
                   integrate(fe_collection[fe],
                             q_collection[fe],
index c7cbacd62540f0cde929b535a22d6d27f2d6238a..c65c2b99ce3d183752a128f1e675ad6e0d8c7ee4 100644 (file)
@@ -386,7 +386,7 @@ double
 FESystem<dim, spacedim>::shape_value(const unsigned int i,
                                      const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   Assert(this->is_primitive(i),
          (typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
            i)));
@@ -404,7 +404,7 @@ FESystem<dim, spacedim>::shape_value_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, this->n_components());
 
   // if this value is supposed to be
@@ -438,7 +438,7 @@ Tensor<1, dim>
 FESystem<dim, spacedim>::shape_grad(const unsigned int i,
                                     const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   Assert(this->is_primitive(i),
          (typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
            i)));
@@ -456,7 +456,7 @@ FESystem<dim, spacedim>::shape_grad_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, this->n_components());
 
   // if this value is supposed to be zero, then return right away...
@@ -483,7 +483,7 @@ Tensor<2, dim>
 FESystem<dim, spacedim>::shape_grad_grad(const unsigned int i,
                                          const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   Assert(this->is_primitive(i),
          (typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
            i)));
@@ -501,7 +501,7 @@ FESystem<dim, spacedim>::shape_grad_grad_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, this->n_components());
 
   // if this value is supposed to be zero, then return right away...
@@ -528,7 +528,7 @@ Tensor<3, dim>
 FESystem<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
                                               const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   Assert(this->is_primitive(i),
          (typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
            i)));
@@ -546,7 +546,7 @@ FESystem<dim, spacedim>::shape_3rd_derivative_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, this->n_components());
 
   // if this value is supposed to be zero, then return right away...
@@ -573,7 +573,7 @@ Tensor<4, dim>
 FESystem<dim, spacedim>::shape_4th_derivative(const unsigned int i,
                                               const Point<dim> & p) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   Assert(this->is_primitive(i),
          (typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
            i)));
@@ -591,7 +591,7 @@ FESystem<dim, spacedim>::shape_4th_derivative_component(
   const Point<dim> & p,
   const unsigned int component) const
 {
-  AssertIndexRange(i, this->dofs_per_cell);
+  AssertIndexRange(i, this->n_dofs_per_cell());
   AssertIndexRange(component, this->n_components());
 
   // if this value is supposed to be zero, then return right away...
@@ -623,13 +623,14 @@ FESystem<dim, spacedim>::get_interpolation_matrix(
   // reasons, if you call matrix.reinit(8,0), it sets the sizes
   // to m==n==0 internally. this may happen when we use a FE_Nothing,
   // so write the test in a more lenient way
-  Assert((interpolation_matrix.m() == this->dofs_per_cell) ||
-           (x_source_fe.dofs_per_cell == 0),
-         ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
-  Assert((interpolation_matrix.n() == x_source_fe.dofs_per_cell) ||
-           (this->dofs_per_cell == 0),
+  Assert((interpolation_matrix.m() == this->n_dofs_per_cell()) ||
+           (x_source_fe.n_dofs_per_cell() == 0),
          ExcDimensionMismatch(interpolation_matrix.m(),
-                              x_source_fe.dofs_per_cell));
+                              this->n_dofs_per_cell()));
+  Assert((interpolation_matrix.n() == x_source_fe.n_dofs_per_cell()) ||
+           (this->n_dofs_per_cell() == 0),
+         ExcDimensionMismatch(interpolation_matrix.m(),
+                              x_source_fe.n_dofs_per_cell()));
 
   // there are certain conditions that the two elements have to satisfy so
   // that this can work.
@@ -667,8 +668,8 @@ FESystem<dim, spacedim>::get_interpolation_matrix(
   std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
   for (unsigned int i = 0; i < this->n_base_elements(); ++i)
     {
-      base_matrices[i].reinit(base_element(i).dofs_per_cell,
-                              source_fe.base_element(i).dofs_per_cell);
+      base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
+                              source_fe.base_element(i).n_dofs_per_cell());
       base_element(i).get_interpolation_matrix(source_fe.base_element(i),
                                                base_matrices[i]);
     }
@@ -677,8 +678,8 @@ FESystem<dim, spacedim>::get_interpolation_matrix(
   // different bases (or multiplicity indices) are really zero. then assign
   // entries
   interpolation_matrix = 0;
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-    for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+    for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
       if (this->system_to_base_table[i].first ==
           source_fe.system_to_base_table[j].first)
         interpolation_matrix(i, j) =
@@ -709,7 +710,7 @@ FESystem<dim, spacedim>::get_restriction_matrix(
 
       // check if updated while waiting for lock
       if (this->restriction[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->restriction[refinement_case - 1][child];
 
       // Check if some of the matrices of the base elements are void.
@@ -723,7 +724,7 @@ FESystem<dim, spacedim>::get_restriction_matrix(
         {
           base_matrices[i] =
             &base_element(i).get_restriction_matrix(child, refinement_case);
-          if (base_matrices[i]->n() != base_element(i).dofs_per_cell)
+          if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
             do_restriction = false;
         }
       Assert(do_restriction,
@@ -732,8 +733,8 @@ FESystem<dim, spacedim>::get_restriction_matrix(
       // if we did not encounter void matrices, initialize the matrix sizes
       if (do_restriction)
         {
-          FullMatrix<double> restriction(this->dofs_per_cell,
-                                         this->dofs_per_cell);
+          FullMatrix<double> restriction(this->n_dofs_per_cell(),
+                                         this->n_dofs_per_cell());
 
           // distribute the matrices of the base finite elements to the
           // matrices of this object. for this, loop over all degrees of
@@ -743,8 +744,8 @@ FESystem<dim, spacedim>::get_restriction_matrix(
           // note that we by definition of a base element, they are
           // independent, i.e. do not couple. only DoFs that belong to the
           // same instance of a base element may couple
-          for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-            for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+          for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+            for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
               {
                 // first find out to which base element indices i and j
                 // belong, and which instance thereof in case the base element
@@ -800,7 +801,7 @@ FESystem<dim, spacedim>::get_prolongation_matrix(
       std::lock_guard<std::mutex> lock(this->mutex);
 
       if (this->prolongation[refinement_case - 1][child].n() ==
-          this->dofs_per_cell)
+          this->n_dofs_per_cell())
         return this->prolongation[refinement_case - 1][child];
 
       bool                                    do_prolongation = true;
@@ -810,7 +811,7 @@ FESystem<dim, spacedim>::get_prolongation_matrix(
         {
           base_matrices[i] =
             &base_element(i).get_prolongation_matrix(child, refinement_case);
-          if (base_matrices[i]->n() != base_element(i).dofs_per_cell)
+          if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
             do_prolongation = false;
         }
       Assert(do_prolongation,
@@ -818,11 +819,11 @@ FESystem<dim, spacedim>::get_prolongation_matrix(
 
       if (do_prolongation)
         {
-          FullMatrix<double> prolongate(this->dofs_per_cell,
-                                        this->dofs_per_cell);
+          FullMatrix<double> prolongate(this->n_dofs_per_cell(),
+                                        this->n_dofs_per_cell());
 
-          for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-            for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+          for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+            for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
               {
                 if (this->system_to_base_table[i].first !=
                     this->system_to_base_table[j].first)
@@ -875,7 +876,7 @@ FESystem<dim, spacedim>::face_to_cell_index(const unsigned int face_dof_index,
   // to the one we're interested in -- crude, maybe, but works for now
   const std::pair<std::pair<unsigned int, unsigned int>, unsigned int> target =
     std::make_pair(face_base_index.first, base_face_to_cell_index);
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     if (this->system_to_base_index(i) == target)
       return i;
 
@@ -1324,13 +1325,15 @@ FESystem<dim, spacedim>::compute_fill(
         // also in case we detected a cell similarity (but no heavy work will
         // be done inside the individual elements in case we have a
         // translation and simple elements).
-        for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+        for (unsigned int system_index = 0;
+             system_index < this->n_dofs_per_cell();
              ++system_index)
           if (this->system_to_base_table[system_index].first.first == base_no)
             {
               const unsigned int base_index =
                 this->system_to_base_table[system_index].second;
-              Assert(base_index < base_fe.dofs_per_cell, ExcInternalError());
+              Assert(base_index < base_fe.n_dofs_per_cell(),
+                     ExcInternalError());
 
               // now copy. if the shape function is primitive, then there
               // is only one value to be copied, but for non-primitive
@@ -1441,15 +1444,15 @@ FESystem<dim, spacedim>::build_interface_constraints()
                 // order is the same as for the first vertex of the whole cell,
                 // so we can use the system_to_base_table variable (using the
                 // face_s_t_base_t function would yield the same)
-                if (m < this->dofs_per_vertex)
+                if (m < this->n_dofs_per_vertex())
                   m_index = this->system_to_base_table[m];
                 else
                   // then come the two sets of line indices
                   {
                     const unsigned int index_in_line =
-                      (m - this->dofs_per_vertex) % this->dofs_per_line;
+                      (m - this->n_dofs_per_vertex()) % this->dofs_per_line;
                     const unsigned int sub_line =
-                      (m - this->dofs_per_vertex) / this->dofs_per_line;
+                      (m - this->n_dofs_per_vertex()) / this->dofs_per_line;
                     Assert(sub_line < 2, ExcInternalError());
 
                     // from this information, try to get base element and
@@ -1457,7 +1460,7 @@ FESystem<dim, spacedim>::build_interface_constraints()
                     // corresponding face index of m in the present element,
                     // then use face_system_to_base_table
                     const unsigned int tmp1 =
-                      2 * this->dofs_per_vertex + index_in_line;
+                      2 * this->n_dofs_per_vertex() + index_in_line;
                     m_index.first = this->face_system_to_base_table[tmp1].first;
 
                     // what we are still missing is the index of m within the
@@ -1469,18 +1472,18 @@ FESystem<dim, spacedim>::build_interface_constraints()
                     // dof, we can construct the rest: tmp2 will denote the
                     // index of this shape function among the line shape
                     // functions:
-                    Assert(
-                      this->face_system_to_base_table[tmp1].second >=
-                        2 * base_element(m_index.first.first).dofs_per_vertex,
-                      ExcInternalError());
+                    Assert(this->face_system_to_base_table[tmp1].second >=
+                             2 * base_element(m_index.first.first)
+                                   .n_dofs_per_vertex(),
+                           ExcInternalError());
                     const unsigned int tmp2 =
                       this->face_system_to_base_table[tmp1].second -
-                      2 * base_element(m_index.first.first).dofs_per_vertex;
+                      2 * base_element(m_index.first.first).n_dofs_per_vertex();
                     Assert(tmp2 <
                              base_element(m_index.first.first).dofs_per_line,
                            ExcInternalError());
                     m_index.second =
-                      base_element(m_index.first.first).dofs_per_vertex +
+                      base_element(m_index.first.first).n_dofs_per_vertex() +
                       base_element(m_index.first.first).dofs_per_line *
                         sub_line +
                       tmp2;
@@ -1495,35 +1498,37 @@ FESystem<dim, spacedim>::build_interface_constraints()
                 // the indices m=0..5*d_v-1 are from the center and the four
                 // subline vertices.  their order is the same as for the first
                 // vertex of the whole cell, so we can use the simple arithmetic
-                if (m < 5 * this->dofs_per_vertex)
+                if (m < 5 * this->n_dofs_per_vertex())
                   m_index = this->system_to_base_table[m];
                 else
                   // then come the 12 sets of line indices
-                  if (m < 5 * this->dofs_per_vertex + 12 * this->dofs_per_line)
+                  if (m <
+                      5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line)
                   {
                     // for the meaning of all this, see the 2d part
                     const unsigned int index_in_line =
-                      (m - 5 * this->dofs_per_vertex) % this->dofs_per_line;
+                      (m - 5 * this->n_dofs_per_vertex()) % this->dofs_per_line;
                     const unsigned int sub_line =
-                      (m - 5 * this->dofs_per_vertex) / this->dofs_per_line;
+                      (m - 5 * this->n_dofs_per_vertex()) / this->dofs_per_line;
                     Assert(sub_line < 12, ExcInternalError());
 
                     const unsigned int tmp1 =
-                      4 * this->dofs_per_vertex + index_in_line;
+                      4 * this->n_dofs_per_vertex() + index_in_line;
                     m_index.first = this->face_system_to_base_table[tmp1].first;
 
-                    Assert(
-                      this->face_system_to_base_table[tmp1].second >=
-                        4 * base_element(m_index.first.first).dofs_per_vertex,
-                      ExcInternalError());
+                    Assert(this->face_system_to_base_table[tmp1].second >=
+                             4 * base_element(m_index.first.first)
+                                   .n_dofs_per_vertex(),
+                           ExcInternalError());
                     const unsigned int tmp2 =
                       this->face_system_to_base_table[tmp1].second -
-                      4 * base_element(m_index.first.first).dofs_per_vertex;
+                      4 * base_element(m_index.first.first).n_dofs_per_vertex();
                     Assert(tmp2 <
                              base_element(m_index.first.first).dofs_per_line,
                            ExcInternalError());
                     m_index.second =
-                      5 * base_element(m_index.first.first).dofs_per_vertex +
+                      5 *
+                        base_element(m_index.first.first).n_dofs_per_vertex() +
                       base_element(m_index.first.first).dofs_per_line *
                         sub_line +
                       tmp2;
@@ -1533,18 +1538,18 @@ FESystem<dim, spacedim>::build_interface_constraints()
                   {
                     // for the meaning of all this, see the 2d part
                     const unsigned int index_in_quad =
-                      (m - 5 * this->dofs_per_vertex -
+                      (m - 5 * this->n_dofs_per_vertex() -
                        12 * this->dofs_per_line) %
                       this->dofs_per_quad;
                     Assert(index_in_quad < this->dofs_per_quad,
                            ExcInternalError());
                     const unsigned int sub_quad =
-                      ((m - 5 * this->dofs_per_vertex -
+                      ((m - 5 * this->n_dofs_per_vertex() -
                         12 * this->dofs_per_line) /
                        this->dofs_per_quad);
                     Assert(sub_quad < 4, ExcInternalError());
 
-                    const unsigned int tmp1 = 4 * this->dofs_per_vertex +
+                    const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
                                               4 * this->dofs_per_line +
                                               index_in_quad;
                     Assert(tmp1 < this->face_system_to_base_table.size(),
@@ -1553,18 +1558,21 @@ FESystem<dim, spacedim>::build_interface_constraints()
 
                     Assert(
                       this->face_system_to_base_table[tmp1].second >=
-                        4 * base_element(m_index.first.first).dofs_per_vertex +
+                        4 * base_element(m_index.first.first)
+                              .n_dofs_per_vertex() +
                           4 * base_element(m_index.first.first).dofs_per_line,
                       ExcInternalError());
                     const unsigned int tmp2 =
                       this->face_system_to_base_table[tmp1].second -
-                      4 * base_element(m_index.first.first).dofs_per_vertex -
+                      4 *
+                        base_element(m_index.first.first).n_dofs_per_vertex() -
                       4 * base_element(m_index.first.first).dofs_per_line;
                     Assert(tmp2 <
                              base_element(m_index.first.first).dofs_per_quad,
                            ExcInternalError());
                     m_index.second =
-                      5 * base_element(m_index.first.first).dofs_per_vertex +
+                      5 *
+                        base_element(m_index.first.first).n_dofs_per_vertex() +
                       12 * base_element(m_index.first.first).dofs_per_line +
                       base_element(m_index.first.first).dofs_per_quad *
                         sub_quad +
@@ -1634,7 +1642,7 @@ FESystem<dim, spacedim>::initialize(
   {
     // If the system is not primitive, these have not been initialized by
     // FiniteElement
-    this->system_to_component_table.resize(this->dofs_per_cell);
+    this->system_to_component_table.resize(this->n_dofs_per_cell());
     this->face_system_to_component_table.resize(this->dofs_per_face);
 
     FETools::Compositing::build_cell_tables(this->system_to_base_table,
@@ -1664,16 +1672,16 @@ FESystem<dim, spacedim>::initialize(
     // logic.
     for (unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
       if (!base_element(base_el).has_support_points() &&
-          base_element(base_el).dofs_per_cell != 0)
+          base_element(base_el).n_dofs_per_cell() != 0)
         {
           this->unit_support_points.resize(0);
           return;
         }
 
     // generate unit support points from unit support points of sub elements
-    this->unit_support_points.resize(this->dofs_per_cell);
+    this->unit_support_points.resize(this->n_dofs_per_cell());
 
-    for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
       {
         const unsigned int base = this->system_to_base_table[i].first.first,
                            base_index = this->system_to_base_table[i].second;
@@ -2308,8 +2316,8 @@ template <int dim, int spacedim>
 Point<dim>
 FESystem<dim, spacedim>::unit_support_point(const unsigned int index) const
 {
-  AssertIndexRange(index, this->dofs_per_cell);
-  Assert((this->unit_support_points.size() == this->dofs_per_cell) ||
+  AssertIndexRange(index, this->n_dofs_per_cell());
+  Assert((this->unit_support_points.size() == this->n_dofs_per_cell()) ||
            (this->unit_support_points.size() == 0),
          (typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
 
@@ -2354,7 +2362,7 @@ FESystem<dim, spacedim>::get_constant_modes() const
   // Note that this->n_components() is actually only an estimate of how many
   // constant modes we will need. There might be more than one such mode
   // (e.g. FE_Q_DG0).
-  Table<2, bool> constant_modes(this->n_components(), this->dofs_per_cell);
+  Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
   std::vector<unsigned int> components;
   for (unsigned int i = 0; i < base_elements.size(); ++i)
     {
@@ -2374,14 +2382,14 @@ FESystem<dim, spacedim>::get_constant_modes() const
                                                      element_multiplicity,
                                             constant_modes.n_cols());
           for (unsigned int r = 0; r < comp; ++r)
-            for (unsigned int c = 0; c < this->dofs_per_cell; ++c)
+            for (unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
               new_constant_modes(r, c) = constant_modes(r, c);
           constant_modes.swap(new_constant_modes);
         }
 
       // next, fill the constant modes from the individual components as well
       // as the component numbers corresponding to the constant mode rows
-      for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+      for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
         {
           std::pair<std::pair<unsigned int, unsigned int>, unsigned int> ind =
             this->system_to_base_index(k);
@@ -2414,7 +2422,7 @@ FESystem<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
 
   AssertDimension(point_values.size(),
                   this->get_generalized_support_points().size());
-  AssertDimension(dof_values.size(), this->dofs_per_cell);
+  AssertDimension(dof_values.size(), this->n_dofs_per_cell());
 
   std::vector<double>         base_dof_values;
   std::vector<Vector<double>> base_point_values;
@@ -2430,7 +2438,7 @@ FESystem<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
       // number of components we're dealing with.
       const auto &       base_element      = this->base_element(base);
       const unsigned int multiplicity      = this->element_multiplicity(base);
-      const unsigned int n_base_dofs       = base_element.dofs_per_cell;
+      const unsigned int n_base_dofs       = base_element.n_dofs_per_cell();
       const unsigned int n_base_components = base_element.n_components();
 
       // If the number of base degrees of freedom is zero, there is nothing
@@ -2481,7 +2489,7 @@ FESystem<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
               // function, but that doesn't exist -- just do it by using the
               // reverse table -- the amount of work done here is not worth
               // trying to optimizing this.
-              for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+              for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
                 if (this->system_to_base_index(i).first ==
                     std::make_pair(base, m))
                   dof_values[i] =
@@ -2498,7 +2506,7 @@ FESystem<dim, spacedim>::convert_generalized_support_point_values_to_dof_values(
           // reverse table -- the amount of work done here is not worth
           // trying to optimizing this.
           for (unsigned int m = 0; m < multiplicity; ++m)
-            for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+            for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
               if (this->system_to_base_index(i).first ==
                   std::make_pair(base, m))
                 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
index ff99eddce952565ed5b05bde3b593eadbb33af31..f1e4fc545f96827e3accf9183a5f4529cca80ebf 100644 (file)
@@ -59,8 +59,8 @@ FE_TraceQ<dim, spacedim>::FE_TraceQ(const unsigned int degree)
   // initialize unit support points (this makes it possible to assign initial
   // values to FE_TraceQ). Note that we simply take the points of fe_q but
   // skip the last ones which are associated with the interior of FE_Q.
-  this->unit_support_points.resize(this->dofs_per_cell);
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  this->unit_support_points.resize(this->n_dofs_per_cell());
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     this->unit_support_points[i] = fe_q.get_unit_support_points()[i];
 
   // Initialize constraint matrices
@@ -101,14 +101,14 @@ FE_TraceQ<dim, spacedim>::has_support_on_face(
   const unsigned int shape_index,
   const unsigned int face_index) const
 {
-  AssertIndexRange(shape_index, this->dofs_per_cell);
+  AssertIndexRange(shape_index, this->n_dofs_per_cell());
   AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
 
   // FE_TraceQ shares the numbering of elemental degrees of freedom with FE_Q
   // except for the missing interior ones (quad dofs in 2D and hex dofs in
   // 3D). Therefore, it is safe to ask fe_q for the corresponding
-  // information. The assertion 'shape_index < this->dofs_per_cell' will make
-  // sure that we only access the trace dofs.
+  // information. The assertion 'shape_index < this->n_dofs_per_cell()' will
+  // make sure that we only access the trace dofs.
   return fe_q.has_support_on_face(shape_index, face_index);
 }
 
@@ -118,8 +118,8 @@ template <int dim, int spacedim>
 std::pair<Table<2, bool>, std::vector<unsigned int>>
 FE_TraceQ<dim, spacedim>::get_constant_modes() const
 {
-  Table<2, bool> constant_modes(1, this->dofs_per_cell);
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     constant_modes(0, i) = true;
   return std::pair<Table<2, bool>, std::vector<unsigned int>>(
     constant_modes, std::vector<unsigned int>(1, 0));
@@ -135,9 +135,9 @@ FE_TraceQ<dim, spacedim>::
   AssertDimension(support_point_values.size(),
                   this->get_unit_support_points().size());
   AssertDimension(support_point_values.size(), nodal_values.size());
-  AssertDimension(this->dofs_per_cell, nodal_values.size());
+  AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
 
-  for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
     {
       AssertDimension(support_point_values[i].size(), 1);
 
index a8cdac76fcf34641e57ff006848025f2df58da8f..30a696b15f10978fb3fdbc0a89f1a18a4384552d 100644 (file)
@@ -79,9 +79,9 @@ namespace internal
   make_shape_function_to_row_table(const FiniteElement<dim, spacedim> &fe)
   {
     std::vector<unsigned int> shape_function_to_row_table(
-      fe.dofs_per_cell * fe.n_components(), numbers::invalid_unsigned_int);
+      fe.n_dofs_per_cell() * fe.n_components(), numbers::invalid_unsigned_int);
     unsigned int row = 0;
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       {
         // loop over all components that are nonzero for this particular
         // shape function. if a component is zero then we leave the
@@ -144,7 +144,7 @@ namespace FEValuesViews
                                 const unsigned int                 component)
     : fe_values(&fe_values)
     , component(component)
-    , shape_function_data(this->fe_values->fe->dofs_per_cell)
+    , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
   {
     const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
     AssertIndexRange(component, fe.n_components());
@@ -155,7 +155,7 @@ namespace FEValuesViews
     const std::vector<unsigned int> shape_function_to_row_table =
       dealii::internal::make_shape_function_to_row_table(fe);
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       {
         const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
 
@@ -189,7 +189,7 @@ namespace FEValuesViews
                                 const unsigned int first_vector_component)
     : fe_values(&fe_values)
     , first_vector_component(first_vector_component)
-    , shape_function_data(this->fe_values->fe->dofs_per_cell)
+    , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
   {
     const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
     AssertIndexRange(first_vector_component + spacedim - 1, fe.n_components());
@@ -204,7 +204,7 @@ namespace FEValuesViews
       {
         const unsigned int component = first_vector_component + d;
 
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           {
             const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
 
@@ -225,7 +225,7 @@ namespace FEValuesViews
           }
       }
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       {
         unsigned int n_nonzero_components = 0;
         for (unsigned int d = 0; d < spacedim; ++d)
@@ -268,7 +268,7 @@ namespace FEValuesViews
     const unsigned int                 first_tensor_component)
     : fe_values(&fe_values)
     , first_tensor_component(first_tensor_component)
-    , shape_function_data(this->fe_values->fe->dofs_per_cell)
+    , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
   {
     const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
     Assert(first_tensor_component + (dim * dim + dim) / 2 - 1 <
@@ -290,7 +290,7 @@ namespace FEValuesViews
       {
         const unsigned int component = first_tensor_component + d;
 
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           {
             const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
 
@@ -311,7 +311,7 @@ namespace FEValuesViews
           }
       }
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       {
         unsigned int n_nonzero_components = 0;
         for (unsigned int d = 0;
@@ -357,7 +357,7 @@ namespace FEValuesViews
                                    const unsigned int first_tensor_component)
     : fe_values(&fe_values)
     , first_tensor_component(first_tensor_component)
-    , shape_function_data(this->fe_values->fe->dofs_per_cell)
+    , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
   {
     const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
     AssertIndexRange(first_tensor_component + dim * dim - 1, fe.n_components());
@@ -371,7 +371,7 @@ namespace FEValuesViews
       {
         const unsigned int component = first_tensor_component + d;
 
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
           {
             const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
 
@@ -392,7 +392,7 @@ namespace FEValuesViews
           }
       }
 
-    for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+    for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
       {
         unsigned int n_nonzero_components = 0;
         for (unsigned int d = 0; d < dim * dim; ++d)
@@ -2839,10 +2839,10 @@ FEValuesBase<dim, spacedim>::CellIterator<CI>::get_interpolated_dof_values(
   Assert(cell->is_active(), ExcNotImplemented());
 
   std::vector<types::global_dof_index> dof_indices(
-    cell->get_fe().dofs_per_cell);
+    cell->get_fe().n_dofs_per_cell());
   cell->get_dof_indices(dof_indices);
 
-  for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell; ++i)
+  for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell(); ++i)
     out[i] = (in.is_element(dof_indices[i]) ? 1 : 0);
 }
 
@@ -3008,9 +3008,9 @@ namespace internal
       // count the total number of non-zero components accumulated
       // over all shape functions
       unsigned int n_nonzero_shape_components = 0;
-      for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+      for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
         n_nonzero_shape_components += fe.n_nonzero_components(i);
-      Assert(n_nonzero_shape_components >= fe.dofs_per_cell,
+      Assert(n_nonzero_shape_components >= fe.n_dofs_per_cell(),
              ExcInternalError());
 
       // with the number of rows now known, initialize those fields
@@ -3171,7 +3171,7 @@ namespace internal
 
     // see if there the current cell has DoFs at all, and if not
     // then there is nothing else to do.
-    const unsigned int dofs_per_cell = fe.dofs_per_cell;
+    const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
     if (dofs_per_cell == 0)
       return;
 
@@ -3322,7 +3322,7 @@ namespace internal
 
     // see if there the current cell has DoFs at all, and if not
     // then there is nothing else to do.
-    const unsigned int dofs_per_cell = fe.dofs_per_cell;
+    const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
     if (dofs_per_cell == 0)
       return;
 
@@ -3467,7 +3467,7 @@ namespace internal
 
     // see if there the current cell has DoFs at all, and if not
     // then there is nothing else to do.
-    const unsigned int dofs_per_cell = fe.dofs_per_cell;
+    const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
     if (dofs_per_cell == 0)
       return;
 
@@ -4388,7 +4388,7 @@ FEValues<dim, spacedim>::FEValues(const Mapping<dim, spacedim> &      mapping,
                                   const Quadrature<dim> &             q,
                                   const UpdateFlags update_flags)
   : FEValuesBase<dim, spacedim>(q.size(),
-                                fe.dofs_per_cell,
+                                fe.n_dofs_per_cell(),
                                 update_default,
                                 mapping,
                                 fe)
@@ -4404,7 +4404,7 @@ FEValues<dim, spacedim>::FEValues(const FiniteElement<dim, spacedim> &fe,
                                   const Quadrature<dim> &             q,
                                   const UpdateFlags update_flags)
   : FEValuesBase<dim, spacedim>(q.size(),
-                                fe.dofs_per_cell,
+                                fe.n_dofs_per_cell(),
                                 update_default,
                                 StaticMappingQ1<dim, spacedim>::mapping,
                                 fe)
@@ -4656,7 +4656,7 @@ FEFaceValues<dim, spacedim>::FEFaceValues(
   const Quadrature<dim - 1> &         quadrature,
   const UpdateFlags                   update_flags)
   : FEFaceValuesBase<dim, spacedim>(quadrature.size(),
-                                    fe.dofs_per_cell,
+                                    fe.n_dofs_per_cell(),
                                     update_flags,
                                     mapping,
                                     fe,
@@ -4673,7 +4673,7 @@ FEFaceValues<dim, spacedim>::FEFaceValues(
   const Quadrature<dim - 1> &         quadrature,
   const UpdateFlags                   update_flags)
   : FEFaceValuesBase<dim, spacedim>(quadrature.size(),
-                                    fe.dofs_per_cell,
+                                    fe.n_dofs_per_cell(),
                                     update_flags,
                                     StaticMappingQ1<dim, spacedim>::mapping,
                                     fe,
@@ -4855,7 +4855,7 @@ FESubfaceValues<dim, spacedim>::FESubfaceValues(
   const Quadrature<dim - 1> &         quadrature,
   const UpdateFlags                   update_flags)
   : FEFaceValuesBase<dim, spacedim>(quadrature.size(),
-                                    fe.dofs_per_cell,
+                                    fe.n_dofs_per_cell(),
                                     update_flags,
                                     mapping,
                                     fe,
@@ -4872,7 +4872,7 @@ FESubfaceValues<dim, spacedim>::FESubfaceValues(
   const Quadrature<dim - 1> &         quadrature,
   const UpdateFlags                   update_flags)
   : FEFaceValuesBase<dim, spacedim>(quadrature.size(),
-                                    fe.dofs_per_cell,
+                                    fe.n_dofs_per_cell(),
                                     update_flags,
                                     StaticMappingQ1<dim, spacedim>::mapping,
                                     fe,
index 4fb5ac57027c0c3fea1784740699d5dfb31240de..62824c3f647fc2e8b7bb7ecf0d94728aea8fa3e4 100644 (file)
@@ -63,10 +63,10 @@ MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::InternalData::
   InternalData(const FiniteElement<dim, spacedim> &fe,
                const ComponentMask &               mask)
   : unit_tangentials()
-  , n_shape_functions(fe.dofs_per_cell)
+  , n_shape_functions(fe.n_dofs_per_cell())
   , mask(mask)
-  , local_dof_indices(fe.dofs_per_cell)
-  , local_dof_values(fe.dofs_per_cell)
+  , local_dof_indices(fe.n_dofs_per_cell())
+  , local_dof_values(fe.n_dofs_per_cell())
 {}
 
 
@@ -384,7 +384,8 @@ MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::get_vertices(
     std::lock_guard<std::mutex> lock(fe_values_mutex);
     fe_values.reinit(dof_cell);
   }
-  const unsigned int dofs_per_cell = euler_dof_handler->get_fe().dofs_per_cell;
+  const unsigned int dofs_per_cell =
+    euler_dof_handler->get_fe().n_dofs_per_cell();
   std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
   if (uses_level_dofs)
     dof_cell->get_mg_dof_indices(dof_indices);
index 90fc1f8a9a3a168f2e7a73335b28af4bc209173a..36ff806f398071aa24a383f182f47a880a275277 100644 (file)
@@ -78,7 +78,7 @@ MappingQ1Eulerian<dim, VectorType, spacedim>::get_vertices(
 
   // now get the values of the shift vectors at the vertices
   Vector<typename VectorType::value_type> mapping_values(
-    shiftmap_dof_handler->get_fe().dofs_per_cell);
+    shiftmap_dof_handler->get_fe().n_dofs_per_cell());
   dof_cell->get_dof_values(*euler_transform_vectors, mapping_values);
 
   for (const unsigned int i : GeometryInfo<dim>::vertex_indices())
index d6734927486f64e9c1d6bbe8afcad8463ca2ee89..e10223f422f5b3b1405dfac13e066d3a750e7222 100644 (file)
@@ -212,7 +212,7 @@ MappingQEulerian<dim, VectorType, spacedim>::MappingQEulerianGeneric::
     n_support_pts, Vector<typename VectorType::value_type>(n_components));
 
   std::vector<types::global_dof_index> dof_indices(
-    mapping_q_eulerian.euler_dof_handler->get_fe(0).dofs_per_cell);
+    mapping_q_eulerian.euler_dof_handler->get_fe(0).n_dofs_per_cell());
   // fill shift vector for each support point using an fe_values object. make
   // sure that the fe_values variable isn't used simultaneously from different
   // threads
index 84f8b1c9e0645ccbf5d82e3cd61d654d2c6fcc4f..56248e8fec17b8745a08a24157f0f1ef6277193d 100644 (file)
@@ -1789,7 +1789,8 @@ namespace GridTools
         // cells including ghost cells
         if (cell->is_artificial() == false)
           {
-            const unsigned int n_dofs_per_cell = cell->get_fe().dofs_per_cell;
+            const unsigned int n_dofs_per_cell =
+              cell->get_fe().n_dofs_per_cell();
             local_dof_indices.resize(n_dofs_per_cell);
 
             // Take care of adding cell pointer to each
@@ -1928,7 +1929,7 @@ namespace GridTools
                             // dofs_per_line returns number of dofs
                             // on line not including the vertices of the line.
                             const unsigned int n_dofs_per_line =
-                              2 * cell->get_fe().dofs_per_vertex +
+                              2 * cell->get_fe().n_dofs_per_vertex() +
                               cell->get_fe().dofs_per_line;
                             local_line_dof_indices.resize(n_dofs_per_line);
 
@@ -1953,7 +1954,7 @@ namespace GridTools
                         // dofs_per_line returns number of dofs
                         // on line not including the vertices of the line.
                         const unsigned int n_dofs_per_line =
-                          2 * cell->get_fe().dofs_per_vertex +
+                          2 * cell->get_fe().n_dofs_per_vertex() +
                           cell->get_fe().dofs_per_line;
                         local_line_dof_indices.resize(n_dofs_per_line);
 
@@ -1970,7 +1971,7 @@ namespace GridTools
                                    ExcInternalError());
 
                             const unsigned int n_dofs_per_line =
-                              2 * cell->get_fe().dofs_per_vertex +
+                              2 * cell->get_fe().n_dofs_per_vertex() +
                               cell->get_fe().dofs_per_line;
                             local_line_dof_indices.resize(n_dofs_per_line);
 
index c2229cce32ee60eae73020b29be21d00d45a5b9d..4edb59a4e3b1e0ebfbcc03cd2baddbccb330629d 100644 (file)
@@ -37,8 +37,8 @@ namespace MeshWorker
     , neighbor_cell_update_flags(update_flags)
     , face_update_flags(face_update_flags)
     , neighbor_face_update_flags(face_update_flags)
-    , local_dof_indices(fe.dofs_per_cell)
-    , neighbor_dof_indices(fe.dofs_per_cell)
+    , local_dof_indices(fe.n_dofs_per_cell())
+    , neighbor_dof_indices(fe.n_dofs_per_cell())
   {}
 
 
@@ -61,8 +61,8 @@ namespace MeshWorker
     , neighbor_cell_update_flags(neighbor_update_flags)
     , face_update_flags(face_update_flags)
     , neighbor_face_update_flags(neighbor_face_update_flags)
-    , local_dof_indices(fe.dofs_per_cell)
-    , neighbor_dof_indices(fe.dofs_per_cell)
+    , local_dof_indices(fe.n_dofs_per_cell())
+    , neighbor_dof_indices(fe.n_dofs_per_cell())
   {}
 
 
@@ -155,7 +155,7 @@ namespace MeshWorker
         *mapping, *fe, face_quadrature, face_update_flags);
 
     fe_face_values->reinit(cell, face_no);
-    local_dof_indices.resize(fe->dofs_per_cell);
+    local_dof_indices.resize(fe->n_dofs_per_cell());
     cell->get_dof_indices(local_dof_indices);
     current_fe_values = fe_face_values.get();
     return *fe_face_values;
@@ -176,7 +176,7 @@ namespace MeshWorker
           fe_subface_values = std::make_unique<FESubfaceValues<dim, spacedim>>(
             *mapping, *fe, face_quadrature, face_update_flags);
         fe_subface_values->reinit(cell, face_no, subface_no);
-        local_dof_indices.resize(fe->dofs_per_cell);
+        local_dof_indices.resize(fe->n_dofs_per_cell());
         cell->get_dof_indices(local_dof_indices);
 
         current_fe_values = fe_subface_values.get();
index 71f96a8b9ea289b15d74bcd3e76437b1c6e907f5..cd4dae9ea8b9aa0688f694f3c320ff41045eeea1 100644 (file)
@@ -138,7 +138,7 @@ namespace MGTools
     for (const auto &cell : dofs.cell_iterators_on_level(level))
       {
         const FiniteElement<dim> &fe = cell->get_fe();
-        cell_indices.resize(fe.dofs_per_cell);
+        cell_indices.resize(fe.n_dofs_per_cell());
         cell->get_mg_dof_indices(cell_indices);
         unsigned int i = 0;
         // First, dofs on
@@ -159,12 +159,12 @@ namespace MGTools
         // are identical. Nevertheless,
         // this will only work if
         // dofs_per_face is zero and
-        // dofs_per_vertex is
+        // n_dofs_per_vertex() is
         // arbitrary, not the other way
         // round.
         // TODO: This assumes that even in hp context, the dofs per face
         // coincide!
-        unsigned int increment = fe.dofs_per_cell - dim * fe.dofs_per_face;
+        unsigned int increment = fe.n_dofs_per_cell() - dim * fe.dofs_per_face;
         while (i < fe.first_line_index)
           row_lengths[cell_indices[i++]] += increment;
         // From now on, if an object is
@@ -178,23 +178,23 @@ namespace MGTools
         // subtract adjacent faces to be
         // added in the loop below.
         increment = (dim > 1) ?
-                      fe.dofs_per_cell - (dim - 1) * fe.dofs_per_face :
-                      fe.dofs_per_cell -
+                      fe.n_dofs_per_cell() - (dim - 1) * fe.dofs_per_face :
+                      fe.n_dofs_per_cell() -
                         GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
         while (i < fe.first_quad_index)
           row_lengths[cell_indices[i++]] += increment;
 
         // Now quads in 2D and 3D
         increment = (dim > 2) ?
-                      fe.dofs_per_cell - (dim - 2) * fe.dofs_per_face :
-                      fe.dofs_per_cell -
+                      fe.n_dofs_per_cell() - (dim - 2) * fe.dofs_per_face :
+                      fe.n_dofs_per_cell() -
                         GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
         while (i < fe.first_hex_index)
           row_lengths[cell_indices[i++]] += increment;
         // Finally, cells in 3D
-        increment = fe.dofs_per_cell -
+        increment = fe.n_dofs_per_cell() -
                     GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
-        while (i < fe.dofs_per_cell)
+        while (i < fe.n_dofs_per_cell())
           row_lengths[cell_indices[i++]] += increment;
 
         // At this point, we have
@@ -221,7 +221,8 @@ namespace MGTools
 
             if (level_boundary)
               {
-                for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+                for (unsigned int local_dof = 0;
+                     local_dof < fe.n_dofs_per_cell();
                      ++local_dof)
                   row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
                 continue;
@@ -242,8 +243,9 @@ namespace MGTools
             if (flux_coupling != DoFTools::none)
               {
                 const unsigned int dof_increment =
-                  nfe.dofs_per_cell - nfe.dofs_per_face;
-                for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+                  nfe.n_dofs_per_cell() - nfe.dofs_per_face;
+                for (unsigned int local_dof = 0;
+                     local_dof < fe.n_dofs_per_cell();
                      ++local_dof)
                   row_lengths[cell_indices[local_dof]] += dof_increment;
               }
@@ -265,12 +267,12 @@ namespace MGTools
             // is refined, all the fine
             // face dofs couple with
             // the coarse one.
-            neighbor_indices.resize(nfe.dofs_per_cell);
+            neighbor_indices.resize(nfe.n_dofs_per_cell());
             neighbor->get_mg_dof_indices(neighbor_indices);
-            for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+            for (unsigned int local_dof = 0; local_dof < fe.n_dofs_per_cell();
                  ++local_dof)
               row_lengths[cell_indices[local_dof]] += nfe.dofs_per_face;
-            for (unsigned int local_dof = 0; local_dof < nfe.dofs_per_cell;
+            for (unsigned int local_dof = 0; local_dof < nfe.n_dofs_per_cell();
                  ++local_dof)
               row_lengths[neighbor_indices[local_dof]] += fe.dofs_per_face;
           }
@@ -341,7 +343,7 @@ namespace MGTools
                ExcDimensionMismatch(flux_couplings.n_cols(),
                                     fe.n_components()));
 
-        cell_indices.resize(fe.dofs_per_cell);
+        cell_indices.resize(fe.n_dofs_per_cell());
         cell->get_mg_dof_indices(cell_indices);
         unsigned int i = 0;
         // First, dofs on
@@ -362,7 +364,7 @@ namespace MGTools
         // are identical. Nevertheless,
         // this will only work if
         // dofs_per_face is zero and
-        // dofs_per_vertex is
+        // n_dofs_per_vertex() is
         // arbitrary, not the other way
         // round.
         unsigned int increment;
@@ -375,7 +377,7 @@ namespace MGTools
                                           fe.first_block_of_base(base) +
                                             mult) != DoFTools::none)
                   {
-                    increment = fe.base_element(base).dofs_per_cell -
+                    increment = fe.base_element(base).n_dofs_per_cell() -
                                 dim * fe.base_element(base).dofs_per_face;
                     row_lengths[cell_indices[i]] += increment;
                   }
@@ -401,7 +403,7 @@ namespace MGTools
                                             mult) != DoFTools::none)
                   {
                     increment =
-                      fe.base_element(base).dofs_per_cell -
+                      fe.base_element(base).n_dofs_per_cell() -
                       ((dim > 1) ? (dim - 1) :
                                    GeometryInfo<dim>::faces_per_cell) *
                         fe.base_element(base).dofs_per_face;
@@ -421,7 +423,7 @@ namespace MGTools
                                             mult) != DoFTools::none)
                   {
                     increment =
-                      fe.base_element(base).dofs_per_cell -
+                      fe.base_element(base).n_dofs_per_cell() -
                       ((dim > 2) ? (dim - 2) :
                                    GeometryInfo<dim>::faces_per_cell) *
                         fe.base_element(base).dofs_per_face;
@@ -431,7 +433,7 @@ namespace MGTools
           }
 
         // Finally, cells in 3D
-        while (i < fe.dofs_per_cell)
+        while (i < fe.n_dofs_per_cell())
           {
             for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
               for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
@@ -440,7 +442,7 @@ namespace MGTools
                                           fe.first_block_of_base(base) +
                                             mult) != DoFTools::none)
                   {
-                    increment = fe.base_element(base).dofs_per_cell -
+                    increment = fe.base_element(base).n_dofs_per_cell() -
                                 GeometryInfo<dim>::faces_per_cell *
                                   fe.base_element(base).dofs_per_face;
                     row_lengths[cell_indices[i]] += increment;
@@ -472,7 +474,8 @@ namespace MGTools
 
             if (level_boundary)
               {
-                for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+                for (unsigned int local_dof = 0;
+                     local_dof < fe.n_dofs_per_cell();
                      ++local_dof)
                   row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
                 continue;
@@ -493,14 +496,15 @@ namespace MGTools
             for (unsigned int base = 0; base < nfe.n_base_elements(); ++base)
               for (unsigned int mult = 0; mult < nfe.element_multiplicity(base);
                    ++mult)
-                for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+                for (unsigned int local_dof = 0;
+                     local_dof < fe.n_dofs_per_cell();
                      ++local_dof)
                   if (couple_face[fe_index](
                         fe.system_to_block_index(local_dof).first,
                         nfe.first_block_of_base(base) + mult) != DoFTools::none)
                     {
                       const unsigned int dof_increment =
-                        nfe.base_element(base).dofs_per_cell -
+                        nfe.base_element(base).n_dofs_per_cell() -
                         nfe.base_element(base).dofs_per_face;
                       row_lengths[cell_indices[local_dof]] += dof_increment;
                     }
@@ -531,12 +535,13 @@ namespace MGTools
             // This will not work with
             // different couplings on
             // different cells.
-            neighbor_indices.resize(nfe.dofs_per_cell);
+            neighbor_indices.resize(nfe.n_dofs_per_cell());
             neighbor->get_mg_dof_indices(neighbor_indices);
             for (unsigned int base = 0; base < nfe.n_base_elements(); ++base)
               for (unsigned int mult = 0; mult < nfe.element_multiplicity(base);
                    ++mult)
-                for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+                for (unsigned int local_dof = 0;
+                     local_dof < fe.n_dofs_per_cell();
                      ++local_dof)
                   if (couple_cell[fe_index](
                         fe.system_to_component_index(local_dof).first,
@@ -546,7 +551,8 @@ namespace MGTools
             for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
               for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
                    ++mult)
-                for (unsigned int local_dof = 0; local_dof < nfe.dofs_per_cell;
+                for (unsigned int local_dof = 0;
+                     local_dof < nfe.n_dofs_per_cell();
                      ++local_dof)
                   if (couple_cell[fe_index](
                         nfe.system_to_component_index(local_dof).first,
@@ -574,7 +580,7 @@ namespace MGTools
     Assert(sparsity.n_cols() == n_dofs,
            ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
 
-    const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
                                                       endc = dof.end(level);
@@ -608,7 +614,7 @@ namespace MGTools
     Assert(sparsity.n_cols() == n_dofs,
            ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
 
-    const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
     typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
@@ -690,7 +696,7 @@ namespace MGTools
     Assert(sparsity.n_cols() == fine_dofs,
            ExcDimensionMismatch(sparsity.n_cols(), fine_dofs));
 
-    const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
     typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
@@ -765,7 +771,7 @@ namespace MGTools
     Assert(flux_mask.n_cols() == n_comp,
            ExcDimensionMismatch(flux_mask.n_cols(), n_comp));
 
-    const unsigned int                   total_dofs = fe.dofs_per_cell;
+    const unsigned int                   total_dofs = fe.n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(total_dofs);
     std::vector<types::global_dof_index> dofs_on_other_cell(total_dofs);
     Table<2, bool>                       support_on_face(total_dofs,
@@ -956,7 +962,7 @@ namespace MGTools
     Assert(flux_mask.n_cols() == n_comp,
            ExcDimensionMismatch(flux_mask.n_cols(), n_comp));
 
-    const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
     Table<2, bool>                       support_on_face(dofs_per_cell,
@@ -1033,7 +1039,7 @@ namespace MGTools
     Assert(sparsity.n_cols() == n_dofs,
            ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
 
-    const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+    const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
     std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
                                                       endc = dof.end(level);
@@ -1365,7 +1371,8 @@ namespace MGTools
                 if (boundary_ids.find(boundary_component) != boundary_ids.end())
                   // we want to constrain this boundary
                   {
-                    for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+                    for (unsigned int i = 0;
+                         i < cell->get_fe().n_dofs_per_cell();
                          ++i)
                       {
                         const ComponentMask &nonzero_component_array =
@@ -1460,7 +1467,7 @@ namespace MGTools
 
     const FiniteElement<dim, spacedim> &fe = mg_dof_handler.get_fe();
 
-    const unsigned int dofs_per_cell = fe.dofs_per_cell;
+    const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
     const unsigned int dofs_per_face = fe.dofs_per_face;
 
     std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
index 774399cffae414c2d10fc19af00f3fb79651a203..9294c91a5eb44f6b10b3794340818ab9310bc2a8 100644 (file)
@@ -219,7 +219,7 @@ MGTransferBlockBase::build(const DoFHandler<dim, spacedim> &dof_handler)
 {
   const FiniteElement<dim> &fe            = dof_handler.get_fe();
   const unsigned int        n_blocks      = fe.n_blocks();
-  const unsigned int        dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int        dofs_per_cell = fe.n_dofs_per_cell();
   const unsigned int n_levels = dof_handler.get_triangulation().n_levels();
 
   Assert(selected.size() == n_blocks,
@@ -505,8 +505,8 @@ MGTransferBlockSelect<number>::build(
   MGTransferBlockBase::build(dof_handler);
 
   std::vector<types::global_dof_index> temp_copy_indices;
-  std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
-  std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+  std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+  std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
 
   for (int level = dof_handler.get_triangulation().n_levels() - 1; level >= 0;
        --level)
@@ -531,7 +531,7 @@ MGTransferBlockSelect<number>::build(
           level_cell->get_dof_indices(global_dof_indices);
           level_cell->get_mg_dof_indices(level_dof_indices);
 
-          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+          for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
             {
               const unsigned int block = fe.system_to_block_index(i).first;
               if (selected[block])
@@ -608,8 +608,8 @@ MGTransferBlock<number>::build(const DoFHandler<dim, spacedim> &dof_handler,
   MGTransferBlockBase::build(dof_handler);
 
   std::vector<std::vector<types::global_dof_index>> temp_copy_indices(n_blocks);
-  std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
-  std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+  std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+  std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
   for (int level = dof_handler.get_triangulation().n_levels() - 1; level >= 0;
        --level)
     {
@@ -637,7 +637,7 @@ MGTransferBlock<number>::build(const DoFHandler<dim, spacedim> &dof_handler,
           level_cell->get_dof_indices(global_dof_indices);
           level_cell->get_mg_dof_indices(level_dof_indices);
 
-          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+          for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
             {
               const unsigned int block = fe.system_to_block_index(i).first;
               if (selected[block])
index 49ce42284711c37dc11ba16010b915b644ce1295..b4f87eff70bebb896d6cf8ed83e0341e4e2d4bd4 100644 (file)
@@ -318,7 +318,7 @@ MGTransferComponentBase::build(const DoFHandler<dim, spacedim> &mg_dof)
   const unsigned int n_components =
     *std::max_element(mg_target_component.begin(), mg_target_component.end()) +
     1;
-  const unsigned int dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
   const unsigned int n_levels      = mg_dof.get_triangulation().n_levels();
 
   Assert(mg_component_mask.represents_n_components(fe.n_components()),
@@ -657,8 +657,8 @@ MGTransferSelect<number>::build(
   // use a temporary vector to create the
   // relation between global and level dofs
   std::vector<types::global_dof_index> temp_copy_indices;
-  std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
-  std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+  std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+  std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
   for (int level = mg_dof.get_triangulation().n_levels() - 1; level >= 0;
        --level)
     {
@@ -683,7 +683,7 @@ MGTransferSelect<number>::build(
           level_cell->get_dof_indices(global_dof_indices);
           level_cell->get_mg_dof_indices(level_dof_indices);
 
-          for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+          for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
             {
               const unsigned int component =
                 fe.system_to_component_index(i).first;
index 0366c67cc7541eecf5800651202d05b527b896d5..7ea7a9c4664e0e08a8cf8f11a330c924e4efc4da 100644 (file)
@@ -91,7 +91,7 @@ namespace internal
       IndexSet globally_relevant;
       DoFTools::extract_locally_relevant_dofs(dof_handler, globally_relevant);
 
-      const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+      const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
       std::vector<types::global_dof_index> global_dof_indices(dofs_per_cell);
       std::vector<types::global_dof_index> level_dof_indices(dofs_per_cell);
 
@@ -587,37 +587,37 @@ namespace internal
     {
       // currently, we have only FE_Q and FE_DGQ type elements implemented
       elem_info.n_components = dof_handler.get_fe().element_multiplicity(0);
-      AssertDimension(Utilities::fixed_power<dim>(fe.dofs_per_cell) *
+      AssertDimension(Utilities::fixed_power<dim>(fe.n_dofs_per_cell()) *
                         elem_info.n_components,
-                      dof_handler.get_fe().dofs_per_cell);
+                      dof_handler.get_fe().n_dofs_per_cell());
       AssertDimension(fe.degree, dof_handler.get_fe().degree);
       elem_info.fe_degree             = fe.degree;
-      elem_info.element_is_continuous = fe.dofs_per_vertex > 0;
-      Assert(fe.dofs_per_vertex < 2, ExcNotImplemented());
+      elem_info.element_is_continuous = fe.n_dofs_per_vertex() > 0;
+      Assert(fe.n_dofs_per_vertex() < 2, ExcNotImplemented());
 
       // step 1.2: get renumbering of 1D basis functions to lexicographic
-      // numbers. The distinction according to fe.dofs_per_vertex is to support
-      // both continuous and discontinuous bases.
-      std::vector<unsigned int> renumbering(fe.dofs_per_cell);
+      // numbers. The distinction according to fe.n_dofs_per_vertex() is to
+      // support both continuous and discontinuous bases.
+      std::vector<unsigned int> renumbering(fe.n_dofs_per_cell());
       {
-        AssertIndexRange(fe.dofs_per_vertex, 2);
+        AssertIndexRange(fe.n_dofs_per_vertex(), 2);
         renumbering[0] = 0;
         for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
-          renumbering[i + fe.dofs_per_vertex] =
-            GeometryInfo<1>::vertices_per_cell * fe.dofs_per_vertex + i;
-        if (fe.dofs_per_vertex > 0)
-          renumbering[fe.dofs_per_cell - fe.dofs_per_vertex] =
-            fe.dofs_per_vertex;
+          renumbering[i + fe.n_dofs_per_vertex()] =
+            GeometryInfo<1>::vertices_per_cell * fe.n_dofs_per_vertex() + i;
+        if (fe.n_dofs_per_vertex() > 0)
+          renumbering[fe.n_dofs_per_cell() - fe.n_dofs_per_vertex()] =
+            fe.n_dofs_per_vertex();
       }
 
       // step 1.3: create a dummy 1D quadrature formula to extract the
       // lexicographic numbering for the elements
-      Assert(fe.dofs_per_vertex == 0 || fe.dofs_per_vertex == 1,
+      Assert(fe.n_dofs_per_vertex() == 0 || fe.n_dofs_per_vertex() == 1,
              ExcNotImplemented());
-      const unsigned int shift = fe.dofs_per_cell - fe.dofs_per_vertex;
+      const unsigned int shift = fe.n_dofs_per_cell() - fe.n_dofs_per_vertex();
       const unsigned int n_child_dofs_1d =
-        (fe.dofs_per_vertex > 0 ? (2 * fe.dofs_per_cell - 1) :
-                                  (2 * fe.dofs_per_cell));
+        (fe.n_dofs_per_vertex() > 0 ? (2 * fe.n_dofs_per_cell() - 1) :
+                                      (2 * fe.n_dofs_per_cell()));
 
       elem_info.n_child_cell_dofs =
         elem_info.n_components * Utilities::fixed_power<dim>(n_child_dofs_1d);
@@ -628,12 +628,12 @@ namespace internal
       elem_info.lexicographic_numbering = shape_info.lexicographic_numbering;
 
       // step 1.4: get the 1d prolongation matrix and combine from both children
-      elem_info.prolongation_matrix_1d.resize(fe.dofs_per_cell *
+      elem_info.prolongation_matrix_1d.resize(fe.n_dofs_per_cell() *
                                               n_child_dofs_1d);
 
       for (unsigned int c = 0; c < GeometryInfo<1>::max_children_per_cell; ++c)
-        for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
-          for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+        for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+          for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
             elem_info
               .prolongation_matrix_1d[i * n_child_dofs_1d + j + c * shift] =
               fe.get_prolongation_matrix(c)(renumbering[j], renumbering[i]);
@@ -737,7 +737,7 @@ namespace internal
         coarse_level_indices[level].resize(tria.n_raw_cells(level),
                                            numbers::invalid_unsigned_int);
       std::vector<types::global_dof_index> local_dof_indices(
-        dof_handler.get_fe().dofs_per_cell);
+        dof_handler.get_fe().n_dofs_per_cell());
       dirichlet_indices.resize(n_levels - 1);
 
       AssertDimension(target_partitioners.max_level(), n_levels - 1);
@@ -818,8 +818,8 @@ namespace internal
                       ghosted_level_dofs.push_back(local_dof_index);
 
                   add_child_indices<dim>(c,
-                                         fe->dofs_per_cell -
-                                           fe->dofs_per_vertex,
+                                         fe->n_dofs_per_cell() -
+                                           fe->n_dofs_per_vertex(),
                                          fe->degree,
                                          elem_info.lexicographic_numbering,
                                          local_dof_indices,
@@ -849,14 +849,14 @@ namespace internal
                           tria.n_cells(level);
                       parent_child_connect[level][child_index] =
                         std::make_pair(parent_index, c);
-                      AssertIndexRange(dof_handler.get_fe().dofs_per_cell,
+                      AssertIndexRange(dof_handler.get_fe().n_dofs_per_cell(),
                                        static_cast<unsigned short>(-1));
 
                       // set Dirichlet boundary conditions (as a list of
                       // constrained DoFs) for the child
                       if (mg_constrained_dofs != nullptr)
                         for (unsigned int i = 0;
-                             i < dof_handler.get_fe().dofs_per_cell;
+                             i < dof_handler.get_fe().n_dofs_per_cell();
                              ++i)
                           if (mg_constrained_dofs->is_boundary_index(
                                 level,
@@ -895,7 +895,7 @@ namespace internal
                     numbers::invalid_dof_index);
                   add_child_indices<dim>(
                     0,
-                    fe->dofs_per_cell - fe->dofs_per_vertex,
+                    fe->n_dofs_per_cell() - fe->n_dofs_per_vertex(),
                     fe->degree,
                     elem_info.lexicographic_numbering,
                     local_dof_indices,
@@ -904,7 +904,7 @@ namespace internal
                   dirichlet_indices[0].emplace_back();
                   if (mg_constrained_dofs != nullptr)
                     for (unsigned int i = 0;
-                         i < dof_handler.get_fe().dofs_per_cell;
+                         i < dof_handler.get_fe().n_dofs_per_cell();
                          ++i)
                       if (mg_constrained_dofs->is_boundary_index(
                             0,
@@ -991,7 +991,7 @@ namespace internal
       // ---------------------- 3. compute weights to make restriction additive
 
       const unsigned int n_child_dofs_1d =
-        fe->degree + 1 + fe->dofs_per_cell - fe->dofs_per_vertex;
+        fe->degree + 1 + fe->n_dofs_per_cell() - fe->n_dofs_per_vertex();
 
       // get the valence of the individual components and compute the weights as
       // the inverse of the valence
index d7d3669aca8705c35d7ec01fa0a64605a08543c1..472942fa46ef4780f791a70856f016e6ad464904 100644 (file)
@@ -154,7 +154,7 @@ MGTransferPrebuilt<VectorType>::build(
 {
   const unsigned int n_levels =
     dof_handler.get_triangulation().n_global_levels();
-  const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+  const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
 
   this->sizes.resize(n_levels);
   for (unsigned int l = 0; l < n_levels; ++l)
index cd1306b1a09bf195d00d8792abac32d3f29ff330..33655dcdc1fb6f692d3224662477dafdc413d64a 100644 (file)
@@ -231,8 +231,8 @@ namespace NonMatching
     const auto &immersed_fe = immersed_dh.get_fe();
 
     // Dof indices
-    std::vector<types::global_dof_index> dofs(immersed_fe.dofs_per_cell);
-    std::vector<types::global_dof_index> odofs(space_fe.dofs_per_cell);
+    std::vector<types::global_dof_index> dofs(immersed_fe.n_dofs_per_cell());
+    std::vector<types::global_dof_index> odofs(space_fe.n_dofs_per_cell());
 
     // Take care of components
     const ComponentMask space_c =
@@ -275,14 +275,14 @@ namespace NonMatching
     // the version with the dof_mask, this should be uncommented.
     //
     // // Construct a dof_mask, used to distribute entries to the sparsity
-    // able< 2, bool > dof_mask(space_fe.dofs_per_cell,
-    //                          immersed_fe.dofs_per_cell);
+    // able< 2, bool > dof_mask(space_fe.n_dofs_per_cell(),
+    //                          immersed_fe.n_dofs_per_cell());
     // of_mask.fill(false);
-    // or (unsigned int i=0; i<space_fe.dofs_per_cell; ++i)
+    // or (unsigned int i=0; i<space_fe.n_dofs_per_cell(); ++i)
     //  {
     //    const auto comp_i = space_fe.system_to_component_index(i).first;
     //    if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
-    //      for (unsigned int j=0; j<immersed_fe.dofs_per_cell; ++j)
+    //      for (unsigned int j=0; j<immersed_fe.n_dofs_per_cell(); ++j)
     //        {
     //          const auto comp_j =
     //          immersed_fe.system_to_component_index(j).first; if
@@ -416,8 +416,8 @@ namespace NonMatching
     const auto &immersed_fe = immersed_dh.get_fe();
 
     // Dof indices
-    std::vector<types::global_dof_index> dofs(immersed_fe.dofs_per_cell);
-    std::vector<types::global_dof_index> odofs(space_fe.dofs_per_cell);
+    std::vector<types::global_dof_index> dofs(immersed_fe.n_dofs_per_cell());
+    std::vector<types::global_dof_index> odofs(space_fe.n_dofs_per_cell());
 
     // Take care of components
     const ComponentMask space_c =
@@ -446,7 +446,8 @@ namespace NonMatching
         immersed_gtl[i] = j++;
 
     FullMatrix<typename Matrix::value_type> cell_matrix(
-      space_dh.get_fe().dofs_per_cell, immersed_dh.get_fe().dofs_per_cell);
+      space_dh.get_fe().n_dofs_per_cell(),
+      immersed_dh.get_fe().n_dofs_per_cell());
 
     FEValues<dim1, spacedim> fe_v(immersed_mapping,
                                   immersed_dh.get_fe(),
@@ -576,14 +577,15 @@ namespace NonMatching
                 // Reset the matrices.
                 cell_matrix = typename Matrix::value_type();
 
-                for (unsigned int i = 0; i < space_dh.get_fe().dofs_per_cell;
+                for (unsigned int i = 0;
+                     i < space_dh.get_fe().n_dofs_per_cell();
                      ++i)
                   {
                     const auto comp_i =
                       space_dh.get_fe().system_to_component_index(i).first;
                     if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
                       for (unsigned int j = 0;
-                           j < immersed_dh.get_fe().dofs_per_cell;
+                           j < immersed_dh.get_fe().n_dofs_per_cell();
                            ++j)
                         {
                           const auto comp_j = immersed_dh.get_fe()
@@ -676,8 +678,8 @@ namespace NonMatching
     const auto &fe1 = dh1.get_fe();
 
     // Dof indices
-    std::vector<types::global_dof_index> dofs0(fe0.dofs_per_cell);
-    std::vector<types::global_dof_index> dofs1(fe1.dofs_per_cell);
+    std::vector<types::global_dof_index> dofs0(fe0.n_dofs_per_cell());
+    std::vector<types::global_dof_index> dofs1(fe1.n_dofs_per_cell());
 
     if (outer_loop_on_zero)
       {
@@ -829,12 +831,12 @@ namespace NonMatching
                                     update_quadrature_points);
 
     // Dof indices
-    std::vector<types::global_dof_index> dofs0(fe0.dofs_per_cell);
-    std::vector<types::global_dof_index> dofs1(fe1.dofs_per_cell);
+    std::vector<types::global_dof_index> dofs0(fe0.n_dofs_per_cell());
+    std::vector<types::global_dof_index> dofs1(fe1.n_dofs_per_cell());
 
     // Local Matrix
-    FullMatrix<typename Matrix::value_type> cell_matrix(fe0.dofs_per_cell,
-                                                        fe1.dofs_per_cell);
+    FullMatrix<typename Matrix::value_type> cell_matrix(fe0.n_dofs_per_cell(),
+                                                        fe1.n_dofs_per_cell());
 
     // Global to local indices
     const auto p =
@@ -851,7 +853,7 @@ namespace NonMatching
         {
           kernel.set_center(fev0.quadrature_point(q0));
           kernel.value_list(fev1.get_quadrature_points(), kernel_values);
-          for (unsigned int j = 0; j < fe1.dofs_per_cell; ++j)
+          for (unsigned int j = 0; j < fe1.n_dofs_per_cell(); ++j)
             {
               const auto comp_j = fe1.system_to_component_index(j).first;
 
@@ -866,7 +868,7 @@ namespace NonMatching
               // Now compute the main integral with the sum over q1 already
               // completed - this gives a cubic complexity as usual rather
               // than a quartic one with naive loops
-              for (unsigned int i = 0; i < fe0.dofs_per_cell; ++i)
+              for (unsigned int i = 0; i < fe0.n_dofs_per_cell(); ++i)
                 {
                   const auto comp_i = fe0.system_to_component_index(i).first;
                   if (gtl0[comp_i] != numbers::invalid_unsigned_int &&
index f1d5393f94938ccd9e84a314ce48a02ce27b8fb5..7fe5560a53d7164ce5aee68fc5c4f74564365410 100644 (file)
@@ -270,7 +270,7 @@ PointValueHistory<dim>::add_point(const Point<dim> &location)
 
 
   std::vector<types::global_dof_index> local_dof_indices(
-    dof_handler->get_fe().dofs_per_cell);
+    dof_handler->get_fe().n_dofs_per_cell());
   std::vector<types::global_dof_index> new_solution_indices;
   current_cell->get_dof_indices(local_dof_indices);
   // there is an implicit assumption here
@@ -419,7 +419,7 @@ PointValueHistory<dim>::add_points(const std::vector<Point<dim>> &locations)
     }
 
   std::vector<types::global_dof_index> local_dof_indices(
-    dof_handler->get_fe().dofs_per_cell);
+    dof_handler->get_fe().n_dofs_per_cell());
   for (unsigned int point = 0; point < locations.size(); point++)
     {
       current_cell[point]->get_dof_indices(local_dof_indices);
index cd491bb5bacef886917dc8a2e2c4e943a107e901..39b8f88cf3de8e3baab1dfa21595ed855f997593 100644 (file)
@@ -128,7 +128,7 @@ namespace SmoothnessEstimator
                   cell->active_fe_index());
                 resize(expansion_coefficients, n_modes);
 
-                local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+                local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_values(solution, local_dof_values);
 
                 fe_legendre.calculate(local_dof_values,
@@ -229,7 +229,7 @@ namespace SmoothnessEstimator
                 // at least N=pe+1
                 AssertIndexRange(pe, n_modes);
 
-                local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+                local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_values(solution, local_dof_values);
 
                 fe_legendre.calculate(local_dof_values,
@@ -396,7 +396,7 @@ namespace SmoothnessEstimator
                 // degrees of freedom and then need to compute the series
                 // expansion by multiplying this vector with the matrix ${\cal
                 // F}$ corresponding to this finite element.
-                local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+                local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_values(solution, local_dof_values);
 
                 fe_fourier.calculate(local_dof_values,
@@ -510,7 +510,7 @@ namespace SmoothnessEstimator
                 // at least N=pe+1
                 AssertIndexRange(pe, n_modes);
 
-                local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+                local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
                 cell->get_dof_values(solution, local_dof_values);
 
                 fe_fourier.calculate(local_dof_values,
index 26fe1435cb92a9dceed4d2d8ef92ace1a0439250..9766483eebee2d0da6012ab486e9cf79bc8d84cb 100644 (file)
@@ -106,7 +106,7 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_pure_refinement()
 
   for (unsigned int i = 0; cell != endc; ++cell, ++i)
     {
-      indices_on_cell[i].resize(cell->get_fe().dofs_per_cell);
+      indices_on_cell[i].resize(cell->get_fe().n_dofs_per_cell());
       // on each cell store the indices of the
       // dofs. after refining we get the values
       // on the children by taking these
@@ -161,7 +161,7 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::refine_interpolate(
           const unsigned int this_fe_index =
             pointerstruct->second.active_fe_index;
           const unsigned int dofs_per_cell =
-            cell->get_dof_handler().get_fe(this_fe_index).dofs_per_cell;
+            cell->get_dof_handler().get_fe(this_fe_index).n_dofs_per_cell();
           local_values.reinit(dofs_per_cell, true);
 
           // make sure that the size of the stored indices is the same as
@@ -210,7 +210,8 @@ namespace internal
       for (unsigned int j = 0; j < fe.size(); ++j)
         if (i != j)
           {
-            matrices(i, j).reinit(fe[i].dofs_per_cell, fe[j].dofs_per_cell);
+            matrices(i, j).reinit(fe[i].n_dofs_per_cell(),
+                                  fe[j].n_dofs_per_cell());
 
             // see if we can get the interpolation matrices for this
             // combination of elements. if not, reset the matrix sizes to zero
@@ -246,8 +247,8 @@ namespace internal
     restriction_is_additive.resize(fe.size());
     for (unsigned int f = 0; f < fe.size(); ++f)
       {
-        restriction_is_additive[f].resize(fe[f].dofs_per_cell);
-        for (unsigned int i = 0; i < fe[f].dofs_per_cell; ++i)
+        restriction_is_additive[f].resize(fe[f].n_dofs_per_cell());
+        for (unsigned int i = 0; i < fe[f].n_dofs_per_cell(); ++i)
           restriction_is_additive[f][i] = fe[f].restriction_is_additive(i);
       }
   }
@@ -334,7 +335,7 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::
       // CASE 1: active cell that remains as it is
       if (cell->is_active() && !cell->coarsen_flag_set())
         {
-          const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+          const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
           indices_on_cell[n_sr].resize(dofs_per_cell);
           // cell will not be coarsened,
           // so we get away by storing the
@@ -377,7 +378,7 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::
                    dim>::ExcNoDominatedFiniteElementAmongstChildren());
 
           const unsigned int dofs_per_cell =
-            dof_handler->get_fe(target_fe_index).dofs_per_cell;
+            dof_handler->get_fe(target_fe_index).n_dofs_per_cell();
 
           std::vector<Vector<typename VectorType::value_type>>(
             in_size, Vector<typename VectorType::value_type>(dofs_per_cell))
@@ -492,7 +493,8 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
               Assert(!cell->has_children(), ExcInternalError());
               Assert(indexptr == nullptr, ExcInternalError());
 
-              const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+              const unsigned int dofs_per_cell =
+                cell->get_fe().n_dofs_per_cell();
               dofs.resize(dofs_per_cell);
               // get the local
               // indices
index 2493aa9c91e2a0eb86995a1c2f2b751ba9c2fe72..c90a04079f6d57a273947b13ec015638556bebaa 100644 (file)
@@ -63,9 +63,9 @@ namespace Particles
       // the version with the dof_mask, this should be uncommented.
       // // Construct a dof_mask, used to distribute entries to the sparsity
       // Table<2, bool> dof_mask(max_particles_per_cell * n_comps,
-      //                         fe.dofs_per_cell);
+      //                         fe.n_dofs_per_cell());
       // dof_mask.fill(false);
-      // for (unsigned int i = 0; i < space_fe.dofs_per_cell; ++i)
+      // for (unsigned int i = 0; i < space_fe.n_dofs_per_cell(); ++i)
       //   {
       //     const auto comp_i = space_fe.system_to_component_index(i).first;
       //     if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
@@ -73,7 +73,7 @@ namespace Particles
       //         dof_mask(i, j * n_comps + space_gtl[comp_i]) = true;
       //   }
 
-      std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+      std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
       std::vector<types::particle_index>   particle_indices(
         max_particles_per_cell * n_comps);
 
@@ -91,7 +91,7 @@ namespace Particles
           for (unsigned int i = 0; particle != pic.end(); ++particle, ++i)
             {
               const auto p_id = particle->get_id();
-              for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+              for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
                 {
                   const auto comp_j =
                     space_gtl[fe.system_to_component_index(j).first];
@@ -154,9 +154,9 @@ namespace Particles
       // the version with the dof_mask, this should be uncommented.
       // // Construct a dof_mask, used to distribute entries to the sparsity
       // Table<2, bool> dof_mask(max_particles_per_cell * n_comps,
-      //                         fe.dofs_per_cell);
+      //                         fe.n_dofs_per_cell());
       // dof_mask.fill(false);
-      // for (unsigned int i = 0; i < space_fe.dofs_per_cell; ++i)
+      // for (unsigned int i = 0; i < space_fe.n_dofs_per_cell(); ++i)
       //   {
       //     const auto comp_i = space_fe.system_to_component_index(i).first;
       //     if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
@@ -164,12 +164,12 @@ namespace Particles
       //         dof_mask(i, j * n_comps + space_gtl[comp_i]) = true;
       //   }
 
-      std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+      std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
       std::vector<types::particle_index>   particle_indices(
         max_particles_per_cell * n_comps);
 
       FullMatrix<typename MatrixType::value_type> local_matrix(
-        max_particles_per_cell * n_comps, fe.dofs_per_cell);
+        max_particles_per_cell * n_comps, fe.n_dofs_per_cell());
 
       auto particle = particle_handler.begin();
       while (particle != particle_handler.end())
@@ -181,7 +181,7 @@ namespace Particles
           const auto pic         = particle_handler.particles_in_cell(cell);
           const auto n_particles = particle_handler.n_particles_in_cell(cell);
           particle_indices.resize(n_particles * n_comps);
-          local_matrix.reinit({n_particles * n_comps, fe.dofs_per_cell});
+          local_matrix.reinit({n_particles * n_comps, fe.n_dofs_per_cell()});
           Assert(pic.begin() == particle, ExcInternalError());
           for (unsigned int i = 0; particle != pic.end(); ++particle, ++i)
             {
@@ -192,7 +192,7 @@ namespace Particles
                 particle_indices[i * n_comps + d] =
                   particle->get_id() * n_comps + d;
 
-              for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+              for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
                 {
                   const auto comp_j =
                     space_gtl[fe.system_to_component_index(j).first];

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.