]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Localize typedefs, rather than polluting the dealii namespace.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jan 2010 08:41:40 +0000 (08:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jan 2010 08:41:40 +0000 (08:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@20301 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_transfer.templates.h

index 23666ab3d614e3823feaf1bcf0a7a529c59fbaab..a756eff5fb6596df5306f1ea79e8d4f1f7cde75a 100644 (file)
@@ -28,9 +28,6 @@ DEAL_II_NAMESPACE_OPEN
 
 /* --------------------- MGTransferPrebuilt -------------- */
 
-// Simplify some things below
-typedef std::map<unsigned int, unsigned int>::const_iterator IT;
-
 
 template <class VECTOR>
 template <int dim, class InVector, int spacedim>
@@ -45,6 +42,8 @@ MGTransferPrebuilt<VECTOR>::copy_to_mg (
   for (unsigned int level=mg_dof_handler.get_tria().n_levels();level != 0;)
     {
       --level;
+
+      typedef std::map<unsigned int, unsigned int>::const_iterator IT;
       for (IT i= copy_indices[level].begin();
           i != copy_indices[level].end();++i)
        dst[level](i->second) = src(i->first);
@@ -81,6 +80,7 @@ MGTransferPrebuilt<VECTOR>::copy_from_mg(
   dst = 0;
   for (unsigned int level=0;level<mg_dof_handler.get_tria().n_levels();++level)
   {
+    typedef std::map<unsigned int, unsigned int>::const_iterator IT;
     for (IT i= copy_indices[level].begin();
         i != copy_indices[level].end();++i)
       dst(i->first) = src[level](i->second);
@@ -106,6 +106,7 @@ MGTransferPrebuilt<VECTOR>::copy_from_mg_add (
                                       // to the coarse level, but
                                       // have fine level basis
                                       // functions
+  typedef std::map<unsigned int, unsigned int>::const_iterator IT;
   for (unsigned int level=0;level<mg_dof_handler.get_tria().n_levels();++level)
     for (IT i= copy_indices[level].begin();
         i != copy_indices[level].end();++i)

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.