]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Purge static non-const variables, or make them const to avoid ordering problems with...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Mar 2001 09:39:20 +0000 (09:39 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Mar 2001 09:39:20 +0000 (09:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@4233 0785d39b-7218-0410-832d-ea1e28bc413d

14 files changed:
deal.II/deal.II/source/fe/fe_values.cc
deal.II/deal.II/source/fe/mapping_q.cc
deal.II/deal.II/source/fe/mapping_q1.cc
deal.II/deal.II/source/grid/grid_reordering.cc
deal.II/deal.II/source/grid/tria.all_dimensions.cc
deal.II/deal.II/source/numerics/assembler.cc
deal.II/deal.II/source/numerics/data_out.cc
deal.II/deal.II/source/numerics/data_out_faces.cc
deal.II/deal.II/source/numerics/data_out_rotation.cc
deal.II/deal.II/source/numerics/data_out_stack.cc
deal.II/deal.II/source/numerics/derivative_approximation.cc
deal.II/deal.II/source/numerics/error_estimator.cc
deal.II/deal.II/source/numerics/matrices.cc
deal.II/deal.II/source/numerics/vectors.cc

index 3618e5fddd56b4850473e68f1f011a1f2499b9f7..091f6ff4cd11a9fba4314c42c7bbaa6a8ce7c3ac 100644 (file)
@@ -33,7 +33,7 @@ using namespace std;
 
 
 // TODO: replace this by non-global object
-static MappingQ1<deal_II_dimension> mapping_q1;
+static const MappingQ1<deal_II_dimension> mapping_q1;
 
 template <int dim>
 void
index dbe72a4f6e3534729eb5a6fae8f1189727c2d843..5a887dd40982dd928d0b04946019275d53d76ab1 100644 (file)
@@ -933,7 +933,7 @@ MappingQ<3>::add_quad_support_points(const Triangulation<3>::cell_iterator &cell
                                      {2,10,6,11},
                                      {8,7,11,3}};
 
-  static StraightBoundary<3> straight_boundary;
+  static const StraightBoundary<3> straight_boundary;
                                   // used if face quad at boundary or
                                   // entirely in the interior of the
                                   // domain
@@ -1047,7 +1047,7 @@ void
 MappingQ<3>::fill_quad_support_points_simple (const Triangulation<3>::cell_iterator &cell,
                                              std::vector<Point<3> > &a) const
 {
-  static StraightBoundary<3> straight_boundary;
+  static const StraightBoundary<3> straight_boundary;
 
   const Boundary<3> *boundary = 0;
 
index c15c55730531995290cbe52d607810635760c3c3..e8449b17230467d5fa9825dcb917dd9ca4b69afa 100644 (file)
@@ -947,8 +947,8 @@ MappingQ1<dim>::InternalData*
 MappingQ1<dim>::get_cell_data(const typename Triangulation<dim>::cell_iterator cell,
                              const UpdateFlags update_flags) const
 {
-  static Point<dim> dummy_p;
-  static Quadrature<dim> dummy_quadrature(dummy_p);
+  static const Point<dim> dummy_p;
+  static const Quadrature<dim> dummy_quadrature(dummy_p);
 
   InternalData *mdata=dynamic_cast<InternalData *> (
     get_data(update_flags, dummy_quadrature));
index 04eeb04447976378cba879221b954b87d0ffe1ca..6286fef6b3c0a0a1c272f1bdd8c5e9a205ba5e70 100644 (file)
@@ -942,14 +942,6 @@ void GridReordering<dim>::find_reordering (typename std::vector<Cell>
                                       // cell in the present
                                       // orientation is valid
       check_topmost_cell:
-
-      static unsigned int max_size = 0;
-      if (rotation_states.size() > max_size)
-       {
-         max_size = rotation_states.size();
-//       if (max_size % 10 == 0)
-//         cout << "New max size " << rotation_states.size() << endl;
-       };
       
       const typename std::vector<Cell>::iterator
        try_cell = cells.begin() + rotation_states.size()-1;
index b44f8ad66346525e51eedff0ad6fb67a91da7436..f46d0393bb704b18ed44c215523125934e39889f 100644 (file)
@@ -66,7 +66,7 @@ void CellData<3>::rotate (const unsigned int times)
                                   // list the 24 ways to rotate a
                                   // cell, by the ways by which the
                                   // vertices are then permuted
-  static unsigned int rotations[24][GeometryInfo<3>::vertices_per_cell]
+  static const unsigned int rotations[24][GeometryInfo<3>::vertices_per_cell]
     = {   {0,1,2,3,4,5,6,7},
          {1,5,6,2,0,4,7,3},
          {5,4,7,6,1,0,3,2},
index 794690cbc5eacb04fc62b1be43451a0fae304cb0..11b48d29184ea5b919c2ec1fbf91311b374e0867 100644 (file)
@@ -29,8 +29,8 @@ using namespace std;
 #endif
 
 
-
-static MappingQ1<deal_II_dimension> mapping;
+//TODO: purge this variable
+static const MappingQ1<deal_II_dimension> mapping;
 
 template <int dim>
 Assembler<dim>::AssemblerData::AssemblerData (const DoFHandler<dim>    &dof,
index 7902c30df498e2451b898c78c77de3bf7a2217fc..96942fdc64a469149b2584260b266c1f68ededb1 100644 (file)
@@ -25,7 +25,7 @@
 #include <fe/mapping_q1.h>
 
 //TODO: Do this more clever
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 #ifdef DEAL_II_USE_MT
 #include <base/thread_management.h>
index f29a1f763d04fcd4b957dd491fac70984937c3af..83ec1fefd476fe11e1bfda8ebd200cd70c4900ca 100644 (file)
@@ -25,7 +25,7 @@
 #include <fe/mapping_q1.h>
 
 //TODO: Do this more clever
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 #ifdef DEAL_II_USE_MT
 #include <base/thread_management.h>
index 9142d73b4ae542c72aa7e7038e4adc0f05559d86..d1476267e21a25d7baa3dbcdbe4a3d1c88857046 100644 (file)
@@ -24,7 +24,7 @@
 #include <fe/fe_values.h>
 
 //TODO: Do this more clever
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 #ifdef DEAL_II_USE_MT
 #include <base/thread_management.h>
index 6aeee12a0ee264558d118c09a4d9cb7b38294a2e..322f418c6025c17a3217f6771bdf6e67b08ee0f3 100644 (file)
@@ -32,7 +32,7 @@ using namespace std;
 
 
 //TODO: Comment?? Use proper mapping!
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 
 template <int dim>
index 7f534b38e4c296615b5d3887816d6945dbc4713d..242ed0eb3a73d9b752f87424396ff8ef048dee1d 100644 (file)
@@ -28,7 +28,7 @@
 
 
 //TODO: Comment? Use proper mapping!
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 
 template <typename T>
index d66742d6c12581abb68a8283726e5561a66446de..705a915da8ac61515505a14e234c856a9194a840 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
 
 
 //TODO: Comment?? Proper Mapping
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 
 
index b6a0cee4b93e7037bb829281b5022e1ea76c6017..2a87dc2568a1c04c9392e49085d916c45fce422d 100644 (file)
@@ -42,7 +42,7 @@ using namespace std;
 
 
 //TODO: Comment?? Use proper mapping!
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 
 
index 98864bfb46b4527f863fd4dfebdd9720d5af4ada..eae932880d99584768e92b742fcb90ac61f69f3a 100644 (file)
@@ -45,7 +45,7 @@ using namespace std;
 
 
 //TODO: Comment?? Use proper mapping!
-static MappingQ1<deal_II_dimension> mapping;
+static const MappingQ1<deal_II_dimension> mapping;
 
 
 

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.