From e369f209da9fcdc79ccc7be120710f1ea3cad7f0 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 6 Apr 2010 21:30:32 +0000 Subject: [PATCH] Make compatible with gcc 4.5. git-svn-id: https://svn.dealii.org/trunk@20955 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/dof_renumbering_02.cc | 18 ++++++++--------- tests/deal.II/dof_renumbering_03.cc | 26 ++++++++++++------------- tests/deal.II/dof_renumbering_04.cc | 26 ++++++++++++------------- tests/deal.II/dof_renumbering_05.cc | 10 +++++----- tests/deal.II/dof_renumbering_06.cc | 26 ++++++++++++------------- tests/deal.II/mesh_worker_01.cc | 6 +++--- tests/deal.II/mesh_worker_02.cc | 6 +++--- tests/deal.II/point_value_history_01.cc | 18 ++++++++--------- 8 files changed, 68 insertions(+), 68 deletions(-) diff --git a/tests/deal.II/dof_renumbering_02.cc b/tests/deal.II/dof_renumbering_02.cc index 8b7fe5fdf1..1315119936 100644 --- a/tests/deal.II/dof_renumbering_02.cc +++ b/tests/deal.II/dof_renumbering_02.cc @@ -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 &dof) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; + std_cxx1x::shared_ptr > fevalues; if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } for (typename DoFHandler::active_cell_iterator cell=dof.begin_active(); cell != dof.end(); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; @@ -75,24 +75,24 @@ print_dofs (const MGDoFHandler &dof, unsigned int level) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; + std_cxx1x::shared_ptr > fevalues; if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } for (typename MGDoFHandler::cell_iterator cell=dof.begin(level); cell != dof.end(level); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); cell->get_mg_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; diff --git a/tests/deal.II/dof_renumbering_03.cc b/tests/deal.II/dof_renumbering_03.cc index fc727cd278..eb694ea533 100644 --- a/tests/deal.II/dof_renumbering_03.cc +++ b/tests/deal.II/dof_renumbering_03.cc @@ -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 &dof) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; - + std_cxx1x::shared_ptr > fevalues; + if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } - + for (typename DoFHandler::active_cell_iterator cell=dof.begin_active(); cell != dof.end(); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); - + cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; @@ -75,7 +75,7 @@ check_renumbering(DoFHandler& dof) { const FiniteElement& element = dof.get_fe(); deallog << element.get_name() << std::endl; - + DoFRenumbering::Cuthill_McKee(dof); print_dofs (dof); } @@ -85,13 +85,13 @@ template void check () { - Triangulation tr; + Triangulation 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 fe(2); DoFHandler 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); diff --git a/tests/deal.II/dof_renumbering_04.cc b/tests/deal.II/dof_renumbering_04.cc index 87b27f77ca..05b783f303 100644 --- a/tests/deal.II/dof_renumbering_04.cc +++ b/tests/deal.II/dof_renumbering_04.cc @@ -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 &dof) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; - + std_cxx1x::shared_ptr > fevalues; + if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } - + for (typename DoFHandler::active_cell_iterator cell=dof.begin_active(); cell != dof.end(); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); - + cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; @@ -75,7 +75,7 @@ check_renumbering(DoFHandler& dof) { const FiniteElement& element = dof.get_fe(); deallog << element.get_name() << std::endl; - + DoFRenumbering::boost::Cuthill_McKee(dof); print_dofs (dof); } @@ -85,13 +85,13 @@ template void check () { - Triangulation tr; + Triangulation 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 fe(2); DoFHandler 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); diff --git a/tests/deal.II/dof_renumbering_05.cc b/tests/deal.II/dof_renumbering_05.cc index 5a48713ee2..be815147b5 100644 --- a/tests/deal.II/dof_renumbering_05.cc +++ b/tests/deal.II/dof_renumbering_05.cc @@ -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 &dof) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; + std_cxx1x::shared_ptr > fevalues; if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } for (typename DoFHandler::active_cell_iterator cell=dof.begin_active(); cell != dof.end(); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; diff --git a/tests/deal.II/dof_renumbering_06.cc b/tests/deal.II/dof_renumbering_06.cc index 80e053d212..3b4cfbe73d 100644 --- a/tests/deal.II/dof_renumbering_06.cc +++ b/tests/deal.II/dof_renumbering_06.cc @@ -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 &dof) { const FiniteElement& fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); - boost::shared_ptr > fevalues; - + std_cxx1x::shared_ptr > fevalues; + if (fe.has_support_points()) { Quadrature quad(fe.get_unit_support_points()); - fevalues = boost::shared_ptr >(new FEValues(fe, quad, update_q_points)); + fevalues = std_cxx1x::shared_ptr >(new FEValues(fe, quad, update_q_points)); } - + for (typename DoFHandler::active_cell_iterator cell=dof.begin_active(); cell != dof.end(); ++cell) { Point p = cell->center(); - if (fevalues != 0) + if (fevalues.get() != 0) fevalues->reinit(cell); - + cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; else deallog << p << '\t' << v[i] << std::endl; @@ -75,7 +75,7 @@ check_renumbering(DoFHandler& dof) { const FiniteElement& element = dof.get_fe(); deallog << element.get_name() << std::endl; - + DoFRenumbering::boost::minimum_degree(dof); print_dofs (dof); } @@ -85,13 +85,13 @@ template void check () { - Triangulation tr; + Triangulation 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 fe(2); DoFHandler 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); diff --git a/tests/deal.II/mesh_worker_01.cc b/tests/deal.II/mesh_worker_01.cc index 82fba5c616..da59ce01d6 100644 --- a/tests/deal.II/mesh_worker_01.cc +++ b/tests/deal.II/mesh_worker_01.cc @@ -222,9 +222,9 @@ int main () deallog.attach(logfile); deallog.depth_console (0); - std::vector > > fe2; - fe2.push_back(boost::shared_ptr >(new FE_DGP<2>(1))); - fe2.push_back(boost::shared_ptr >(new FE_Q<2>(1))); + std::vector > > fe2; + fe2.push_back(std_cxx1x::shared_ptr >(new FE_DGP<2>(1))); + fe2.push_back(std_cxx1x::shared_ptr >(new FE_Q<2>(1))); for (unsigned int i=0;i > > fe2; - fe2.push_back(boost::shared_ptr >(new FE_DGP<2>(1))); -// fe2.push_back(boost::shared_ptr >(new FE_Q<2>(1))); + std::vector > > fe2; + fe2.push_back(std_cxx1x::shared_ptr >(new FE_DGP<2>(1))); +// fe2.push_back(std_cxx1x::shared_ptr >(new FE_Q<2>(1))); for (unsigned int i=0;i::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 > > selected_locations; test_copy.get_points(selected_locations); @@ -170,15 +170,15 @@ void TestPointValueHistory::run() // two alternatives here, adding a point at a time or a vector of points // 2d points - std::vector > 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_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. -- 2.39.5