]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make finite element objects 'const'. 16968/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 3 May 2024 17:14:55 +0000 (22:44 +0530)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 6 May 2024 06:46:55 +0000 (12:16 +0530)
62 files changed:
examples/step-11/step-11.cc
examples/step-12b/step-12b.cc
examples/step-15/step-15.cc
examples/step-16/step-16.cc
examples/step-16b/step-16b.cc
examples/step-17/step-17.cc
examples/step-18/step-18.cc
examples/step-19/step-19.cc
examples/step-20/step-20.cc
examples/step-21/step-21.cc
examples/step-22/step-22.cc
examples/step-23/step-23.cc
examples/step-24/step-24.cc
examples/step-25/step-25.cc
examples/step-26/step-26.cc
examples/step-28/step-28.cc
examples/step-29/step-29.cc
examples/step-3/step-3.cc
examples/step-30/step-30.cc
examples/step-31/step-31.cc
examples/step-32/step-32.cc
examples/step-34/step-34.cc
examples/step-35/step-35.cc
examples/step-36/step-36.cc
examples/step-37/step-37.cc
examples/step-38/step-38.cc
examples/step-39/step-39.cc
examples/step-4/step-4.cc
examples/step-40/step-40.cc
examples/step-41/step-41.cc
examples/step-42/step-42.cc
examples/step-43/step-43.cc
examples/step-45/step-45.cc
examples/step-46/step-46.cc
examples/step-47/step-47.cc
examples/step-48/step-48.cc
examples/step-5/step-5.cc
examples/step-50/step-50.cc
examples/step-51/step-51.cc
examples/step-55/step-55.cc
examples/step-56/step-56.cc
examples/step-57/step-57.cc
examples/step-58/step-58.cc
examples/step-59/step-59.cc
examples/step-6/step-6.cc
examples/step-61/step-61.cc
examples/step-62/step-62.cc
examples/step-64/step-64.cc
examples/step-65/step-65.cc
examples/step-66/step-66.cc
examples/step-67/step-67.cc
examples/step-68/step-68.cc
examples/step-7/step-7.cc
examples/step-70/step-70.cc
examples/step-76/step-76.cc
examples/step-77/step-77.cc
examples/step-78/step-78.cc
examples/step-79/step-79.cc
examples/step-8/step-8.cc
examples/step-82/step-82.cc
examples/step-87/step-87.cc
examples/step-9/step-9.cc

index 2af4c1de4852a99b9b1d2a42e6101d7088c46fd1..ca7c65452dde1a0d1776569a1a0a0c3ca4aaed32 100644 (file)
@@ -83,7 +83,7 @@ namespace Step11
     void write_high_order_mesh(const unsigned cycle);
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
     MappingQ<dim>      mapping;
 
index 155641fb96d4a5e77ee8eb6f708c83f7afe000f8..2bfb222e79ab1f3ae333dadcf354541a03e1fac4 100644 (file)
@@ -164,8 +164,8 @@ namespace Step12
     // specified in the constructor). If you want to use a DG method of a
     // different degree the whole program stays the same, only replace 1 in
     // the constructor by the desired polynomial degree.
-    FE_DGQ<dim>     fe;
-    DoFHandler<dim> dof_handler;
+    const FE_DGQ<dim> fe;
+    DoFHandler<dim>   dof_handler;
 
     // The next four members represent the linear system to be solved.
     // <code>system_matrix</code> and <code>right_hand_side</code> are generated
index b732cfcb1ea7246a78a9b51e58103242de7257d1..2234b03d8de381c8243afb919c3b5491c154c8a5 100644 (file)
@@ -113,7 +113,7 @@ namespace Step15
     Triangulation<dim> triangulation;
 
     DoFHandler<dim> dof_handler;
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
 
     AffineConstraints<double> hanging_node_constraints;
 
index 72b51bd0ec607a157b28d501b789c2dced06eaf1..68328386cec06ff0fdd9e027671152ab547ac633 100644 (file)
@@ -154,7 +154,7 @@ namespace Step16
     void output_results(const unsigned int cycle) const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     SparsityPattern      sparsity_pattern;
index 2ed54b1599c708fda6b0cf57253c562fc78737f0..d93f966cd555e0a2086d73c60abb30e61954d7f2 100644 (file)
@@ -183,7 +183,7 @@ namespace Step16
     void output_results(const unsigned int cycle) const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     SparsityPattern      sparsity_pattern;
index 845eb626bf214100b6a6956598d8f347b3da7179..3deca967eec19d735978527830d3cc961bfdea83 100644 (file)
@@ -159,9 +159,9 @@ namespace Step17
     // and vector types to use parallel PETSc objects instead. Note that
     // we do not use a separate sparsity pattern, since PETSc manages this
     // internally as part of its matrix data structures.
