]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Document the 'using namespace dealii;' clause at the beginning of each program
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 23 Oct 2006 21:47:43 +0000 (21:47 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 23 Oct 2006 21:47:43 +0000 (21:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@14057 0785d39b-7218-0410-832d-ea1e28bc413d

26 files changed:
deal.II/examples/step-1/step-1.cc
deal.II/examples/step-10/step-10.cc
deal.II/examples/step-11/step-11.cc
deal.II/examples/step-12/step-12.cc
deal.II/examples/step-13/step-13.cc
deal.II/examples/step-14/step-14.cc
deal.II/examples/step-15/step-15.cc
deal.II/examples/step-16/step-16.cc
deal.II/examples/step-17/step-17.cc
deal.II/examples/step-18/step-18.cc
deal.II/examples/step-19/step-19.cc
deal.II/examples/step-2/step-2.cc
deal.II/examples/step-20/step-20.cc
deal.II/examples/step-21/step-21.cc
deal.II/examples/step-23/step-23.cc
deal.II/examples/step-24/step-24.cc
deal.II/examples/step-25/step-25.cc
deal.II/examples/step-26/step-26.cc
deal.II/examples/step-27/step-27.cc
deal.II/examples/step-3/step-3.cc
deal.II/examples/step-4/step-4.cc
deal.II/examples/step-5/step-5.cc
deal.II/examples/step-6/step-6.cc
deal.II/examples/step-7/step-7.cc
deal.II/examples/step-8/step-8.cc
deal.II/examples/step-9/step-9.cc

index 58955c6932b1161210f38fd2fd47ca2dae69039b..79a7ae8e25cd7f54e633a2f216b74cdd686143d8 100644 (file)
                                 // `sqrt' and `fabs' functions:
 #include <cmath>
 
+                                // The final step in importing
+                                // deal.II is this: All deal.II
+                                // functions and classes are in a
+                                // namespace <code>dealii</code>, 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
+                                // <code>dealii::</code>, 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}
index 8ca3e40541ee7fe8b4a3624abc68cffff87e5470..ac6c1b53a7d55e329e31b62986aeeef81a0b2551 100644 (file)
@@ -39,6 +39,8 @@
 #include <fstream>
 #include <cmath>
 
+                                // The last step is as in previous
+                                // programs:
 using namespace dealii;
 
                                 // Now, as we want to compute the
index f78682c6566010830a2bba96af28e1f4da542dd9..15b292cf796de43d56fe7a6f8e46a3ca5a66c8c2 100644 (file)
@@ -55,6 +55,8 @@
 #include <iomanip>
 #include <cmath>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // Then we declare a class which
index 186831141a59031406fecb90cf653ad956aa4fdb..79e264e348c935b283f5545040c398b70c1efa2b 100644 (file)
@@ -76,6 +76,8 @@
 #include <iostream>
 #include <fstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // @sect3{Equation data}
index 16600d02bf4472568b0297812fa80d8d84e717d3..d78afc5302bc62f550af1a08c8c6b4d58e045193 100644 (file)
@@ -53,6 +53,8 @@
 #include <list>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // @sect3{Evaluation of the solution}
index 2914a770b1fc7c63ded655704e6f72bab1daae82..72dae09d152a33d1055174fa78be840d26039164 100644 (file)
@@ -47,6 +47,8 @@
 #include <numeric>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // @sect3{Evaluating the solution}
index 4e3665a6073b66279bd7f2f07ec79fc79b562315..beab3093ac02741a78476afc50fa46c3758f3a87 100644 (file)
@@ -50,6 +50,8 @@
 #include <iostream>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                  // The first thing we have here is a helper
index e4562831520e744d28367ede1ba0651a158cf8f2..13d3f35407288a5ee88ff710b53b06714accb025 100644 (file)
@@ -60,6 +60,8 @@
 #include <fstream>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // This class is based on the same
index 325a30a8108206462c41009253f58467a15480b1..f4a28516051310d2ed97fc0044d245006f3ab3aa 100644 (file)
@@ -98,6 +98,8 @@
 #include <iostream>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                  // Now, here comes the declaration of the
index 4e3be0df92eee611d1c017199dae0892f6d5dc87..900b75ef3d98b6c8ffe305ed98744fa4a2d03051 100644 (file)
@@ -67,6 +67,8 @@
 #include <sstream>
 #include <iomanip>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // So much for the header files. As a
index 0acce6a807925ea741364e66b979de9096336fbb..161c171c6992406eb749b120f8c90ae553af28d5 100644 (file)
 #include <iostream>
 #include <fstream>
 
+                                // As mentioned in the first few
+                                // tutorial programs, all names in
+                                // deal.II are declared in a
+                                // namespace <code>dealii</code>. 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,
index 92609813be2d2b1785f8b7415bf36b4b355a568f..26471436a4a17d1be6726930d69903d42686a84b 100644 (file)
@@ -59,6 +59,9 @@
                                 // And this is again needed for C++ output:
 #include <fstream>
 
+                                // Finally, as in step-1, we import
+                                // the deal.II namespace into the
+                                // global scope:
 using namespace dealii;
 
                                  // @sect3{Mesh generation}
index 518f9c28f970aeb7474f5f3fa44c5d8891b4cb08..8032e2b17fdb23de5a74dca8627d3fe632bb3bdf 100644 (file)
@@ -63,6 +63,8 @@
                                 // offers such functionality:
 #include <base/tensor_function.h>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                  // @sect3{The <code>MixedLaplaceProblem</code> class template}
index 6676b1c317210e792e792d105677618e9f300d69..4dbe61102b48ba1834806be17ef3968127c4825c 100644 (file)
@@ -48,6 +48,8 @@
                                 // offers such functionality:
 #include <base/tensor_function.h>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                  // @sect3{The ``TwoPhaseFlowProblem'' class template}
index 4bdf2cf41037cba3342204b167d19107c3edd46c..487f44495faeb8308afff908f2fe5f7968b3e421 100644 (file)
                                 // double digit time steps.
 #include <base/utilities.h>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
 
index b7e378b4eb2026663fd67ec85f0da75338fe7505..5c5d0eeceac8bba2c982d40917cdaaeca9423f7e 100644 (file)
@@ -53,6 +53,8 @@
                                 // diameter.
 #include <grid/grid_tools.h>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
                                 // @sect3{The "forward problem" class template}
index 96b0b200a354faf48a212ba6190bec2854938c58..741caa6288e6de1793053516e35b131bbdf8189f 100644 (file)
@@ -47,6 +47,8 @@
 #include <iostream>
 #include <sstream>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
 // The following global variable is used to determine whether the
index 173ca60a90d343d1fc9cf1cbca9aac280b211b33..0104a2cbb08413559f5b2abfe5e317df98a7abb1 100644 (file)
@@ -54,6 +54,8 @@
 #include <numeric>
 #include <grid/tria_boundary.h>
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
 class PointCloudSurface : public StraightBoundary<3>
index 89fb06c846667b66943dafb28ca8734262124f3b..37cc153d3255d33a42bdc55e2ca9401ea56d53e4 100644 (file)
@@ -96,6 +96,8 @@
 #include <lac/compressed_sparsity_pattern.h>
 
 
+                                // The last step is as in all
+                                // previous programs:
 using namespace dealii;
 
 
index b5aa75dcf601b27d2527a80a6318d9b6d09783fb..19f6e2673fa571de4210ea1a56471a87743a2970 100644 (file)
@@ -90,6 +90,9 @@
 #include <fstream>
 #include <iostream>
 
+                                // ...and this is to import the
+                                // deal.II namespace into the global
+                                // scope:
 using namespace dealii;
 
                                  // @sect3{The <code>LaplaceProblem</code> class}
index 2777783af5cf521e0bc0d1c569fe5e7c3ec55a2b..b4bd016800e26856ae7dc9b7bcd1f06c8a5a6520 100644 (file)
                                 // the main() function below for that):
 #include <base/logstream.h>
 
+                                // 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 <code>LaplaceProblem</code> class template}
index 947834122c5a1f7907f6c304ecd1134d48fc18d4..db38e900084953e3a32e86ac0a51298a212dae4f 100644 (file)
@@ -55,6 +55,9 @@
                                 // <code>ostringstream</code>:
 #include <sstream>
 
+                                // Finally, this has been discussed
+                                // in previous tutorial programs
+                                // before:
 using namespace dealii;
 
 
index 53c91563c768f8457aaf364166cfda7494474198..c5aa8725f847f0543fd78ee09f5722e9f4dec074 100644 (file)
                                 // problems.
 #include <numerics/error_estimator.h>
 
+                                // Finally, this is as in previous
+                                // programs:
 using namespace dealii;
 
 
index 814623d42ce35c0b080ddd0775b83f57db406901..43474c223a37c3f160b0a75822f6e3dbf461c11d 100644 (file)
@@ -81,6 +81,8 @@
 #include <fstream>
 #include <iostream>
 
+                                // The last step is as in previous
+                                // programs:
 using namespace dealii;
 
                                 // @sect3{Equation data}
index b37cc9b021665bdbc32cac1180417c59e7874c1f..b117c92f7ae818bb41d759c7db47688dc15e9302 100644 (file)
@@ -55,6 +55,8 @@
 #include <fstream>
 #include <iostream>
 
+                                // The last step is as in previous
+                                // programs:
 using namespace dealii;
 
                                  // @sect3{The <code>ElasticProblem</code> class template}
index 7e96c0b2e865e4700eaedfafe4a69baecc74ae25..87f41b7a714c6be0eb0565d299faa50927c6a3d9 100644 (file)
@@ -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}

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.