]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove some kludges once needed to persuade gcc 2.7 and 2.8 to compile our code ...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Feb 1999 20:15:31 +0000 (20:15 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Feb 1999 20:15:31 +0000 (20:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@901 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_handler.h
deal.II/deal.II/include/dofs/mg_dof_handler.h
deal.II/deal.II/include/multigrid/mg_dof_handler.h
deal.II/deal.II/source/dofs/dof_constraints.cc
deal.II/deal.II/source/dofs/mg_dof_handler.cc
deal.II/deal.II/source/fe/fe.cc
deal.II/deal.II/source/multigrid/mg_dof_handler.cc

index 76a27b25ad52e1f3dab8d87257c789a553f39937..626b52476a073342a582fd8a778d5f38ee352634 100644 (file)
@@ -475,9 +475,6 @@ enum RenumberingMethod {
 template <int dim>
 class DoFHandler : public DoFDimensionInfo<dim> {
   public:
-                                    // insert these definitions for gcc2.8,
-                                    // since it can't inherit typedefs (I
-                                    // believe it should, but it can't)
     typedef typename DoFDimensionInfo<dim>::raw_line_iterator raw_line_iterator;
     typedef typename DoFDimensionInfo<dim>::line_iterator line_iterator;
     typedef typename DoFDimensionInfo<dim>::active_line_iterator active_line_iterator;
index f3d661171b7bb5a04a005b7175211e44cc8b4a73..616d910b8e7a50a732c28d8113ef70cf712f0332 100644 (file)
@@ -123,9 +123,6 @@ class MGDoFDimensionInfo<3> {
 template <int dim>
 class MGDoFHandler : public DoFHandler<dim> {
   public:
-                                    // insert these definitions for gcc2.8,
-                                    // since it can't inherit typedefs (I
-                                    // believe it should, but it can't)
     typedef typename MGDoFDimensionInfo<dim>::raw_line_iterator raw_line_iterator;
     typedef typename MGDoFDimensionInfo<dim>::line_iterator line_iterator;
     typedef typename MGDoFDimensionInfo<dim>::active_line_iterator active_line_iterator;
index f3d661171b7bb5a04a005b7175211e44cc8b4a73..616d910b8e7a50a732c28d8113ef70cf712f0332 100644 (file)
@@ -123,9 +123,6 @@ class MGDoFDimensionInfo<3> {
 template <int dim>
 class MGDoFHandler : public DoFHandler<dim> {
   public:
-                                    // insert these definitions for gcc2.8,
-                                    // since it can't inherit typedefs (I
-                                    // believe it should, but it can't)
     typedef typename MGDoFDimensionInfo<dim>::raw_line_iterator raw_line_iterator;
     typedef typename MGDoFDimensionInfo<dim>::line_iterator line_iterator;
     typedef typename MGDoFDimensionInfo<dim>::active_line_iterator active_line_iterator;
index 8b9cc892db7c49096c57ba51842ac0f4219b553b..cbbeed1db463ef1471eb8538914191841ce87bc4 100644 (file)
@@ -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<int> distribute;
-  distribute.resize (sparsity.n_rows(), -1);
+  vector<int> distribute(sparsity.n_rows(), -1);
   
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
@@ -448,11 +444,7 @@ void ConstraintMatrix::condense (SparseMatrix<double> &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<int> distribute;
-  distribute.resize (sparsity.n_rows(), -1);
+  vector<int> distribute (sparsity.n_rows(), -1);
   
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
index f6092999edb63da450a06a83d2b5b82270bb9e73..027864b2038b81fbe4e9c4c559979c53f8608808 100644 (file)
@@ -1038,14 +1038,7 @@ void MGDoFHandler<dim>::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<int> new_number(n_dofs, -1);
-  vector<int> new_number;
-  new_number.resize (n_dofs, -1);
+  vector<int> 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<unsigned int> min_level (tria->vertices.size(), tria->n_levels());
-//  vector<unsigned int> max_level (tria->vertices.size(), 0);
-  vector<unsigned int> min_level, max_level;
-  min_level.resize (tria->vertices.size(), tria->n_levels());
-  max_level.resize (tria->vertices.size(), 0);
+  vector<unsigned int> min_level (tria->vertices.size(), tria->n_levels());
+  vector<unsigned int> max_level (tria->vertices.size(), 0);
 
   Triangulation<dim>::cell_iterator cell = tria->begin(),
                                    endc = tria->end();
index 5cb3fc4ee8a694080729180c5c1debca50835864..00b81c293cf9935ea9f1d9903a9b4a9d911a854e 100644 (file)
@@ -215,11 +215,6 @@ FiniteElement<dim>::FiniteElement (const FiniteElementData<dim> &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> &,
index f6092999edb63da450a06a83d2b5b82270bb9e73..027864b2038b81fbe4e9c4c559979c53f8608808 100644 (file)
@@ -1038,14 +1038,7 @@ void MGDoFHandler<dim>::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<int> new_number(n_dofs, -1);
-  vector<int> new_number;
-  new_number.resize (n_dofs, -1);
+  vector<int> 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<unsigned int> min_level (tria->vertices.size(), tria->n_levels());
-//  vector<unsigned int> max_level (tria->vertices.size(), 0);
-  vector<unsigned int> min_level, max_level;
-  min_level.resize (tria->vertices.size(), tria->n_levels());
-  max_level.resize (tria->vertices.size(), 0);
+  vector<unsigned int> min_level (tria->vertices.size(), tria->n_levels());
+  vector<unsigned int> max_level (tria->vertices.size(), 0);
 
   Triangulation<dim>::cell_iterator cell = tria->begin(),
                                    endc = tria->end();

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.