-    Triangulation<dim> triangulation;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     AffineConstraints<double> hanging_node_constraints;
 
index e091f86a5ce13946a1a13279109feeebffd74986..967796f2a8494d6ffae8415f4197534c4f3a9ad1 100644 (file)
@@ -401,7 +401,7 @@ namespace Step18
     // This is the new shared Triangulation:
     parallel::shared::Triangulation<dim> triangulation;
 
-    FESystem<dim> fe;
+    const FESystem<dim> fe;
 
     DoFHandler<dim> dof_handler;
 
index f7cccc82f222f6837cfa1a02ca9974f14e78990a..5ff1429c464b451d6e9a05fe13cbb59dd0fcc4e2 100644 (file)
@@ -144,7 +144,7 @@ namespace Step19
 
     Triangulation<dim>        triangulation;
     MappingQ<dim>             mapping;
-    FE_Q<dim>                 fe;
+    const FE_Q<dim>           fe;
     DoFHandler<dim>           dof_handler;
     AffineConstraints<double> constraints;
 
index d8a6afd6785a30ca7e335493e6be938f25b3edf3..c2e52c655a681e582069c9c359606b970ca34cec 100644 (file)
@@ -92,9 +92,9 @@ namespace Step20
 
     const unsigned int degree;
 
-    Triangulation<dim> triangulation;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     // The second difference is that the sparsity pattern, the system matrix,
     // and solution and right hand side vectors are now blocked. What this
index 0c3760a02eb236712cddfc25ba6eefd0598e1bf6..c493828c90f5805ec7a2693954ac438310ca9479 100644 (file)
@@ -111,9 +111,9 @@ namespace Step21
 
     const unsigned int degree;
 
-    Triangulation<dim> triangulation;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     BlockSparsityPattern      sparsity_pattern;
     BlockSparseMatrix<double> system_matrix;
index 8351f74d8e0418fa76096f3358652e74b23e661d..363aafc4cf90e2c5b44f6916feb6023e71b9e0af 100644 (file)
@@ -127,9 +127,9 @@ namespace Step22
 
     const unsigned int degree;
 
-    Triangulation<dim> triangulation;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     AffineConstraints<double> constraints;
 
index c4e6a2d7754d8fde1066c60580787ddc46ab58d0..8ee184339bbe3b69333852673b9e1adff00a0df4 100644 (file)
@@ -117,7 +117,7 @@ namespace Step23
     void output_results() const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<double> constraints;
index 3a079dc69cd3497f97b355702ce7b30a7c58a9dc..a9678aceea6b0ba97b5242ecd31a240b27e68026 100644 (file)
@@ -75,7 +75,7 @@ namespace Step24
     void output_results() const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<double> constraints;
index a417c54ea284233a947a1a71f1951472a5a4cd4f..565d03023521022a2802eaf508e6cac2acb09c31 100644 (file)
@@ -112,7 +112,7 @@ namespace Step25
     void         output_results(const unsigned int timestep_number) const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     SparsityPattern      sparsity_pattern;
index 24b833e2e56a189d7b096c5691faa5edbcb63da7..8260a96205a1a8935e49b71ed28c8294bc23f984 100644 (file)
@@ -86,7 +86,7 @@ namespace Step26
                      const unsigned int max_grid_level);
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<double> constraints;
index 44a223dce60fa60001e7633a5d6ba9a4491d76ca..1951221138ee9e10c259cf5bfff1b95cd6beaec1 100644 (file)
@@ -1194,7 +1194,7 @@ namespace Step28
     // all energy groups:
     const Parameters  &parameters;
     const MaterialData material_data;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
 
     // Furthermore, we have (iv) the value of the computed eigenvalue at the
     // present iteration. This is, in fact, the only part of the solution that
index 238ec4448ba2ae1ba2cd97e3feebeb481163846f..6eb385e1ebeba23572508cd296d6ea3408fa5760 100644 (file)
@@ -372,9 +372,9 @@ namespace Step29
 
     ParameterHandler &prm;
 
-    Triangulation<dim> triangulation;
-    DoFHandler<dim>    dof_handler;
-    FESystem<dim>      fe;
+    Triangulation<dim>  triangulation;
+    DoFHandler<dim>     dof_handler;
+    const FESystem<dim> fe;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
index e0bd293d6ab3b320ef6121e414f3b22d85d3221e..148c0ec855f04b07c7265e88dcd05e18415c7a9c 100644 (file)
@@ -105,7 +105,7 @@ private:
   // will specify the exact polynomial degree of the finite element in the
   // constructor of this class)...
   Triangulation<2> triangulation;
