]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make it clearer what an integer argument means. 16948/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 1 May 2024 15:46:35 +0000 (21:16 +0530)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 1 May 2024 15:46:35 +0000 (21:16 +0530)
examples/step-3/doc/results.dox
examples/step-3/step-3.cc
examples/step-4/step-4.cc
examples/step-5/step-5.cc
examples/step-6/step-6.cc
examples/step-7/step-7.cc
examples/step-8/step-8.cc

index d5baf27f87f2b10214a50935cc7294990af078f8..0f540300a1e5cb562ac7dfd061433a684cfd4e4b 100644 (file)
@@ -140,7 +140,7 @@ suggestions:
   call to <code>interpolate_boundary_values</code> for boundary indicator one:
   @code
   VectorTools::interpolate_boundary_values(dof_handler,
-                                          1,
+                                          types::boundary_id(1),
                                           Functions::ConstantFunction<2>(1.),
                                           boundary_values);
   @endcode
index 47402656bc006da507a170e3895de368dd5340eb..1489755557c7ba2bb83f75a85e57dd7d4d054676 100644 (file)
@@ -490,8 +490,9 @@ void Step3::assemble_system()
   // boundary by indicators, and tell the interpolate_boundary_values
   // function to only compute the boundary values on a certain part of the
   // boundary (e.g. the clamped part, or the inflow boundary). By default,
-  // all boundaries have a 0 boundary indicator, unless otherwise specified. If
-  // sections of the boundary have different boundary conditions, you have to
+  // all boundaries have a 0 boundary indicator, unless otherwise specified.
+  // (For example, many functions in namespace GridGenerator specify otherwise.)
+  // If sections of the boundary have different boundary conditions, you have to
   // number those parts with different boundary indicators. The function call
   // below will then only determine boundary values for those parts of the
   // boundary for which the boundary indicator is in fact the zero specified as
@@ -510,7 +511,7 @@ void Step3::assemble_system()
   // class.
   std::map<types::global_dof_index, double> boundary_values;
   VectorTools::interpolate_boundary_values(dof_handler,
-                                           0,
+                                           types::boundary_id(0),
                                            Functions::ZeroFunction<2>(),
                                            boundary_values);
   // Now that we got the list of boundary DoFs and their respective boundary
index d0e622d7c6d86a0fa24dd48c7620b0b3c1c196c7..72aad950d3608cf0c1d91f07d63806b2836a8d52 100644 (file)
@@ -425,12 +425,12 @@ void Step4<dim>::assemble_system()
   // on faces that have been marked with boundary indicator 0 (because that's
   // what we say the function should work on with the second argument below).
   // If there are faces with boundary id other than 0, then the function
-  // interpolate_boundary_values will do nothing on these faces. For
+  // interpolate_boundary_values() will do nothing on these faces. For
   // the Laplace equation doing nothing is equivalent to assuming that
   // on those parts of the boundary a zero Neumann boundary condition holds.
   std::map<types::global_dof_index, double> boundary_values;
   VectorTools::interpolate_boundary_values(dof_handler,
-                                           0,
+                                           types::boundary_id(0),
                                            BoundaryValues<dim>(),
                                            boundary_values);
   MatrixTools::apply_boundary_values(boundary_values,
index bba78459f6ab6bec91f2e998a14587e9edbfe797..146cb66e256c9a8a14d1b6adadc3b7f393f5b9eb 100644 (file)
@@ -218,7 +218,7 @@ void Step5<dim>::assemble_system()
   // With the matrix so built, we use zero boundary values again:
   std::map<types::global_dof_index, double> boundary_values;
   VectorTools::interpolate_boundary_values(dof_handler,
-                                           0,
+                                           types::boundary_id(0),
                                            Functions::ZeroFunction<dim>(),
                                            boundary_values);
   MatrixTools::apply_boundary_values(boundary_values,
index 3dd3c7153c91b90c70fb68a3bb4f741842337350..77c54b64a118b84e7f702b89ecf44f2dc591ef1a 100644 (file)
@@ -194,7 +194,7 @@ void Step6<dim>::setup_system()
   // order: if two constraints conflict then the constraint matrix either abort
   // or throw an exception via the Assert macro.
   VectorTools::interpolate_boundary_values(dof_handler,
-                                           0,
+                                           types::boundary_id(0),
                                            Functions::ZeroFunction<dim>(),
                                            constraints);
 
index b13c306c5cf4fca40c5d486c5d76d5c107207a1f..9677857a0cacb9df5d76f4fa29f5326535bd981d 100644 (file)
@@ -688,7 +688,7 @@ namespace Step7
 
     std::map<types::global_dof_index, double> boundary_values;
     VectorTools::interpolate_boundary_values(dof_handler,
-                                             0,
+                                             types::boundary_id(0),
                                              Solution<dim>(),
                                              boundary_values);
     MatrixTools::apply_boundary_values(boundary_values,
index 517f37bda5a4d34220622c2fd7e4c844461219ff..a54ad161eea2de92c6208a03492233227971daed 100644 (file)
@@ -245,7 +245,7 @@ namespace Step8
     constraints.clear();
     DoFTools::make_hanging_node_constraints(dof_handler, constraints);
     VectorTools::interpolate_boundary_values(dof_handler,
-                                             0,
+                                             types::boundary_id(0),
                                              Functions::ZeroFunction<dim>(dim),
                                              constraints);
     constraints.close();

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.