From: kronbichler Date: Wed, 30 Sep 2009 16:56:24 +0000 (+0000) Subject: Undo one change that I committed before: It seems that gcc prior v4.4 cannot use... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0239f413a88acf097f0848443afc1d8937ff791;p=dealii-svn.git Undo one change that I committed before: It seems that gcc prior v4.4 cannot use Table<2,bool> as a default argument. git-svn-id: https://svn.dealii.org/trunk@19621 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/constraint_matrix.h b/deal.II/lac/include/lac/constraint_matrix.h index 393c2fc529..c98ab653e3 100644 --- a/deal.II/lac/include/lac/constraint_matrix.h +++ b/deal.II/lac/include/lac/constraint_matrix.h @@ -1308,7 +1308,7 @@ class ConstraintMatrix : public Subscriptor add_entries_local_to_global (const std::vector &local_dof_indices, SparsityType &sparsity_pattern, const bool keep_constrained_entries = true, - const Table<2,bool> &dof_mask = Table<2,bool>()) const; + const Table<2,bool> &dof_mask = default_empty_table) const; /** * This function imports values from a @@ -1622,6 +1622,13 @@ class ConstraintMatrix : public Subscriptor */ static bool check_zero_weight (const std::pair &p); + /** + * Dummy table that serves as default + * argument for function + * add_entries_local_to_global(). + */ + static const Table<2,bool> default_empty_table; + /** * This function actually implements * the local_to_global function for @@ -1734,9 +1741,9 @@ ConstraintMatrix::add_line (const unsigned int line) // existing entries for cache if (line >= lines_cache.size()) lines_cache.resize (line+1,0); - // enlarge lines vector if necessary. - // need to reset the pointers to the - // ConstraintLine entries in that case, + // enlarge lines vector if necessary. + // need to reset the pointers to the + // ConstraintLine entries in that case, // since new memory will be allocated if (lines.size() == lines.capacity()) { diff --git a/deal.II/lac/source/constraint_matrix.cc b/deal.II/lac/source/constraint_matrix.cc index e0bc0c15b6..6e87a8cca5 100644 --- a/deal.II/lac/source/constraint_matrix.cc +++ b/deal.II/lac/source/constraint_matrix.cc @@ -55,6 +55,11 @@ DEAL_II_NAMESPACE_OPEN + // Static member variable +const Table<2,bool> ConstraintMatrix::default_empty_table = Table<2,bool>(); + + + bool ConstraintMatrix::check_zero_weight (const std::pair &p) { @@ -237,7 +242,7 @@ void ConstraintMatrix::close () ExcMessage ("Cycle in constraints detected!")); const ConstraintLine * constrained_line = lines_cache[dof_index]; - Assert (constrained_line->line == dof_index, + Assert (constrained_line->line == dof_index, ExcInternalError()); // now we have to @@ -465,7 +470,7 @@ void ConstraintMatrix::close () // make sure that // entry->first is not the // index of a line itself - const ConstraintLine * it = entry->first < lines_cache.size() ? + const ConstraintLine * it = entry->first < lines_cache.size() ? lines_cache[entry->first] : 0; Assert (it == 0, ExcDoFConstrainedToConstrainedDoF(line->line, entry->first));