-  FE_Q<2>          fe;
+  const FE_Q<2>    fe;
   DoFHandler<2>    dof_handler;
 
   // ...variables for the sparsity pattern and values of the system matrix
index 553a7480c99bec0a88d993f59e985d43c4105076..38215fd19ce1fe86025ea81f97b164970ba19262 100644 (file)
@@ -311,7 +311,7 @@ namespace Step30
     // specified in the constructor). If you want to use a DG method of a
     // different degree replace 1 in the constructor by the new degree.
     const unsigned int degree;
-    FE_DGQ<dim>        fe;
+    const FE_DGQ<dim>  fe;
     DoFHandler<dim>    dof_handler;
 
     SparsityPattern      sparsity_pattern;
index 3e66bc0710e8bb1bbadd0228a3e755858c8ae885..e114ee136989ceeb26cb038a3588dd54732fec7e 100644 (file)
@@ -483,7 +483,7 @@ namespace Step31
     double             global_Omega_diameter;
 
     const unsigned int        stokes_degree;
-    FESystem<dim>             stokes_fe;
+    const FESystem<dim>       stokes_fe;
     DoFHandler<dim>           stokes_dof_handler;
     AffineConstraints<double> stokes_constraints;
 
@@ -497,7 +497,7 @@ namespace Step31
 
 
     const unsigned int        temperature_degree;
-    FE_Q<dim>                 temperature_fe;
+    const FE_Q<dim>           temperature_fe;
     DoFHandler<dim>           temperature_dof_handler;
     AffineConstraints<double> temperature_constraints;
 
index 1e73c472e67fe9206daab9f6096279b73deac86e..1bf932bca22ec1741c2d267369cef78e7f662ef4 100644 (file)
@@ -851,7 +851,7 @@ namespace Step32
     TrilinosWrappers::MPI::BlockVector stokes_rhs;
 
 
-    FE_Q<dim>                 temperature_fe;
+    const FE_Q<dim>           temperature_fe;
     DoFHandler<dim>           temperature_dof_handler;
     AffineConstraints<double> temperature_constraints;
 
index 495ef243088f5aa078d07e138896b8cc1c06e5cc..df9dbebcba05b7923e802cc0c8f0b2e02e792bc6 100644 (file)
@@ -231,7 +231,7 @@ namespace Step34
     // mapping can be selected in the constructor of the class.
 
     Triangulation<dim - 1, dim> tria;
-    FE_Q<dim - 1, dim>          fe;
+    const FE_Q<dim - 1, dim>    fe;
     DoFHandler<dim - 1, dim>    dof_handler;
     MappingQ<dim - 1, dim>      mapping;
 
@@ -912,7 +912,7 @@ namespace Step34
     Triangulation<dim> external_tria;
     GridGenerator::hyper_cube(external_tria, -2, 2);
 
-    FE_Q<dim>       external_fe(1);
+    const FE_Q<dim> external_fe(1);
     DoFHandler<dim> external_dh(external_tria);
     Vector<double>  external_phi;
 
index 9f4c6ff9e2a8ddf9a23ede67743b60780248e865..8e8e955d9101df960a6a2d8519e985506d478365 100644 (file)
@@ -445,8 +445,8 @@ namespace Step35
 
     Triangulation<dim> triangulation;
 
-    FE_Q<dim> fe_velocity;
-    FE_Q<dim> fe_pressure;
+    const FE_Q<dim> fe_velocity;
+    const FE_Q<dim> fe_pressure;
 
     DoFHandler<dim> dof_handler_velocity;
     DoFHandler<dim> dof_handler_pressure;
index dd7f52afb9506ba0bae90ee96689d0e81c8683e5..b94348c7f1867d9c5563dfdf4854f43f18dc390f 100644 (file)
@@ -80,7 +80,7 @@ namespace Step36
     void         output_results() const;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     // With these exceptions: For our eigenvalue problem, we need both a
index 6df45278ad501a817458cfc727d5a9b82474a4e2..5515fcb2474f3c6f922a84befda490aa7824bfd7 100644 (file)
@@ -685,7 +685,7 @@ namespace Step37
     Triangulation<dim> triangulation;
 #endif
 
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
     DoFHandler<dim> dof_handler;
 
     MappingQ1<dim> mapping;
index 6826fd0b672ec44bd2e980b25e1eefb4c6964d75..401ad8d9c49e3f9ac027158891b4c7f3f3df7f90 100644 (file)
@@ -112,7 +112,7 @@ namespace Step38
 
 
     Triangulation<dim, spacedim> triangulation;
-    FE_Q<dim, spacedim>          fe;
+    const FE_Q<dim, spacedim>    fe;
     DoFHandler<dim, spacedim>    dof_handler;
     MappingQ<dim, spacedim>      mapping;
 
