]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make compatible with gcc 4.5.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 21:30:32 +0000 (21:30 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 21:30:32 +0000 (21:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@20955 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/dof_renumbering_02.cc
tests/deal.II/dof_renumbering_03.cc
tests/deal.II/dof_renumbering_04.cc
tests/deal.II/dof_renumbering_05.cc
tests/deal.II/dof_renumbering_06.cc
tests/deal.II/mesh_worker_01.cc
tests/deal.II/mesh_worker_02.cc
tests/deal.II/point_value_history_01.cc

index 8b7fe5fdf13d0af6ff2243d1a91eb7b1ab7bcf99..13151199363646e8efbc7834283d4b948fa78451 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,24 +42,24 @@ print_dofs (const DoFHandler<dim> &dof)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
 
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
 
   for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
        cell != dof.end(); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
 
       cell->get_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
@@ -75,24 +75,24 @@ print_dofs (const MGDoFHandler<dim> &dof, unsigned int level)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
 
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
 
   for (typename MGDoFHandler<dim>::cell_iterator cell=dof.begin(level);
        cell != dof.end(level); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
 
       cell->get_mg_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
index fc727cd27856227ba7792e94a9bbc96feb317313..eb694ea533d47f3f03496132a3c54ca6f9393afd 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,24 +42,24 @@ print_dofs (const DoFHandler<dim> &dof)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
-  
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
-  
+
   for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
        cell != dof.end(); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
-      
+
       cell->get_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
@@ -75,7 +75,7 @@ check_renumbering(DoFHandler<dim>& dof)
 {
   const FiniteElement<dim>& element = dof.get_fe();
   deallog << element.get_name() << std::endl;
-  
+
   DoFRenumbering::Cuthill_McKee(dof);
   print_dofs (dof);
 }
@@ -85,13 +85,13 @@ template <int dim>
 void
 check ()
 {
-  Triangulation<dim> tr;  
+  Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr, -1., 1.);
   tr.refine_global (1);
   tr.begin_active()->set_refine_flag ();
   tr.execute_coarsening_and_refinement ();
   tr.refine_global(3-dim);
-  
+
   {
     FE_Q<dim> fe(2);
     DoFHandler<dim> dof(tr);
@@ -115,7 +115,7 @@ int main ()
 {
   std::ofstream logfile ("dof_renumbering_03/output");
   deallog << std::setprecision (2);
-  deallog << std::fixed;  
+  deallog << std::fixed;
   deallog.attach(logfile);
   deallog.depth_console (0);
 
index 87b27f77ca4093c06280d4324290a5201c74afdd..05b783f303c742f2695486c6353fe266774446c4 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,24 +42,24 @@ print_dofs (const DoFHandler<dim> &dof)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
-  
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
-  
+
   for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
        cell != dof.end(); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
-      
+
       cell->get_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
@@ -75,7 +75,7 @@ check_renumbering(DoFHandler<dim>& dof)
 {
   const FiniteElement<dim>& element = dof.get_fe();
   deallog << element.get_name() << std::endl;
-  
+
   DoFRenumbering::boost::Cuthill_McKee(dof);
   print_dofs (dof);
 }
@@ -85,13 +85,13 @@ template <int dim>
 void
 check ()
 {
-  Triangulation<dim> tr;  
+  Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr, -1., 1.);
   tr.refine_global (1);
   tr.begin_active()->set_refine_flag ();
   tr.execute_coarsening_and_refinement ();
   tr.refine_global(3-dim);
-  
+
   {
     FE_Q<dim> fe(2);
     DoFHandler<dim> dof(tr);
@@ -115,7 +115,7 @@ int main ()
 {
   std::ofstream logfile ("dof_renumbering_04/output");
   deallog << std::setprecision (2);
-  deallog << std::fixed;  
+  deallog << std::fixed;
   deallog.attach(logfile);
   deallog.depth_console (0);
 
index 5a48713ee26a68fd6158760e09e7b94f1ec1cefa..be815147b5b048a611872d6bad0202e731a5c443 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2009 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,24 +42,24 @@ print_dofs (const DoFHandler<dim> &dof)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
 
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
 
   for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
        cell != dof.end(); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
 
       cell->get_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
index 80e053d212fb15fd2d553f94382cf3b1b349a3e8..3b4cfbe73d9e40c0f2275e7d9d296ffd60a343cf 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,24 +42,24 @@ print_dofs (const DoFHandler<dim> &dof)
 {
   const FiniteElement<dim>& fe = dof.get_fe();
   std::vector<unsigned int> v (fe.dofs_per_cell);
-  boost::shared_ptr<FEValues<dim> > fevalues;
-  
+  std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
   if (fe.has_support_points())
     {
       Quadrature<dim> quad(fe.get_unit_support_points());
-      fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+      fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
     }
-  
+
   for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
        cell != dof.end(); ++cell)
     {
       Point<dim> p = cell->center();
-      if (fevalues != 0)
+      if (fevalues.get() != 0)
        fevalues->reinit(cell);
-      
+
       cell->get_dof_indices (v);
       for (unsigned int i=0; i<v.size(); ++i)
-       if (fevalues != 0)
+       if (fevalues.get() != 0)
          deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
        else
          deallog << p << '\t' << v[i] << std::endl;
@@ -75,7 +75,7 @@ check_renumbering(DoFHandler<dim>& dof)
 {
   const FiniteElement<dim>& element = dof.get_fe();
   deallog << element.get_name() << std::endl;
-  
+
   DoFRenumbering::boost::minimum_degree(dof);
   print_dofs (dof);
 }
@@ -85,13 +85,13 @@ template <int dim>
 void
 check ()
 {
-  Triangulation<dim> tr;  
+  Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr, -1., 1.);
   tr.refine_global (1);
   tr.begin_active()->set_refine_flag ();
   tr.execute_coarsening_and_refinement ();
   tr.refine_global(3-dim);
-  
+
   {
     FE_Q<dim> fe(2);
     DoFHandler<dim> dof(tr);
@@ -115,7 +115,7 @@ int main ()
 {
   std::ofstream logfile ("dof_renumbering_06/output");
   deallog << std::setprecision (2);
-  deallog << std::fixed;  
+  deallog << std::fixed;
   deallog.attach(logfile);
   deallog.depth_console (0);
 
index 82fba5c616dbd5ebe05472b1c226e0bb4b730c68..da59ce01d6216d15da5ab8bf4bb94b624c4289e0 100644 (file)
@@ -222,9 +222,9 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console (0);
 
-  std::vector<boost::shared_ptr<FiniteElement<2> > > fe2;
-  fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new  FE_DGP<2>(1)));
-  fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new  FE_Q<2>(1)));
+  std::vector<std_cxx1x::shared_ptr<FiniteElement<2> > > fe2;
+  fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new  FE_DGP<2>(1)));
+  fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new  FE_Q<2>(1)));
 
   for (unsigned int i=0;i<fe2.size();++i)
     test(*fe2[i]);
index 358b6efb6889e66c2ea5c356990fe03e1065eaa2..bc76870c39fe303dd9024eafb890d5b6bf73c2b6 100644 (file)
@@ -298,9 +298,9 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console (0);
 
-  std::vector<boost::shared_ptr<FiniteElement<2> > > fe2;
-  fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new  FE_DGP<2>(1)));
-//  fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new  FE_Q<2>(1)));
+  std::vector<std_cxx1x::shared_ptr<FiniteElement<2> > > fe2;
+  fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new  FE_DGP<2>(1)));
+//  fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new  FE_Q<2>(1)));
   
   for (unsigned int i=0;i<fe2.size();++i)
     test(*fe2[i]);
