]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Invent some workarounds to allow compilation of the library with the egcs compiler...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Aug 1998 07:37:36 +0000 (07:37 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Aug 1998 07:37:36 +0000 (07:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@482 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_handler.cc
deal.II/deal.II/source/grid/tria.cc
deal.II/deal.II/source/numerics/matrices.cc

index e4a921619e2f5c069304584ca4bce61c5ac2b6e9..9776cdd83e524f4f4f9e0eb217da8e7bc25cbd67 100644 (file)
@@ -1503,7 +1503,9 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
 
                                         // copy dofs one-by-one
        for (unsigned int j=0; j<old_dofs.size(); ++j)
-         transfer_matrix.set (new_dofs[j], old_dofs[j], 1.0);
+                                          // use the dSMatrix:: as a workaround
+                                          // for a bug in egcs
+         transfer_matrix.dSMatrix::set (new_dofs[j], old_dofs[j], 1.0);
       }
     else
       if (!new_cell->active() && old_cell->active())
@@ -1530,9 +1532,12 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
              for (unsigned int k=0; k<selected_fe->total_dofs; ++k)
                for (unsigned int j=0; j<selected_fe->total_dofs; ++j)
                  if (selected_fe->prolongate(c)(k,j) != 0.) 
-                   transfer_matrix.set (child_dof_indices[k],
-                                        old_dof_indices[j],
-                                        selected_fe->prolongate(c)(k,j));
+                                                    // use the dSMatrix::
+                                                    // as a workaround
+                                                    // for a bug in egcs
+                   transfer_matrix.dSMatrix::set (child_dof_indices[k],
+                                                  old_dof_indices[j],
+                                                  selected_fe->prolongate(c)(k,j));
            };
        } else {
                                           // old cell has children, new one has not
@@ -1557,9 +1562,13 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
              for (unsigned int k=0; k<selected_fe->total_dofs; ++k)
                for (unsigned int j=0; j<selected_fe->total_dofs; ++j)
                  if (selected_fe->restrict(c)(k,j) != 0.)
-                   transfer_matrix.set (new_dof_indices[k],
-                                        child_dof_indices[j],
-                                        selected_fe->restrict(c)(k,j));
+                                                    // use the dSMatrix:: as
+                                                    // a workaround
+                                                    // for a bug in egcs
+
+                   transfer_matrix.dSMatrix::set (new_dof_indices[k],
+                                                  child_dof_indices[j],
+                                                  selected_fe->restrict(c)(k,j));
            };
        };
 };
index 6c1158a7526a3a40b3c81d5410e34db3df0c62b0..f90cb00deb086a67e4ece8d4a14d61fafa77f8e0 100644 (file)
@@ -610,18 +610,17 @@ void Triangulation<2>::create_hyper_L (const double a, const double b) {
 
 template <>
 void Triangulation<2>::create_hyper_ball (const Point<2> &p, const double radius) {
-  const unsigned int dim=2;
   const double a = 1./(1+sqrt(2)); // equilibrate cell sizes at transition
                                   // from the inner part to the radial
                                   // cells
-  const Point<dim> vertices[8] = { p+Point<dim>(-1,-1)*(radius/sqrt(2)),
-                                  p+Point<dim>(+1,-1)*(radius/sqrt(2)),
-                                  p+Point<dim>(-1,-1)*(radius/sqrt(2)*a),
-                                  p+Point<dim>(+1,-1)*(radius/sqrt(2)*a),
-                                  p+Point<dim>(-1,+1)*(radius/sqrt(2)*a),
-                                  p+Point<dim>(+1,+1)*(radius/sqrt(2)*a),
-                                  p+Point<dim>(-1,+1)*(radius/sqrt(2)),
-                                  p+Point<dim>(+1,+1)*(radius/sqrt(2)) };
+  const Point<2> vertices[8] = { p+Point<2>(-1,-1)*(radius/sqrt(2)),
+                                p+Point<2>(+1,-1)*(radius/sqrt(2)),
+                                p+Point<2>(-1,-1)*(radius/sqrt(2)*a),
+                                p+Point<2>(+1,-1)*(radius/sqrt(2)*a),
+                                p+Point<2>(-1,+1)*(radius/sqrt(2)*a),
+                                p+Point<2>(+1,+1)*(radius/sqrt(2)*a),
+                                p+Point<2>(-1,+1)*(radius/sqrt(2)),
+                                p+Point<2>(+1,+1)*(radius/sqrt(2)) };
   
   const int cell_vertices[5][4] = {{0, 1, 3, 2},
                                   {0, 2, 4, 6},
@@ -638,7 +637,7 @@ void Triangulation<2>::create_hyper_ball (const Point<2> &p, const double radius
       cells[i].material_id = 0;
     };
   
-  create_triangulation (vector<Point<dim> >(&vertices[0], &vertices[8]),
+  create_triangulation (vector<Point<2> >(&vertices[0], &vertices[8]),
                        cells,
                        SubCellData());       // no boundary information
 };
index eda20bdb1d14813e5a43edfc82004ba3fbdfa26b..d76e63f4327b204f85103e9902db83b8555e7e10 100644 (file)
@@ -453,9 +453,11 @@ void MatrixTools<dim>::apply_boundary_values (const map<int,double> &boundary_va
                first_diagonal_entry = matrix.diag_element(i);
                break;
              };
-         
-         matrix.set(dof_number, dof_number,
-                    first_diagonal_entry);
+
+                                          // use the dSMatrix:: as a workaround
+                                          // for a bug in egcs
+         matrix.dSMatrix::set(dof_number, dof_number,
+                              first_diagonal_entry);
          new_rhs = right_hand_side(dof_number)
                  = dof->second * first_diagonal_entry;
        };

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.