index 16c8cb2b39b70cb5b0926e8f99ed128c1d515e7f..05ac60be8c3e9702b1653433d469257a7ec76719 100644 (file)
@@ -986,7 +986,7 @@ int main()
       deallog.depth_console(2);
       std::ofstream logfile("deallog");
       deallog.attach(logfile);
-      FE_DGQ<2>                 fe1(3);
+      const FE_DGQ<2>           fe1(3);
       InteriorPenaltyProblem<2> test1(fe1);
       test1.run(12);
     }
index 472610c2e50ec5e2badcc8bc3d07316e8f03aded..dabf47ba7f36b018600486014e5def2c3f5da8eb 100644 (file)
@@ -76,7 +76,7 @@ private:
   void output_results() const;
 
   Triangulation<dim> triangulation;
-  FE_Q<dim>          fe;
+  const FE_Q<dim>    fe;
   DoFHandler<dim>    dof_handler;
 
   SparsityPattern      sparsity_pattern;
index a0d3e51b6758aee836997d2fd91825af8c6f7aad..4995560be9062da2f95d4fec0ea11cc2679cc4a1 100644 (file)
@@ -172,7 +172,7 @@ namespace Step40
 
     parallel::distributed::Triangulation<dim> triangulation;
 
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
     DoFHandler<dim> dof_handler;
 
     IndexSet locally_owned_dofs;
index 1a88626f04375c907541c0df71a28e0b9aaa1ed2..714a10f61a0276d81ec0b485656e3d3295a9ec6d 100644 (file)
@@ -86,7 +86,7 @@ namespace Step41
     void output_results(const unsigned int iteration) const;
 
     Triangulation<dim>        triangulation;
-    FE_Q<dim>                 fe;
+    const FE_Q<dim>           fe;
     DoFHandler<dim>           dof_handler;
     AffineConstraints<double> constraints;
     IndexSet                  active_set;
index 0cd0ecf61cc8381b63a9c2d039b52a05a8eac32c..fe502e0799cd411c6028bf6eb5e425400def5d71 100644 (file)
@@ -660,9 +660,9 @@ namespace Step42
     const unsigned int                        n_initial_global_refinements;
     parallel::distributed::Triangulation<dim> triangulation;
 
-    const unsigned int fe_degree;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    const unsigned int  fe_degree;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     IndexSet locally_owned_dofs;
     IndexSet locally_relevant_dofs;
index b36b03bc9fdcef47f64746a3c6c9779aaa065d15..dbfdb5864ecadbffe9fa5ae0ae0969fc638f7a9c 100644 (file)
@@ -504,7 +504,7 @@ namespace Step43
     const unsigned int degree;
 
     const unsigned int        darcy_degree;
-    FESystem<dim>             darcy_fe;
+    const FESystem<dim>       darcy_fe;
     DoFHandler<dim>           darcy_dof_handler;
     AffineConstraints<double> darcy_constraints;
 
@@ -521,7 +521,7 @@ namespace Step43
 
 
     const unsigned int        saturation_degree;
-    FE_Q<dim>                 saturation_fe;
+    const FE_Q<dim>           saturation_fe;
     DoFHandler<dim>           saturation_dof_handler;
     AffineConstraints<double> saturation_constraints;
 
index 307aa616d602951711da327f1720c59451a0f039..6cb44141fd39b69bc1f1ab1a4b8863d44006562a 100644 (file)
@@ -87,7 +87,7 @@ namespace Step45
     MPI_Comm mpi_communicator;
 
     parallel::distributed::Triangulation<dim> triangulation;
-    FESystem<dim>                             fe;
+    const FESystem<dim>                       fe;
     DoFHandler<dim>                           dof_handler;
 
     AffineConstraints<double> constraints;
index 31d11deb2de8ecae398365b2eb2609bee23410ac..d3312b4f7f9bd25343e76213f6f3679e51b18442 100644 (file)
@@ -123,8 +123,8 @@ namespace Step46
     const unsigned int elasticity_degree;
 
     Triangulation<dim>    triangulation;
-    FESystem<dim>         stokes_fe;
-    FESystem<dim>         elasticity_fe;
+    const FESystem<dim>   stokes_fe;
+    const FESystem<dim>   elasticity_fe;
     hp::FECollection<dim> fe_collection;
     DoFHandler<dim>       dof_handler;
 
index 6f84b3294fcea58d315fdf6c01116fda852c3de0..970db603b2a65e74cebbec77b4efd0805552c969 100644 (file)
@@ -163,7 +163,7 @@ namespace Step47
 
     MappingQ<dim> mapping;
 
