]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge branch 'master' into dofhandler-cleanup-3 4534/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 22 Jun 2017 02:07:02 +0000 (21:07 -0500)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2017 02:07:02 +0000 (21:07 -0500)
1  2 
source/dofs/dof_handler_policy.cc

index dc497ae10592c0b05b900a5be8794cc90bff44b0,b8ee6c24cbe3d055d65bc4134c4c5a8b43ae7cf5..bd3f60899a2a7290f37082689a5c2ac54bc47831
@@@ -560,11 -560,11 +560,11 @@@ namespace interna
                  {
                    const dealii::types::global_dof_index idx = i->get_index (level, d);
                    if (check_validity)
 -                    Assert(idx != DoFHandler<1>::invalid_dof_index, ExcInternalError ());
 +                    Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                  if (idx != DoFHandler<1>::invalid_dof_index)
 +                  if (idx != numbers::invalid_dof_index)
                      i->set_index (level, d,
-                                   (indices.n_elements() == 0)?
+                                   (indices.size() == 0)?
                                    (new_numbers[idx]) :
                                    (new_numbers[indices.index_within_set(idx)]));
                  }
                 i!=dof_handler.mg_levels[level]->dof_object.dofs.end();
                 ++i)
              {
 -              if (*i != DoFHandler<1>::invalid_dof_index)
 +              if (*i != numbers::invalid_dof_index)
                  {
                    Assert(*i<new_numbers.size(), ExcInternalError());
-                   *i = (indices.n_elements() == 0)?
+                   *i = (indices.size() == 0)?
                         (new_numbers[*i]) :
                         (new_numbers[indices.index_within_set(*i)]);
                  }
            for (std::vector<types::global_dof_index>::iterator
                 i=dof_handler.vertex_dofs.begin();
                 i!=dof_handler.vertex_dofs.end(); ++i)
 -            if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
 +            if (*i != numbers::invalid_dof_index)
-               *i = (indices.n_elements() == 0)?
+               *i = (indices.size() == 0)?
                     (new_numbers[*i]) :
                     (new_numbers[indices.index_within_set(*i)]);
              else if (check_validity)
            for (std::vector<types::global_dof_index>::iterator
                 i=dof_handler.faces->lines.dofs.begin();
                 i!=dof_handler.faces->lines.dofs.end(); ++i)
 -            if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
 +            if (*i != numbers::invalid_dof_index)
-               *i = ((indices.n_elements() == 0) ?
+               *i = ((indices.size() == 0) ?
                      new_numbers[*i] :
                      new_numbers[indices.index_within_set(*i)]);
  
                for (std::vector<types::global_dof_index>::iterator
                     i=dof_handler.levels[level]->dof_object.dofs.begin();
                     i!=dof_handler.levels[level]->dof_object.dofs.end(); ++i)
 -                if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
 +                if (*i != numbers::invalid_dof_index)
-                   *i = ((indices.n_elements() == 0) ?
+                   *i = ((indices.size() == 0) ?
                          new_numbers[*i] :
                          new_numbers[indices.index_within_set(*i)]);
              }
                  {
                    const dealii::types::global_dof_index idx = i->get_index (level, d);
                    if (check_validity)
 -                    Assert(idx != DoFHandler<2>::invalid_dof_index, ExcInternalError ());
 +                    Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                  if (idx != DoFHandler<1>::invalid_dof_index)
 +                  if (idx != numbers::invalid_dof_index)
                      i->set_index (level, d/*, dof_handler.get_fe().dofs_per_vertex*/,
-                                   ((indices.n_elements() == 0) ?
+                                   ((indices.size() == 0) ?
                                     new_numbers[idx] :
                                     new_numbers[indices.index_within_set(idx)]));
                  }
                          {
                            const dealii::types::global_dof_index idx = cell->line(l)->mg_dof_index(level, d);
                            if (check_validity)
 -                            Assert(idx != DoFHandler<2>::invalid_dof_index, ExcInternalError ());
 +                            Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                          if (idx != DoFHandler<1>::invalid_dof_index)
 +                          if (idx != numbers::invalid_dof_index)
-                             cell->line(l)->set_mg_dof_index (level, d, ((indices.n_elements() == 0) ?
+                             cell->line(l)->set_mg_dof_index (level, d, ((indices.size() == 0) ?
                                                                          new_numbers[idx] :
                                                                          new_numbers[indices.index_within_set(idx)]));
                          }
            for (std::vector<types::global_dof_index>::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin();
                 i!=dof_handler.mg_levels[level]->dof_object.dofs.end(); ++i)
              {
 -              if (*i != DoFHandler<2>::invalid_dof_index)
 +              if (*i != numbers::invalid_dof_index)
                  {
                    Assert(*i<new_numbers.size(), ExcInternalError());
-                   *i = ((indices.n_elements() == 0) ?
+                   *i = ((indices.size() == 0) ?
                          new_numbers[*i] :
                          new_numbers[indices.index_within_set(*i)]);
                  }
            for (std::vector<types::global_dof_index>::iterator
                 i=dof_handler.vertex_dofs.begin();
                 i!=dof_handler.vertex_dofs.end(); ++i)
 -            if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
 +            if (*i != numbers::invalid_dof_index)
-               *i = ((indices.n_elements() == 0) ?
+               *i = ((indices.size() == 0) ?
                      new_numbers[*i] :
                      new_numbers[indices.index_within_set(*i)]);
              else if (check_validity)
            for (std::vector<types::global_dof_index>::iterator
                 i=dof_handler.faces->lines.dofs.begin();
                 i!=dof_handler.faces->lines.dofs.end(); ++i)
 -            if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
 +            if (*i != numbers::invalid_dof_index)
-               *i = ((indices.n_elements() == 0) ?
+               *i = ((indices.size() == 0) ?
                      new_numbers[*i] :
                      new_numbers[indices.index_within_set(*i)]);
            for (std::vector<types::global_dof_index>::iterator
                 i=dof_handler.faces->quads.dofs.begin();
                 i!=dof_handler.faces->quads.dofs.end(); ++i)
 -            if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
 +            if (*i != numbers::invalid_dof_index)
-               *i = ((indices.n_elements() == 0) ?
+               *i = ((indices.size() == 0) ?
                      new_numbers[*i] :
                      new_numbers[indices.index_within_set(*i)]);
  
                for (std::vector<types::global_dof_index>::iterator
                     i=dof_handler.levels[level]->dof_object.dofs.begin();
                     i!=dof_handler.levels[level]->dof_object.dofs.end(); ++i)
 -                if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
 +                if (*i != numbers::invalid_dof_index)
-                   *i = ((indices.n_elements() == 0) ?
+                   *i = ((indices.size() == 0) ?
                          new_numbers[*i] :
                          new_numbers[indices.index_within_set(*i)]);
              }
                  {
                    const dealii::types::global_dof_index idx = i->get_index (level, d);
                    if (check_validity)
 -                    Assert(idx != DoFHandler<3>::invalid_dof_index, ExcInternalError ());
 +                    Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                  if (idx != DoFHandler<3>::invalid_dof_index)
 +                  if (idx != numbers::invalid_dof_index)
                      i->set_index (level, d,
-                                   ((indices.n_elements() == 0) ?
+                                   ((indices.size() == 0) ?
                                     new_numbers[idx] :
                                     new_numbers[indices.index_within_set(idx)]));
                  }
                          {
                            const dealii::types::global_dof_index idx = cell->line(l)->mg_dof_index(level, d);
                            if (check_validity)
 -                            Assert(idx != DoFHandler<3>::invalid_dof_index, ExcInternalError ());
 +                            Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                          if (idx != DoFHandler<3>::invalid_dof_index)
 +                          if (idx != numbers::invalid_dof_index)
-                             cell->line(l)->set_mg_dof_index (level, d, ((indices.n_elements() == 0) ?
+                             cell->line(l)->set_mg_dof_index (level, d, ((indices.size() == 0) ?
                                                                          new_numbers[idx] :
                                                                          new_numbers[indices.index_within_set(idx)]));
                          }
                          {
                            const dealii::types::global_dof_index idx = cell->quad(l)->mg_dof_index(level, d);
                            if (check_validity)
 -                            Assert(idx != DoFHandler<3>::invalid_dof_index, ExcInternalError ());
 +                            Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
  
 -                          if (idx != DoFHandler<1>::invalid_dof_index)
 +                          if (idx != numbers::invalid_dof_index)
-                             cell->quad(l)->set_mg_dof_index (level, d, ((indices.n_elements() == 0) ?
+                             cell->quad(l)->set_mg_dof_index (level, d, ((indices.size() == 0) ?
                                                                          new_numbers[idx] :
                                                                          new_numbers[indices.index_within_set(idx)]));
                          }
            for (std::vector<types::global_dof_index>::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin();
                 i!=dof_handler.mg_levels[level]->dof_object.dofs.end(); ++i)
              {
 -              if (*i != DoFHandler<3>::invalid_dof_index)
 +              if (*i != numbers::invalid_dof_index)
                  {
                    Assert(*i<new_numbers.size(), ExcInternalError());
-                   *i = ((indices.n_elements() == 0) ?
+                   *i = ((indices.size() == 0) ?
                          new_numbers[*i] :
                          new_numbers[indices.index_within_set(*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.