From: hartmann Date: Fri, 16 Mar 2001 15:21:12 +0000 (+0000) Subject: Make it compile with a prerelease of gcc3.0 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac96e360b03e03a756e82a4f5f7ee0d9e7d9324d;p=dealii-svn.git Make it compile with a prerelease of gcc3.0 git-svn-id: https://svn.dealii.org/trunk@4238 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/mapping.cc b/tests/fe/mapping.cc index 893e969feb..109d572729 100644 --- a/tests/fe/mapping.cc +++ b/tests/fe/mapping.cc @@ -42,9 +42,9 @@ plot_transformation(Mapping &mapping, | update_JxW_values)); fe_values.reinit(cell); - const vector &JxW=fe_values.get_JxW_values(); + const std::vector &JxW=fe_values.get_JxW_values(); - ofstream gnuplot(name); + std::ofstream gnuplot(name); unsigned int k=0; for (unsigned int nz=0; nz<=((dim>2) ? div : 0); ++nz) @@ -55,12 +55,12 @@ plot_transformation(Mapping &mapping, { gnuplot << fe_values.quadrature_point(k); double J = JxW[k] / q.weight(k); - gnuplot << ' ' << J << endl; + gnuplot << ' ' << J << std::endl; ++k; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } } @@ -73,7 +73,7 @@ plot_faces(Mapping &mapping, DoFHandler::cell_iterator &cell, const char* name) { - ofstream gnuplot(name); + std::ofstream gnuplot(name); QGauss4 q; const unsigned int nq = (unsigned int) (.01 + pow(q.n_quadrature_points, 1./(dim-1))); @@ -88,7 +88,7 @@ plot_faces(Mapping &mapping, { fe_values.reinit(cell, face_nr); - const vector > &normals + const std::vector > &normals =fe_values.get_normal_vectors(); unsigned int k=0; @@ -98,12 +98,12 @@ plot_faces(Mapping &mapping, { Point x = fe_values.quadrature_point(k); Tensor<1,dim> n = normals[k]; - gnuplot << x << '\t' << n << endl; + gnuplot << x << '\t' << n << std::endl; ++k; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } } @@ -116,7 +116,7 @@ plot_subfaces(Mapping &mapping, DoFHandler::cell_iterator &cell, const char* name) { - ofstream gnuplot(name); + std::ofstream gnuplot(name); QGauss4 q; const unsigned int nq = (unsigned int) (.01 + pow(q.n_quadrature_points, 1./(dim-1))); @@ -133,7 +133,7 @@ plot_subfaces(Mapping &mapping, { fe_values.reinit(cell, face_nr, sub_nr); - const vector > &normals + const std::vector > &normals =fe_values.get_normal_vectors(); unsigned int k=0; @@ -143,12 +143,12 @@ plot_subfaces(Mapping &mapping, { Point x = fe_values.quadrature_point(k); Tensor<1,dim> n = normals[k]; - gnuplot << x << '\t' << n << endl; + gnuplot << x << '\t' << n << std::endl; ++k; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } } @@ -184,7 +184,7 @@ compute_area(Mapping &mapping, FEValues fe_values(mapping, fe, gauss4, UpdateFlags(update_JxW_values)); fe_values.reinit(cell); - const vector &JxW=fe_values.get_JxW_values(); + const std::vector &JxW=fe_values.get_JxW_values(); double area=0; for (unsigned int i=0; i &mapping, template -void create_triangulations(vector *> &, - vector *> &, - vector &) +void create_triangulations(std::vector *> &, + std::vector *> &, + std::vector &) { Assert(false, ExcNotImplemented()); } -vector > show; +std::vector > show; unsigned int mapping_size; template<> -void create_triangulations(vector *> &tria_ptr, - vector *> &, - vector &exact_areas) +void create_triangulations(std::vector *> &tria_ptr, + std::vector *> &, + std::vector &exact_areas) { - show.resize(1, vector (mapping_size,0)); + show.resize(1, std::vector (mapping_size,0)); Triangulation<1> *tria=new Triangulation<1>(); tria_ptr.push_back(tria); GridGenerator::hyper_cube(*tria, 1., 3.); @@ -224,13 +224,13 @@ void create_triangulations(vector *> &tria_ptr, template<> -void create_triangulations(vector *> &tria_ptr, - vector *> &boundary_ptr, - vector &exact_areas) +void create_triangulations(std::vector *> &tria_ptr, + std::vector *> &boundary_ptr, + std::vector &exact_areas) { Triangulation<2> *tria; show.clear(); - show.resize(3, vector (mapping_size,0)); + show.resize(3, std::vector (mapping_size,0)); // tria0: 3x3 square rotated if (1) { @@ -298,13 +298,13 @@ void create_triangulations(vector *> &tria_ptr, template<> -void create_triangulations(vector *> &tria_ptr, - vector *> &boundary_ptr, - vector &exact_areas) +void create_triangulations(std::vector *> &tria_ptr, + std::vector *> &boundary_ptr, + std::vector &exact_areas) { Triangulation<3> *tria; show.clear(); - show.resize(4, vector (mapping_size,0)); + show.resize(4, std::vector (mapping_size,0)); // 2x2 cube if (1) @@ -373,8 +373,8 @@ void mapping_test() { deallog << "dim=" << dim << endl; - vector *> mapping_ptr; - vector mapping_strings; + std::vector *> mapping_ptr; + std::vector mapping_strings; MappingQ1 q1_old; MappingQ q1(1); @@ -394,9 +394,9 @@ void mapping_test() mapping_size=mapping_ptr.size(); - vector *> tria_ptr; - vector *> boundary_ptr; - vector exact_areas; + std::vector *> tria_ptr; + std::vector *> boundary_ptr; + std::vector exact_areas; create_triangulations(tria_ptr, boundary_ptr, exact_areas); Assert(show.size()==tria_ptr.size(), ExcInternalError()); @@ -419,9 +419,9 @@ void mapping_test() if (true) { - ostrstream ost(st2, 99); + std::ostrstream ost(st2, 99); ost << "Mapping" << dim << "d-" << i << '-' - << mapping_strings[j] << ".output" << ends; + << mapping_strings[j] << ".output" << std::ends; deallog << st2 << endl; plot_transformation(*mapping_ptr[j], fe_q4, cell, st2); compute_area(*mapping_ptr[j], fe_q4, cell); @@ -429,18 +429,18 @@ void mapping_test() if (dim>1) { - ostrstream ost(st2, 99); + std::ostrstream ost(st2, 99); ost << "MappingFace" << dim << "d-" << i << '-' - << mapping_strings[j] << ".output" << ends; + << mapping_strings[j] << ".output" << std::ends; deallog << st2 << endl; plot_faces(*mapping_ptr[j], fe_q4, cell, st2); } if (dim>1) { - ostrstream ost(st2, 99); + std::ostrstream ost(st2, 99); ost << "MappingSubface" << dim << "d-" << i << '-' - << mapping_strings[j] << ".output" << ends; + << mapping_strings[j] << ".output" << std::ends; deallog << st2 << endl; plot_subfaces(*mapping_ptr[j], fe_q4, cell, st2); } @@ -478,9 +478,9 @@ void mapping_test() int main() { - ofstream logfile ("mapping.output"); + std::ofstream logfile ("mapping.output"); logfile.precision (2); - logfile.setf(ios::fixed); + logfile.setf(std::ios::fixed); deallog.attach(logfile); deallog.depth_console(0);