From b985317e5b6eb9dad0c83942e6731657139bdde1 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 Jul 2001 06:56:50 +0000 Subject: [PATCH] Fix many missing std:: which Compaq's cxx wants to have, mostly for two reasons: 1. because it does not inject the math functions sqrt, sin, cos, fabs, ... into global namespace when we write include. 2. because cxx can't do Koenig lookup of functions. git-svn-id: https://svn.dealii.org/trunk@4797 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/multigrid/mg_dof_handler.h | 3 ++- deal.II/deal.II/source/fe/mapping_q1.cc | 6 +++--- deal.II/deal.II/source/grid/grid_out.cc | 2 +- deal.II/deal.II/source/grid/tria_boundary_lib.cc | 6 +++--- deal.II/deal.II/source/multigrid/mg_dof_handler.cc | 2 +- deal.II/deal.II/source/numerics/matrices.cc | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) 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 d7c9ba9e77..4b58383f47 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_handler.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_handler.h @@ -193,7 +193,8 @@ class MGDoFHandler : public DoFHandler * don't need them after calling this * function, or if so store them. */ - virtual void distribute_dofs (const FiniteElement &, unsigned int offset=0); + virtual void distribute_dofs (const FiniteElement &, + const unsigned int offset = 0); /** * Actually do the renumbering based on diff --git a/deal.II/deal.II/source/fe/mapping_q1.cc b/deal.II/deal.II/source/fe/mapping_q1.cc index 3912a52121..3632debff4 100644 --- a/deal.II/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/deal.II/source/fe/mapping_q1.cc @@ -425,9 +425,9 @@ MappingQ1::compute_face_data (const UpdateFlags update_flags, Tensor<1,dim> tangential; tangential[(nindex-1)%dim] = 1.; data.unit_tangentials[i+nfaces].resize(n_original_q_points); - fill (data.unit_tangentials[i+nfaces].begin(), - data.unit_tangentials[i+nfaces].end(), - tangential); + std::fill (data.unit_tangentials[i+nfaces].begin(), + data.unit_tangentials[i+nfaces].end(), + tangential); } } } diff --git a/deal.II/deal.II/source/grid/grid_out.cc b/deal.II/deal.II/source/grid/grid_out.cc index 9b6a9aaf33..9a02433b87 100644 --- a/deal.II/deal.II/source/grid/grid_out.cc +++ b/deal.II/deal.II/source/grid/grid_out.cc @@ -702,7 +702,7 @@ void GridOut::write_eps (const Triangulation &tria, = (Point(1,0,0) - ((Point(1,0,0) * view_direction) * view_direction) - ((Point(1,0,0) * unit_vector1) * unit_vector1)); - const Point unit_vector2 = vector2 / sqrt(vector2.square()); + const Point unit_vector2 = vector2 / std::sqrt(vector2.square()); for (; line!=endline; ++line) line_list.push_back (LineEntry(Point<2>(line->vertex(0) * unit_vector2, diff --git a/deal.II/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/deal.II/source/grid/tria_boundary_lib.cc index 476c392464..c2e8e4e84c 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -138,7 +138,7 @@ HyperBallBoundary::get_intermediate_points_between_points ( if (compute_radius_automatically) { const Point vertex_relative = p0 - center; - r = sqrt(vertex_relative.square()); + r = std::sqrt(vertex_relative.square()); } else r=radius; @@ -146,7 +146,7 @@ HyperBallBoundary::get_intermediate_points_between_points ( Assert(std::fabs(v0.square()-r*r) pm=0.5*(v0+v1); @@ -181,7 +181,7 @@ HyperBallBoundary::get_intermediate_points_between_points ( Assert(right_index=1, ExcInternalError()); - double d=h*tan(beta); + double d=h*std::tan(beta); points[right_index]=pm+d/length*(v1-v0); points[left_index]=pm-d/length*(v1-v0); } 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 2e007adc60..89c16a7837 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc @@ -1175,7 +1175,7 @@ MGDoFHandler::last_active_hex () const { template void MGDoFHandler::distribute_dofs (const FiniteElement &fe, - unsigned int offset) + const unsigned int offset) { // first distribute global dofs DoFHandler::distribute_dofs (fe, offset); diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 270f2a0df8..a9ceafe83d 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -654,7 +654,7 @@ create_boundary_mass_matrix_1 (const Mapping &mapping, double max_diag_entry = 0; for (unsigned int i=0; i max_diag_entry) - max_diag_entry = fabs(cell_matrix(i,i)); + max_diag_entry = std::fabs(cell_matrix(i,i)); #endif mutex.acquire (); -- 2.39.5