From 19e4acf5a519513d7c1b1fd4beedcc6b27cab3e4 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 24 Feb 1999 20:15:31 +0000 Subject: [PATCH] Remove some kludges once needed to persuade gcc 2.7 and 2.8 to compile our code (yes, deal.II really is that old...) and are no more with egcs 1.1.1. git-svn-id: https://svn.dealii.org/trunk@901 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_handler.h | 3 --- deal.II/deal.II/include/dofs/mg_dof_handler.h | 3 --- .../include/multigrid/mg_dof_handler.h | 3 --- .../deal.II/source/dofs/dof_constraints.cc | 12 ++---------- deal.II/deal.II/source/dofs/mg_dof_handler.cc | 19 +++---------------- deal.II/deal.II/source/fe/fe.cc | 5 ----- .../source/multigrid/mg_dof_handler.cc | 19 +++---------------- 7 files changed, 8 insertions(+), 56 deletions(-) diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index 76a27b25ad..626b52476a 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -475,9 +475,6 @@ enum RenumberingMethod { template class DoFHandler : public DoFDimensionInfo { public: - // insert these definitions for gcc2.8, - // since it can't inherit typedefs (I - // believe it should, but it can't) typedef typename DoFDimensionInfo::raw_line_iterator raw_line_iterator; typedef typename DoFDimensionInfo::line_iterator line_iterator; typedef typename DoFDimensionInfo::active_line_iterator active_line_iterator; diff --git a/deal.II/deal.II/include/dofs/mg_dof_handler.h b/deal.II/deal.II/include/dofs/mg_dof_handler.h index f3d661171b..616d910b8e 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_handler.h +++ b/deal.II/deal.II/include/dofs/mg_dof_handler.h @@ -123,9 +123,6 @@ class MGDoFDimensionInfo<3> { template class MGDoFHandler : public DoFHandler { public: - // insert these definitions for gcc2.8, - // since it can't inherit typedefs (I - // believe it should, but it can't) typedef typename MGDoFDimensionInfo::raw_line_iterator raw_line_iterator; typedef typename MGDoFDimensionInfo::line_iterator line_iterator; typedef typename MGDoFDimensionInfo::active_line_iterator active_line_iterator; diff --git a/deal.II/deal.II/include/multigrid/mg_dof_handler.h b/deal.II/deal.II/include/multigrid/mg_dof_handler.h index f3d661171b..616d910b8e 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_handler.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_handler.h @@ -123,9 +123,6 @@ class MGDoFDimensionInfo<3> { template class MGDoFHandler : public DoFHandler { public: - // insert these definitions for gcc2.8, - // since it can't inherit typedefs (I - // believe it should, but it can't) typedef typename MGDoFDimensionInfo::raw_line_iterator raw_line_iterator; typedef typename MGDoFDimensionInfo::line_iterator line_iterator; typedef typename MGDoFDimensionInfo::active_line_iterator active_line_iterator; diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index 8b9cc892db..cbbeed1db4 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -240,11 +240,7 @@ void ConstraintMatrix::condense (SparseMatrixStruct &sparsity) const { // otherwise, the number states which // line in the constraint matrix handles // this index - // - // for gcc2.9: replace this by - // distribute(sparsity.n_rows(), -1) - vector distribute; - distribute.resize (sparsity.n_rows(), -1); + vector distribute(sparsity.n_rows(), -1); for (unsigned int c=0; c(c); @@ -448,11 +444,7 @@ void ConstraintMatrix::condense (SparseMatrix &uncondensed) const { // otherwise, the number states which // line in the constraint matrix handles // this index - // - // for gcc2.9: replace this by - // distribute(sparsity.n_rows(), -1) - vector distribute; - distribute.resize (sparsity.n_rows(), -1); + vector distribute (sparsity.n_rows(), -1); for (unsigned int c=0; c(c); diff --git a/deal.II/deal.II/source/dofs/mg_dof_handler.cc b/deal.II/deal.II/source/dofs/mg_dof_handler.cc index f6092999ed..027864b203 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_handler.cc @@ -1038,14 +1038,7 @@ void MGDoFHandler::renumber_dofs (const unsigned int level, int n_dofs = sparsity.n_rows(); // store the new dof numbers; -1 means // that no new number was chosen yet - // - // the commented line is what would be the - // correct way to do, but gcc2.8 chokes - // over that. The other lines are a - // workaround -// vector new_number(n_dofs, -1); - vector new_number; - new_number.resize (n_dofs, -1); + vector new_number(n_dofs, -1); // store the indices of the dofs renumbered // in the last round. Default to starting @@ -1421,14 +1414,8 @@ void MGDoFHandler<2>::reserve_space () { // vertex we pass by belongs to mg_vertex_dofs.resize (tria->vertices.size()); - // here again, gcc2.8 fails to - // construct the vector properly - // using parameters to the constructor -// vector min_level (tria->vertices.size(), tria->n_levels()); -// vector max_level (tria->vertices.size(), 0); - vector min_level, max_level; - min_level.resize (tria->vertices.size(), tria->n_levels()); - max_level.resize (tria->vertices.size(), 0); + vector min_level (tria->vertices.size(), tria->n_levels()); + vector max_level (tria->vertices.size(), 0); Triangulation::cell_iterator cell = tria->begin(), endc = tria->end(); diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 5cb3fc4ee8..00b81c293c 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -215,11 +215,6 @@ FiniteElement::FiniteElement (const FiniteElementData &fe_data) : #if deal_II_dimension == 1 -// declare this function to be explicitely specialized before first use -// egcs wants this, but gcc2.8.1 produces an internal compiler error, so -// we drop this declaration again for the time being - - template <> void FiniteElement<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell, const Boundary<1> &, diff --git a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc index f6092999ed..027864b203 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc @@ -1038,14 +1038,7 @@ void MGDoFHandler::renumber_dofs (const unsigned int level, int n_dofs = sparsity.n_rows(); // store the new dof numbers; -1 means // that no new number was chosen yet - // - // the commented line is what would be the - // correct way to do, but gcc2.8 chokes - // over that. The other lines are a - // workaround -// vector new_number(n_dofs, -1); - vector new_number; - new_number.resize (n_dofs, -1); + vector new_number(n_dofs, -1); // store the indices of the dofs renumbered // in the last round. Default to starting @@ -1421,14 +1414,8 @@ void MGDoFHandler<2>::reserve_space () { // vertex we pass by belongs to mg_vertex_dofs.resize (tria->vertices.size()); - // here again, gcc2.8 fails to - // construct the vector properly - // using parameters to the constructor -// vector min_level (tria->vertices.size(), tria->n_levels()); -// vector max_level (tria->vertices.size(), 0); - vector min_level, max_level; - min_level.resize (tria->vertices.size(), tria->n_levels()); - max_level.resize (tria->vertices.size(), 0); + vector min_level (tria->vertices.size(), tria->n_levels()); + vector max_level (tria->vertices.size(), 0); Triangulation::cell_iterator cell = tria->begin(), endc = tria->end(); -- 2.39.5