-    FE_Q<dim>                 fe;
+    const FE_Q<dim>           fe;
     DoFHandler<dim>           dof_handler;
     AffineConstraints<double> constraints;
 
index a47f9e837001c617d7189134e7c1a038e66e37f8..9130d424334b016f025700819b79a6666fea9a00 100644 (file)
@@ -307,7 +307,7 @@ namespace Step48
 #else
     Triangulation<dim> triangulation;
 #endif
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
     DoFHandler<dim> dof_handler;
 
     MappingQ1<dim> mapping;
index d2f56853abca6396063db8e7a7e4e541c1c85a36..d56582d372e0543a4e80794af75ea7e6d6fda50a 100644 (file)
@@ -76,7 +76,7 @@ private:
   void output_results(const unsigned int cycle) const;
 
   Triangulation<dim> triangulation;
-  FE_Q<dim>          fe;
+  const FE_Q<dim>    fe;
   DoFHandler<dim>    dof_handler;
 
   SparsityPattern      sparsity_pattern;
index 38a390f1db0db202253d9b97ea1150c8c876ae1f..c0a9019b4f0bbb850e120e763a0eba9fd7225d72 100644 (file)
@@ -421,7 +421,7 @@ private:
 
   parallel::distributed::Triangulation<dim> triangulation;
   const MappingQ1<dim>                      mapping;
-  FE_Q<dim>                                 fe;
+  const FE_Q<dim>                           fe;
 
   DoFHandler<dim> dof_handler;
 
index 570823e4104cc8b86453dc56a7847d4ec19886a6..516cb1494d833505ef2f848dfc8de765dd560c2d 100644 (file)
@@ -321,17 +321,17 @@ namespace Step51
     // The 'local' solutions are interior to each element.  These
     // represent the primal solution field $u$ as well as the auxiliary
     // field $\mathbf{q}$.
-    FESystem<dim>   fe_local;
-    DoFHandler<dim> dof_handler_local;
-    Vector<double>  solution_local;
+    const FESystem<dim> fe_local;
+    DoFHandler<dim>     dof_handler_local;
+    Vector<double>      solution_local;
 
     // The new finite element type and corresponding <code>DoFHandler</code> are
     // used for the global skeleton solution that couples the element-level
     // local solutions.
-    FE_FaceQ<dim>   fe;
-    DoFHandler<dim> dof_handler;
-    Vector<double>  solution;
-    Vector<double>  system_rhs;
+    const FE_FaceQ<dim> fe;
+    DoFHandler<dim>     dof_handler;
+    Vector<double>      solution;
+    Vector<double>      system_rhs;
 
     // As stated in the introduction, HDG solutions can be post-processed to
     // attain superconvergence rates of $\mathcal{O}(h^{p+2})$.  The
@@ -339,9 +339,9 @@ namespace Step51
     // representing the primal variable on the interior of each cell.  We define
     // a FE type of degree $p+1$ to represent this post-processed solution,
     // which we only use for output after constructing it.
-    FE_DGQ<dim>     fe_u_post;
-    DoFHandler<dim> dof_handler_u_post;
-    Vector<double>  solution_u_post;
+    const FE_DGQ<dim> fe_u_post;
+    DoFHandler<dim>   dof_handler_u_post;
+    Vector<double>    solution_u_post;
 
     // The degrees of freedom corresponding to the skeleton strongly enforce
     // Dirichlet boundary conditions, just as in a continuous Galerkin finite
index c12cc6d9ce7eb302bd497c6dcc5567812e6847a1..8c07ab9a5ce7d2d688bf39b3e806c7583fb72824 100644 (file)
@@ -306,7 +306,7 @@ namespace Step55
     double       viscosity;
     MPI_Comm     mpi_communicator;
 
-    FESystem<dim>                             fe;
+    const FESystem<dim>                       fe;
     parallel::distributed::Triangulation<dim> triangulation;
     DoFHandler<dim>                           dof_handler;
 
index 518256a0f0f44b3b78fe9f3d696e91669661efea..2c3a70f9839c88a139887e3fc0e7df6ae302642f 100644 (file)
@@ -420,11 +420,11 @@ namespace Step56
     const unsigned int pressure_degree;
     const SolverType   solver_type;
 
-    Triangulation<dim> triangulation;
-    FESystem<dim>      velocity_fe;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
-    DoFHandler<dim>    velocity_dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> velocity_fe;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
+    DoFHandler<dim>     velocity_dof_handler;
 
     AffineConstraints<double> constraints;
 
index 0ac9165a600ac25f55581e6ed21d604651fee3eb..59fb778044faf61515af1363a28498d1b96cb06c 100644 (file)
@@ -116,9 +116,9 @@ namespace Step57
     const unsigned int                   degree;
     std::vector<types::global_dof_index> dofs_per_block;
 
