From: bangerth Date: Mon, 23 Oct 2006 21:47:43 +0000 (+0000) Subject: Document the 'using namespace dealii;' clause at the beginning of each program X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b9b8d1723313605efeb79a98c56cf2cf8ac1e84;p=dealii-svn.git Document the 'using namespace dealii;' clause at the beginning of each program git-svn-id: https://svn.dealii.org/trunk@14057 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-1/step-1.cc b/deal.II/examples/step-1/step-1.cc index 58955c6932..79a7ae8e25 100644 --- a/deal.II/examples/step-1/step-1.cc +++ b/deal.II/examples/step-1/step-1.cc @@ -38,6 +38,21 @@ // `sqrt' and `fabs' functions: #include + // The final step in importing + // deal.II is this: All deal.II + // functions and classes are in a + // namespace dealii, to + // make sure they don't clash with + // symbols from other libraries you + // may want to use in conjunction + // with deal.II. One could use these + // functions and classes by prefixing + // every use of these names by + // dealii::, but that + // would quickly become cumbersome + // and annoying. Rather, we simply + // import the entire deal.II + // namespace for general use: using namespace dealii; // @sect3{Creating the first mesh} diff --git a/deal.II/examples/step-10/step-10.cc b/deal.II/examples/step-10/step-10.cc index 8ca3e40541..ac6c1b53a7 100644 --- a/deal.II/examples/step-10/step-10.cc +++ b/deal.II/examples/step-10/step-10.cc @@ -39,6 +39,8 @@ #include #include + // The last step is as in previous + // programs: using namespace dealii; // Now, as we want to compute the diff --git a/deal.II/examples/step-11/step-11.cc b/deal.II/examples/step-11/step-11.cc index f78682c656..15b292cf79 100644 --- a/deal.II/examples/step-11/step-11.cc +++ b/deal.II/examples/step-11/step-11.cc @@ -55,6 +55,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // Then we declare a class which diff --git a/deal.II/examples/step-12/step-12.cc b/deal.II/examples/step-12/step-12.cc index 186831141a..79e264e348 100644 --- a/deal.II/examples/step-12/step-12.cc +++ b/deal.II/examples/step-12/step-12.cc @@ -76,6 +76,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{Equation data} diff --git a/deal.II/examples/step-13/step-13.cc b/deal.II/examples/step-13/step-13.cc index 16600d02bf..d78afc5302 100644 --- a/deal.II/examples/step-13/step-13.cc +++ b/deal.II/examples/step-13/step-13.cc @@ -53,6 +53,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{Evaluation of the solution} diff --git a/deal.II/examples/step-14/step-14.cc b/deal.II/examples/step-14/step-14.cc index 2914a770b1..72dae09d15 100644 --- a/deal.II/examples/step-14/step-14.cc +++ b/deal.II/examples/step-14/step-14.cc @@ -47,6 +47,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{Evaluating the solution} diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index 4e3665a607..beab3093ac 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -50,6 +50,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // The first thing we have here is a helper diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index e456283152..13d3f35407 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -60,6 +60,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // This class is based on the same diff --git a/deal.II/examples/step-17/step-17.cc b/deal.II/examples/step-17/step-17.cc index 325a30a810..f4a2851605 100644 --- a/deal.II/examples/step-17/step-17.cc +++ b/deal.II/examples/step-17/step-17.cc @@ -98,6 +98,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // Now, here comes the declaration of the diff --git a/deal.II/examples/step-18/step-18.cc b/deal.II/examples/step-18/step-18.cc index 4e3be0df92..900b75ef3d 100644 --- a/deal.II/examples/step-18/step-18.cc +++ b/deal.II/examples/step-18/step-18.cc @@ -67,6 +67,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // So much for the header files. As a diff --git a/deal.II/examples/step-19/step-19.cc b/deal.II/examples/step-19/step-19.cc index 0acce6a807..161c171c69 100644 --- a/deal.II/examples/step-19/step-19.cc +++ b/deal.II/examples/step-19/step-19.cc @@ -27,6 +27,14 @@ #include #include + // As mentioned in the first few + // tutorial programs, all names in + // deal.II are declared in a + // namespace dealii. To + // make using these function and + // class names simpler, we import the + // entire content of that namespace + // into the global scope: using namespace dealii; // Before we start with the actual program, diff --git a/deal.II/examples/step-2/step-2.cc b/deal.II/examples/step-2/step-2.cc index 92609813be..26471436a4 100644 --- a/deal.II/examples/step-2/step-2.cc +++ b/deal.II/examples/step-2/step-2.cc @@ -59,6 +59,9 @@ // And this is again needed for C++ output: #include + // Finally, as in step-1, we import + // the deal.II namespace into the + // global scope: using namespace dealii; // @sect3{Mesh generation} diff --git a/deal.II/examples/step-20/step-20.cc b/deal.II/examples/step-20/step-20.cc index 518f9c28f9..8032e2b17f 100644 --- a/deal.II/examples/step-20/step-20.cc +++ b/deal.II/examples/step-20/step-20.cc @@ -63,6 +63,8 @@ // offers such functionality: #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{The MixedLaplaceProblem class template} diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index 6676b1c317..4dbe61102b 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -48,6 +48,8 @@ // offers such functionality: #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{The ``TwoPhaseFlowProblem'' class template} diff --git a/deal.II/examples/step-23/step-23.cc b/deal.II/examples/step-23/step-23.cc index 4bdf2cf410..487f44495f 100644 --- a/deal.II/examples/step-23/step-23.cc +++ b/deal.II/examples/step-23/step-23.cc @@ -110,6 +110,8 @@ // double digit time steps. #include + // The last step is as in all + // previous programs: using namespace dealii; diff --git a/deal.II/examples/step-24/step-24.cc b/deal.II/examples/step-24/step-24.cc index b7e378b4eb..5c5d0eecea 100644 --- a/deal.II/examples/step-24/step-24.cc +++ b/deal.II/examples/step-24/step-24.cc @@ -53,6 +53,8 @@ // diameter. #include + // The last step is as in all + // previous programs: using namespace dealii; // @sect3{The "forward problem" class template} diff --git a/deal.II/examples/step-25/step-25.cc b/deal.II/examples/step-25/step-25.cc index 96b0b200a3..741caa6288 100644 --- a/deal.II/examples/step-25/step-25.cc +++ b/deal.II/examples/step-25/step-25.cc @@ -47,6 +47,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; // The following global variable is used to determine whether the diff --git a/deal.II/examples/step-26/step-26.cc b/deal.II/examples/step-26/step-26.cc index 173ca60a90..0104a2cbb0 100644 --- a/deal.II/examples/step-26/step-26.cc +++ b/deal.II/examples/step-26/step-26.cc @@ -54,6 +54,8 @@ #include #include + // The last step is as in all + // previous programs: using namespace dealii; class PointCloudSurface : public StraightBoundary<3> diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index 89fb06c846..37cc153d32 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -96,6 +96,8 @@ #include + // The last step is as in all + // previous programs: using namespace dealii; diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index b5aa75dcf6..19f6e2673f 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -90,6 +90,9 @@ #include #include + // ...and this is to import the + // deal.II namespace into the global + // scope: using namespace dealii; // @sect3{The LaplaceProblem class} diff --git a/deal.II/examples/step-4/step-4.cc b/deal.II/examples/step-4/step-4.cc index 2777783af5..b4bd016800 100644 --- a/deal.II/examples/step-4/step-4.cc +++ b/deal.II/examples/step-4/step-4.cc @@ -49,6 +49,10 @@ // the main() function below for that): #include + // The final step, as in previous + // programs, is to import all the + // deal.II class and function names + // into the global namespace: using namespace dealii; // @sect3{The LaplaceProblem class template} diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 947834122c..db38e90008 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -55,6 +55,9 @@ // ostringstream: #include + // Finally, this has been discussed + // in previous tutorial programs + // before: using namespace dealii; diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 53c91563c7..c5aa8725f8 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -100,6 +100,8 @@ // problems. #include + // Finally, this is as in previous + // programs: using namespace dealii; diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index 814623d42c..43474c223a 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -81,6 +81,8 @@ #include #include + // The last step is as in previous + // programs: using namespace dealii; // @sect3{Equation data} diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index b37cc9b021..b117c92f7a 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -55,6 +55,8 @@ #include #include + // The last step is as in previous + // programs: using namespace dealii; // @sect3{The ElasticProblem class template} diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 7e96c0b2e8..87f41b7a71 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -85,6 +85,8 @@ # define M_PI 3.14159265358979323846 #endif + // The last step is as in previous + // programs: using namespace dealii; // @sect3{AdvectionProblem class declaration}