index 40c66a53d7de601a8d0bc6919640652b941fb673..7877a7a0ab41c62c63133d7192899de0901477e4 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2009 by the deal.II authors and Michael Rapson
+//    Copyright (C) 2009, 2010 by the deal.II authors and Michael Rapson
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -149,7 +149,7 @@ void TestPointValueHistory<dim>::run()
 
     // check that the assignment operator is valid
     test_copy = node_monitor;
-    test_copy.add_point(Point<2>::Point(1, 0.2));
+    test_copy.add_point(Point<2>(1, 0.2));
     test_copy.add_field_name("Solution");
     std::vector < std::vector <Point <dim> > > selected_locations;
     test_copy.get_points(selected_locations);
@@ -170,15 +170,15 @@ void TestPointValueHistory<dim>::run()
 
         // two alternatives here, adding a point at a time or a vector of points
         // 2d points
-        std::vector <Point < 2 > > point_vector(5, Point < 2 > ::Point());
-        point_vector[0] = Point < 2 > ::Point(0, 0); // some of these points will hit a node, others won't
-        point_vector[1] = Point < 2 > ::Point(0.25, 0);
-        point_vector[2] = Point < 2 > ::Point(0.25, 0.45);
-        point_vector[3] = Point < 2 > ::Point(0.45, 0.45);
-        point_vector[4] = Point < 2 > ::Point(0.8, 0.8);
+        std::vector <Point < 2 > > point_vector(5, Point < 2 > ());
+        point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't
+        point_vector[1] = Point < 2 > (0.25, 0);
+        point_vector[2] = Point < 2 > (0.25, 0.45);
+        point_vector[3] = Point < 2 > (0.45, 0.45);
+        point_vector[4] = Point < 2 > (0.8, 0.8);
 
         node_monitor.add_points(point_vector);
-        node_monitor.add_point(Point<2>::Point(1, 0.2)); // add a single point
+        node_monitor.add_point(Point<2>(1, 0.2)); // add a single point
 
         // MonitorNode requires that the instance is 'closed' before any data is added
         // this ensures that points are not added once time starts.

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.