-    Triangulation<dim> triangulation;
-    FESystem<dim>      fe;
-    DoFHandler<dim>    dof_handler;
+    Triangulation<dim>  triangulation;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     AffineConstraints<double> zero_constraints;
     AffineConstraints<double> nonzero_constraints;
index e5109df2304390bd0ed140a379b892dd5d9d403a..fae086e6a6e3bca5a0fa387452afc8d37730ed49 100644 (file)
@@ -73,7 +73,7 @@ namespace Step58
 
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<std::complex<double>> constraints;
index c9a448b95648f63005f189896dfc3d1fe515768b..f827de3ef0a7e406ba27abb63991f8b9defb52f5 100644 (file)
@@ -924,8 +924,8 @@ namespace Step59
     Triangulation<dim> triangulation;
 #endif
 
-    FE_DGQHermite<dim> fe;
-    DoFHandler<dim>    dof_handler;
+    const FE_DGQHermite<dim> fe;
+    DoFHandler<dim>          dof_handler;
 
     MappingQ1<dim> mapping;
 
index 4ca202f208bf7cbb5ef3bb5b770e9436eb4e6f1e..62f416c7a3b76080aa6d375a00f1ad773c15dc78 100644 (file)
@@ -103,7 +103,7 @@ private:
 
   Triangulation<dim> triangulation;
 
-  FE_Q<dim>       fe;
+  const FE_Q<dim> fe;
   DoFHandler<dim> dof_handler;
 
 
index 24a24e3d8d40ec0359435a192a42ab33e9667f55..a264cf2637757df85f5c2a80addb1a59f604ec88 100644 (file)
@@ -97,8 +97,8 @@ namespace Step61
 
     Triangulation<dim> triangulation;
 
-    FESystem<dim>   fe;
-    DoFHandler<dim> dof_handler;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     AffineConstraints<double> constraints;
 
@@ -108,9 +108,9 @@ namespace Step61
     Vector<double> solution;
     Vector<double> system_rhs;
 
-    FE_DGRaviartThomas<dim> fe_dgrt;
-    DoFHandler<dim>         dof_handler_dgrt;
-    Vector<double>          darcy_velocity;
+    const FE_DGRaviartThomas<dim> fe_dgrt;
+    DoFHandler<dim>               dof_handler_dgrt;
+    Vector<double>                darcy_velocity;
   };
 
 
index f8d73115a424cafc612bc7099349d9689b8d3ae4..8ca692c73cf62dfeda0064c5d9254545094e69d8 100644 (file)
@@ -320,8 +320,8 @@ namespace step62
     std::vector<QuadratureCache<dim>> quadrature_cache;
 
 
-    FESystem<dim>   fe;
-    DoFHandler<dim> dof_handler;
+    const FESystem<dim> fe;
+    DoFHandler<dim>     dof_handler;
 
     IndexSet locally_owned_dofs;
     IndexSet locally_relevant_dofs;
index 68cb71f423f50e6f207e70ddd967a6ced6020e6b..441c98ac3db3d8041d09e6053228c5f937a0c841 100644 (file)
@@ -351,7 +351,7 @@ namespace Step64
 
     parallel::distributed::Triangulation<dim> triangulation;
 
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
     DoFHandler<dim> dof_handler;
 
     IndexSet locally_owned_dofs;
index b54c94363bf70cce982bc28b480f891c10cb51a7..9eb4466bf38eb28e1ed0fc7b5fe8b35b84a0addb 100644 (file)
@@ -134,7 +134,7 @@ namespace Step65
     void postprocess(const Mapping<dim> &mapping);
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<double> constraints;
index fa3b897ffff2ecf2283bbf6f2e0694e4f277748d..cc0d2b9155c930c207eb3adf545d0135f62186ef 100644 (file)
@@ -410,7 +410,7 @@ namespace Step66
 
     // As usual we then define the Lagrangian finite elements FE_Q and a
     // DoFHandler.
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
     DoFHandler<dim> dof_handler;
 
 
index aa3ca927a2120b739b85dbd0f906472dc7cf7105..54d9fad1f21308e344817c1bfc34930900f2fdf2 100644 (file)
@@ -1774,9 +1774,9 @@ namespace Euler_DG
     Triangulation<dim> triangulation;
 #endif
 
-    FESystem<dim>   fe;
-    MappingQ<dim>   mapping;
-    DoFHandler<dim> dof_handler;
+    const FESystem<dim> fe;
+    MappingQ<dim>       mapping;
+    DoFHandler<dim>     dof_handler;
 
     TimerOutput timer;
 
index 0f759b1fa660bb670359ef3c6c126400161e17ff..1e5b4373bc4aaecc6017aa1af41cff948cd4c68e 100644 (file)
@@ -230,7 +230,7 @@ namespace Step68
     Particles::ParticleHandler<dim>           particle_handler;
 
     DoFHandler<dim>                            fluid_dh;
-    FESystem<dim>                              fluid_fe;
+    const FESystem<dim>                        fluid_fe;
     MappingQ1<dim>                             mapping;
     LinearAlgebra::distributed::Vector<double> velocity_field;
 
index 8b2ca2fda7c71de8a120391fd17edf2b0f9a2066..f80eb2c37dd8251555b3d9cb1e5d215fe5947ca8 100644 (file)
@@ -1254,7 +1254,7 @@ int main()
                   << std::endl
                   << std::endl;
 
-        FE_Q<dim>             fe(1);
+        const FE_Q<dim>       fe(1);
         HelmholtzProblem<dim> helmholtz_problem_2d(
           fe, HelmholtzProblem<dim>::adaptive_refinement);
 
@@ -1268,7 +1268,7 @@ int main()
                   << "===========================================" << std::endl
                   << std::endl;
 
-        FE_Q<dim>             fe(1);
+        const FE_Q<dim>       fe(1);
         HelmholtzProblem<dim> helmholtz_problem_2d(
           fe, HelmholtzProblem<dim>::global_refinement);
 
@@ -1282,7 +1282,7 @@ int main()
                   << "===========================================" << std::endl
                   << std::endl;
 
-        FE_Q<dim>             fe(2);
+        const FE_Q<dim>       fe(2);
         HelmholtzProblem<dim> helmholtz_problem_2d(
           fe, HelmholtzProblem<dim>::global_refinement);
 
@@ -1296,7 +1296,7 @@ int main()
                   << "===========================================" << std::endl
                   << std::endl;
 
-        FE_Q<dim>             fe(2);
+        const FE_Q<dim>       fe(2);
         HelmholtzProblem<dim> helmholtz_problem_2d(
           fe, HelmholtzProblem<dim>::adaptive_refinement);
 
index 107503d41938ebc8167a4d6e0439f2f2b05569e7..268d57c8fb90bf73a0a2f6fcdc7c05cc63febcdc 100644 (file)
@@ -995,7 +995,7 @@ namespace Step70
       par.arguments_for_particle_grid);
     particle_insert_tria.refine_global(par.particle_insertion_refinement);
 
-    FE_Q<spacedim>       particles_fe(1);
+    const FE_Q<spacedim> particles_fe(1);
     DoFHandler<spacedim> particles_dof_handler(particle_insert_tria);
     particles_dof_handler.distribute_dofs(particles_fe);
 
index 1d9fdb1a999f9914db9a68b1a263dec4740c436f..5d9397968d53712775919fab93b809048253851a 100644 (file)
@@ -1201,9 +1201,9 @@ namespace Euler_DG
     Triangulation<dim> triangulation;
 #endif
 
-    FESystem<dim>   fe;
-    MappingQ<dim>   mapping;
-    DoFHandler<dim> dof_handler;
+    const FESystem<dim> fe;
+    MappingQ<dim>       mapping;
+    DoFHandler<dim>     dof_handler;
 
     TimerOutput timer;
 
index 8376adf554402fa713762829df1c5480263112e9..0bfb3a882e485550db15fadb42e194d31a741a9e 100644 (file)
@@ -109,7 +109,7 @@ namespace Step77
     Triangulation<dim> triangulation;
 
     DoFHandler<dim> dof_handler;
-    FE_Q<dim>       fe;
+    const FE_Q<dim> fe;
 
     AffineConstraints<double> hanging_node_constraints;
 
index be93d3cf34cfbbcf355513793266053594b5002c..8c5fac3d71c9f20ae7e3c2b0ad9e4f1bf2f71b00 100644 (file)
@@ -317,7 +317,7 @@ namespace BlackScholesSolver
     const double strike_price;
 
     Triangulation<dim> triangulation;
-    FE_Q<dim>          fe;
+    const FE_Q<dim>    fe;
     DoFHandler<dim>    dof_handler;
 
     AffineConstraints<double> constraints;
index 5cca5c6f0720525189bf7549615a4707cb526259..6a4daf3382619a909c11253907e82d3bc98316fa 100644 (file)
@@ -234,7 +234,7 @@ namespace SAND
     // factors below) as well as the filter matrix to ensure that
     // the design remains smooth.
     Triangulation<dim>        triangulation;
-    FESystem<dim>             fe;
+    const FESystem<dim>       fe;
     DoFHandler<dim>           dof_handler;
     AffineConstraints<double> constraints;
 
index f159a2cc57b48945bbde16420e6a60efdd87a693..2cbb46a98e5f77a20126c00f53870be808b871f7 100644 (file)
@@ -94,7 +94,7 @@ namespace Step8
     Triangulation<dim> triangulation;
     DoFHandler<dim>    dof_handler;
 
-    FESystem<dim> fe;
+    const FESystem<dim> fe;
 
     AffineConstraints<double> constraints;
 
index 67df8a7a555b18a93af75193caeb8e73e7615a9a..ed051c8367423fb98e0c66e044434193157d9039 100644 (file)
@@ -119,14 +119,14 @@ namespace Step82
 
     const unsigned int n_refinements;
 
-    FE_DGQ<dim>     fe;
-    DoFHandler<dim> dof_handler;
+    const FE_DGQ<dim> fe;
+    DoFHandler<dim>   dof_handler;
 
     // We also need a variable that describes the finite element space
     // $[\mathbb{V}_h]^{d\times d}$ used for the two lifting
     // operators. The other member variables below are as in most of the other
     // tutorial programs.
-    FESystem<dim> fe_lift;
+    const FESystem<dim> fe_lift;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> matrix;
index b9701e973ec8fada6f23802be1f982040e70d0ed..2e1451aebcc758c09567108d442793545ebe1669 100644 (file)
@@ -165,7 +165,7 @@ namespace Step87
     Triangulation<dim> tria;
     GridGenerator::subdivided_hyper_cube(tria, 7);
 
-    FE_Q<dim>       fe(fe_degree);
+    const FE_Q<dim> fe(fe_degree);
     DoFHandler<dim> dof_handler(tria);
     dof_handler.distribute_dofs(fe);
 
@@ -303,7 +303,7 @@ namespace Step87
     DistributedTriangulation<dim> tria(MPI_COMM_WORLD);
     GridGenerator::subdivided_hyper_cube(tria, 7);
 
-    FE_Q<dim>       fe(fe_degree);
+    const FE_Q<dim> fe(fe_degree);
     DoFHandler<dim> dof_handler(tria);
     dof_handler.distribute_dofs(fe);
 
@@ -465,7 +465,7 @@ namespace Step87
     pcout << "Running: example 2" << std::endl;
     pcout << "  - create system" << std::endl;
 
-    FE_Q<dim>                     fe(fe_degree);
+    const FE_Q<dim>               fe(fe_degree);
     MappingQ1<dim>                mapping;
     DistributedTriangulation<dim> tria(MPI_COMM_WORLD);
     GridGenerator::subdivided_hyper_cube(tria, 50);
@@ -736,9 +736,9 @@ namespace Step87
     GridGenerator::hyper_cube(tria_background);
     tria_background.refine_global(5);
 
-    MappingQ1<dim>  mapping_background;
-    FESystem<dim>   fe_background(FE_Q<dim>(degree), dim);
-    DoFHandler<dim> dof_handler_background(tria_background);
+    MappingQ1<dim>      mapping_background;
+    const FESystem<dim> fe_background(FE_Q<dim>(degree), dim);
+    DoFHandler<dim>     dof_handler_background(tria_background);
     dof_handler_background.distribute_dofs(fe_background);
 
     // and, similarly, for the immersed surface mesh.
@@ -763,9 +763,9 @@ namespace Step87
     mapping_immersed.initialize(mapping_immersed_base, tria_immersed);
     const QGauss<dim - 1> quadrature_immersed(degree + 1);
 
-    FE_Q<dim - 1, dim>       fe_scalar_immersed(degree);
-    FESystem<dim - 1, dim>   fe_immersed(fe_scalar_immersed, dim);
-    DoFHandler<dim - 1, dim> dof_handler_immersed(tria_immersed);
+    const FE_Q<dim - 1, dim>     fe_scalar_immersed(degree);
+    const FESystem<dim - 1, dim> fe_immersed(fe_scalar_immersed, dim);
+    DoFHandler<dim - 1, dim>     dof_handler_immersed(tria_immersed);
     dof_handler_immersed.distribute_dofs(fe_immersed);
 
     // We renumber the DoFs related to the vector-valued problem to
index 8ee0ae09606293ca1ad6558afa71a2f781688e06..017b7d7354a00c9d433a5d8c038f61308da7bdc7 100644 (file)
@@ -278,7 +278,7 @@ namespace Step9
     Triangulation<dim> triangulation;
     DoFHandler<dim>    dof_handler;
 
-    FE_Q<dim> fe;
+    const FE_Q<dim> fe;
 
     AffineConstraints<double> hanging_node_constraints;
 

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.