]> https://gitweb.dealii.org/ - dealii.git/commitdiff
std::[io]fstream can now deal with std::string for filenames. 15694/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Jul 2023 23:00:24 +0000 (17:00 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Jul 2023 23:01:57 +0000 (17:01 -0600)
171 files changed:
examples/step-63/step-63.cc
include/deal.II/base/path_search.h
include/deal.II/numerics/dof_output_operator.templates.h
include/deal.II/numerics/dof_print_solver_step.h
source/base/data_out_base.cc
source/base/parameter_handler.cc
source/distributed/fully_distributed_tria.cc
source/distributed/tria.cc
source/grid/grid_in.cc
source/grid/grid_out.cc
source/numerics/point_value_history.cc
tests/ad_common_tests/step-44-helper_res_lin_01.h
tests/ad_common_tests/step-44-helper_scalar_01.h
tests/ad_common_tests/step-44-helper_var_form_01.h
tests/ad_common_tests/step-44-helper_vector_01.h
tests/adolc/step-44.cc
tests/aniso/refine_and_coarsen_anisotropic.cc
tests/bits/joa_1.cc
tests/bits/step-4_dg_periodic.cc
tests/bits/step-4_dg_periodic_coupling.cc
tests/codim_one/bem.cc
tests/codim_one/data_out.cc
tests/codim_one/error_estimator_02.cc
tests/codim_one/gradients.cc
tests/codim_one/gradients_1.cc
tests/codim_one/grid_in_out.cc
tests/codim_one/grid_in_out_02.cc
tests/codim_one/grid_in_out_03.cc
tests/codim_one/grid_refinement.cc
tests/codim_one/interpolate_boundary_values_01.cc
tests/codim_one/interpolate_boundary_values_01_vector_valued.cc
tests/codim_one/interpolation.cc
tests/codim_one/interpolation_2.cc
tests/codim_one/interpolation_3.cc
tests/codim_one/mapping_fe_field_01.cc
tests/codim_one/mapping_q1.cc
tests/codim_one/mapping_q1_eulerian.cc
tests/codim_one/mapping_q_eulerian.cc
tests/codim_one/projection.cc
tests/codim_one/projection_dgp.cc
tests/codim_one/renumber_component_wise_01.cc
tests/codim_one/surface.cc
tests/data_out/data_out_hdf5_02.cc
tests/distributed_grids/2d_refinement_10.cc
tests/distributed_grids/3d_refinement_12.cc
tests/distributed_grids/coarse_grid_common.h
tests/dofs/dof_renumbering_10.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc
tests/dofs/locally_relevant_dofs_per_subdomain_01.cc
tests/dofs/locally_relevant_dofs_per_subdomain_01_hp.cc
tests/dofs/range_based_for_step-6.cc
tests/fe/fe_enriched_04.cc
tests/fe/fe_enriched_05.cc
tests/fe/fe_enriched_06.cc
tests/fe/fe_enriched_07.cc
tests/fe/fe_enriched_08.cc
tests/fe/fe_enriched_color_05.cc
tests/fe/fe_enriched_color_07.cc
tests/fe/fe_enriched_color_08.cc
tests/fe/fe_enriched_step-36.cc
tests/fe/fe_enriched_step-36b.cc
tests/fe/fe_system_components_base.cc
tests/fe/fe_tools_test.cc
tests/fe/nedelec_crash_01.cc
tests/fe/shapes_faceq.cc
tests/fe/shapes_traceq.cc
tests/grid/grid_generator_plate_with_a_hole.cc
tests/grid/grid_generator_plate_with_a_hole_2.cc
tests/grid/grid_generator_plate_with_a_hole_3.cc
tests/grid/grid_generator_plate_with_a_hole_4.cc
tests/grid/grid_out_vtk_02.cc
tests/grid/grid_tools_active_cell_layer_within_distance_01.cc
tests/grid/grid_tools_active_cell_layer_within_distance_02.cc
tests/grid/grid_tools_halo_layer_01.cc
tests/grid/grid_tools_halo_layer_02.cc
tests/grid/grid_tools_halo_layer_03.cc
tests/grid/grid_tools_halo_layer_04.cc
tests/grid/grid_tools_halo_layer_05.cc
tests/hp/crash_17.cc
tests/hp/crash_18.cc
tests/hp/hp_constraints_neither_dominate_01.cc
tests/hp/hp_constraints_neither_dominate_02.cc
tests/hp/hp_q_hierarchical_constraints.cc
tests/hp/laplace.h
tests/hp/step-27.cc
tests/integrators/assembler_simple_matrix_01.cc
tests/integrators/assembler_simple_matrix_01m.cc
tests/integrators/assembler_simple_matrix_02.cc
tests/integrators/assembler_simple_matrix_02m.cc
tests/integrators/assembler_simple_matrix_04.cc
tests/integrators/assembler_simple_mgmatrix_01.cc
tests/integrators/assembler_simple_mgmatrix_02.cc
tests/integrators/assembler_simple_mgmatrix_03.cc
tests/integrators/assembler_simple_mgmatrix_04.cc
tests/integrators/cells_and_faces_01.cc
tests/integrators/divergence_01.cc
tests/integrators/functional_01.cc
tests/integrators/mesh_worker_01.cc
tests/integrators/mesh_worker_02.cc
tests/integrators/mesh_worker_03.cc
tests/integrators/mesh_worker_1d_dg.cc
tests/integrators/mesh_worker_matrix_01.cc
tests/lac/solver_relaxation_01.cc
tests/lac/solver_relaxation_02.cc
tests/lac/solver_relaxation_03.cc
tests/lac/solver_relaxation_04.cc
tests/lac/sparse_matrix_Tmmult_01.cc
tests/lac/sparse_matrix_Tmmult_02.cc
tests/lac/sparse_matrix_iterator.cc
tests/lac/sparse_matrix_mmult_01.cc
tests/lac/sparse_matrix_mmult_02.cc
tests/matrix_free/dof_info_01.cc
tests/matrix_free/dof_info_02.cc
tests/matrix_free/interpolate_to_mg.cc
tests/metis/metis_05.cc
tests/mpi/codim_01.cc
tests/mpi/communicate_moved_vertices_03.cc
tests/mpi/data_out_hdf5_02.cc
tests/mpi/fe_tools_extrapolate_common.h
tests/mpi/interpolate_to_different_mesh_01.cc
tests/mpi/mg_01.cc
tests/mpi/mg_05.cc
tests/mpi/mg_06.cc
tests/mpi/muelu_periodicity.cc
tests/mpi/no_flux_constraints_02.cc
tests/mpi/no_flux_constraints_03.cc
tests/mpi/p4est_2d_constraintmatrix_04.cc
tests/mpi/p4est_3d_constraintmatrix_03.cc
tests/mpi/periodicity_01.cc
tests/mpi/periodicity_02.cc
tests/mpi/periodicity_03.cc
tests/mpi/step-37.cc
tests/multigrid/step-16-02.cc
tests/multigrid/step-16-07.cc
tests/multigrid/step-16-08.cc
tests/multigrid/step-16-bdry1.cc
tests/multigrid/step-16.cc
tests/multigrid/step-39-02.cc
tests/multigrid/step-39-02a.cc
tests/multigrid/step-39-03.cc
tests/multigrid/step-39.cc
tests/multigrid/transfer_04.cc
tests/multigrid/transfer_04a.cc
tests/multigrid/transfer_04b.cc
tests/multigrid/transfer_system_adaptive_09.cc
tests/numerics/error_estimator_02.cc
tests/numerics/error_estimator_02_complex.cc
tests/numerics/no_flux_12.cc
tests/numerics/point_value_history_01.cc
tests/numerics/point_value_history_02.cc
tests/numerics/point_value_history_03.cc
tests/optimization/step-44.h
tests/parameter_handler/parameter_acceptor_05.cc
tests/parameter_handler/parameter_acceptor_06.cc
tests/physics/step-18-rotation_matrix.cc
tests/physics/step-18.cc
tests/physics/step-44-dgp_monomial.cc
tests/physics/step-44-standard_tensors-material_push_forward.cc
tests/physics/step-44-standard_tensors-spatial.cc
tests/physics/step-44.cc
tests/quick_tests/lapack.cc
tests/sharedtria/tria_01.cc
tests/sharedtria/tria_02.cc
tests/simplex/data_out_write_hdf5_01.cc
tests/simplex/data_out_write_hdf5_02.cc
tests/simplex/poisson_02.cc
tests/symengine/sd_common_tests/step-44-sd-quadrature_level.h
tests/trilinos/solver_control_06.cc

index 99f88fe149fca428fbebf2205d9c63d476f753cd..5d4eda65c78355c86af1745def78d6e37bbe1fc3 100644 (file)
@@ -1159,7 +1159,7 @@ namespace Step63
 
     const std::string filename =
       "solution-" + Utilities::int_to_string(cycle) + ".vtu";
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtu(output);
   }
 
index 82fae2c0516ec1ab219a8acd6fbe15c74e28e65f..6069e4aed313a0e05e022fc1fbeca9bf7de46878 100644 (file)
@@ -48,7 +48,7 @@ DEAL_II_NAMESPACE_OPEN
  *
  * dealii::PathSearch search("MESH");
  * std::string full_name = search.find("grid");
- * std::ifstream in(full_name.c_str());
+ * std::ifstream in(full_name);
  * ...
  * @endcode
  *
index 3e54ae814558c09b5ea15515a62c4788cc09d589..aeb556ab964d309c529ae5f83aab2fa05388ea5d 100644 (file)
@@ -63,7 +63,7 @@ namespace Algorithms
     std::ostringstream streamOut;
     streamOut << filename_base << std::setw(digits) << std::setfill('0')
               << this->step << out.default_suffix();
-    std::ofstream out_filename(streamOut.str().c_str());
+    std::ofstream out_filename(streamOut.str());
     out.build_patches();
     out.write(out_filename);
     out.clear();
index 2e47c7d841f4baf4ad9854aa098ec0792fce0a29..8f507b815d95bd8202fd73afc010aad44b72d15e 100644 (file)
@@ -125,7 +125,7 @@ DoFPrintSolverStep<dim, SolverType, VectorType>::print_vectors(
   deallog << "Writing file:" << fname << std::endl;
 
   out.build_patches();
-  std::ofstream of(fname.c_str());
+  std::ofstream of(fname);
   out.write(of);
 }
 
index b1f92353039be4c1c8eab24c9867e34de914b883..5210363d2e3afc9b112a76f51b04df55d5c82e23 100644 (file)
@@ -7882,7 +7882,7 @@ DataOutInterface<dim, spacedim>::write_vtu_with_pvtu_record(
   if (n_groups == 0 || n_groups > n_ranks)
     {
       // every processor writes one file
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       AssertThrow(output, ExcFileNotOpen(filename));
       this->write_vtu(output);
     }
@@ -7923,7 +7923,7 @@ DataOutInterface<dim, spacedim>::write_vtu_with_pvtu_record(
           filename_vector.emplace_back(filename);
         }
 
-      std::ofstream pvtu_output((directory + pvtu_filename).c_str());
+      std::ofstream pvtu_output(directory + pvtu_filename);
       this->write_pvtu_record(pvtu_output, filename_vector);
     }
 
index 68c49b25821936824c2e97614c78e4880da7028a..19d2ce7a97a9200b268d5bc61023e6cd8efc98ae 100644 (file)
@@ -2021,7 +2021,7 @@ ParameterHandler::scan_line(std::string        line,
                                      "'INCLUDE' statement, but it does not "
                                      "name a file for inclusion."));
 
-      std::ifstream input(line.c_str());
+      std::ifstream input(line);
       AssertThrow(input,
                   ExcCannotOpenIncludeStatementFile(current_line_n,
                                                     input_filename,
index c120fe867fbcb9c1ed3b66aaa228039ee63699f5..7723fec305d905ea179d2200635e0823d26bd663 100644 (file)
@@ -488,7 +488,7 @@ namespace parallel
       if (myrank == 0)
         {
           std::string   fname = std::string(filename) + ".info";
-          std::ofstream f(fname.c_str());
+          std::ofstream f(fname);
           f << "version nproc n_attached_fixed_size_objs n_attached_variable_size_objs n_global_active_cells"
             << std::endl
             << 4 << " "
@@ -618,7 +618,7 @@ namespace parallel
         attached_count_variable, n_global_active_cells;
       {
         std::string   fname = std::string(filename) + ".info";
-        std::ifstream f(fname.c_str());
+        std::ifstream f(fname);
         AssertThrow(f.fail() == false, ExcIO());
         std::string firstline;
         getline(f, firstline); // skip first line
index 261c20261d1e1a585a2bd307aeed834ce5263a40..f683ab366742fc2f857fcbc2c554573f44944ea5 100644 (file)
@@ -2021,7 +2021,7 @@ namespace parallel
       if (this->my_subdomain == 0)
         {
           std::string   fname = std::string(filename) + ".info";
-          std::ofstream f(fname.c_str());
+          std::ofstream f(fname);
           f << "version nproc n_attached_fixed_size_objs n_attached_variable_size_objs n_coarse_cells"
             << std::endl
             << 5 << " "
@@ -2091,7 +2091,7 @@ namespace parallel
         attached_count_variable, n_coarse_cells;
       {
         std::string   fname = std::string(filename) + ".info";
-        std::ifstream f(fname.c_str());
+        std::ifstream f(fname);
         AssertThrow(f.fail() == false, ExcIO());
         std::string firstline;
         getline(f, firstline); // skip first line
index 92a068b609b183a70f5525bc65cfe08cf5a327cb..94d7ff98993bef39a57c4deb57bcc970bcd044f9 100644 (file)
@@ -4169,7 +4169,7 @@ GridIn<dim, spacedim>::read(const std::string &filename, Format format)
     }
   else
     {
-      std::ifstream in(name.c_str());
+      std::ifstream in(name);
       read(in, format);
     }
 }
index 8a9a5468604b5ff3915fc729c3bf8814b0fc536b..924b3dbfab1a3cb94530adc1a6b662a62c85f660 100644 (file)
@@ -3693,7 +3693,7 @@ GridOut::write_mesh_per_processor_as_vtu(
 
           const std::string pvtu_filename =
             (filename_without_extension + ".pvtu");
-          std::ofstream pvtu_output(pvtu_filename.c_str());
+          std::ofstream pvtu_output(pvtu_filename);
 
           DataOut<dim, spacedim> data_out;
           data_out.attach_triangulation(*tr);
@@ -3712,7 +3712,7 @@ GridOut::write_mesh_per_processor_as_vtu(
         }
     }
 
-  std::ofstream out(new_file.c_str());
+  std::ofstream out(new_file);
   std::vector<
     std::tuple<unsigned int,
                unsigned int,
index 98f739ce843f7ec57f999b3cfec97fe8bca2ceda..42389d6717891a821633ec62522ba70bedd455ee 100644 (file)
@@ -1010,7 +1010,7 @@ PointValueHistory<dim>::write_gnuplot(
   if (n_indep != 0)
     {
       std::string   filename = base_name + "_indep.gpl";
-      std::ofstream to_gnuplot(filename.c_str());
+      std::ofstream to_gnuplot(filename);
 
       to_gnuplot << "# Data independent of mesh location\n";
 
@@ -1089,7 +1089,7 @@ PointValueHistory<dim>::write_gnuplot(
           // Utilities::int_to_string(data_store_index,
           // 2) call, can handle up to 100
           // points
-          std::ofstream to_gnuplot(filename.c_str());
+          std::ofstream to_gnuplot(filename);
 
           // put helpful info about the
           // support point into the file as
index 4a5edcb7b0c84a32f03336024234b680eb7dc876..564fdf6417b4f3e7a11e9d27202e1e74db49e2c5 100644 (file)
@@ -1723,7 +1723,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index efc93878f55613626443a2e3cd9e08288a69c010..a924f9eb3fcb631b62266187a57c4b58a8bf4a4e 100644 (file)
@@ -2256,7 +2256,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index 5b3420a02077e9743c90b2801a3c3c1798d8c6c5..1651a2d13d109472aa017450f035dac9746ccbe5 100644 (file)
@@ -1650,7 +1650,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index 3dde0e8d16b80e86c37384a6662d182208fd81ef..2e7c48d55f9cbbb1bb2a6cbed7c1b2148808b8a2 100644 (file)
@@ -1743,7 +1743,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index a031f8ed2a819e777738e185a973b1847356547c..e400f7527062cdb894c6a5c1aa654b90435a57c6 100644 (file)
@@ -2063,7 +2063,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index fc999ef9286312eba5dbdf2ea1e81ff49ad15302..820647dc3b320a59f8449e8246678ce68a0cd849 100644 (file)
@@ -106,7 +106,7 @@ test_isotropic(int type, std::ostream &logfile)
           grid_out.set_flags(eps2);
           std::ostringstream filename;
           filename << "grid_" << type << '_' << cycle << ".eps";
-          std::ofstream outfile(filename.str().c_str());
+          std::ofstream outfile(filename.str());
           grid_out.write_eps(tria, outfile);
         }
 
index 7baa7e82887c4b508f0fbb7b5463877fbe72c378..6f6f57bfefb27ed78a63339da98b6c58ab162fbf 100644 (file)
@@ -987,7 +987,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   filename += ('0' + cycle);
   filename += ".eps";
 
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
 
   GridOut grid_out;
   grid_out.write_eps(triangulation, output);
index ff5563f0301984f86a3b22e56841cc4ef0f61f9f..9a6b18b772d99aac9ce20d63f6211d98e7c7e54b 100644 (file)
@@ -238,7 +238,7 @@ Step4<dim>::output_results(const unsigned int cycle) const
   data_out.add_data_vector(solution, "u");
 
   data_out.build_patches(fe.degree);
-  std::ofstream output((filename + ".vtk").c_str());
+  std::ofstream output(filename + ".vtk");
   data_out.write_vtk(output);
 }
 
index 3a248210b543c602ab54123c6aea3f3297f6e7ad..ec2bf879521eaf563e1a307077b5da28f3501f76 100644 (file)
@@ -245,7 +245,7 @@ Step4<dim>::output_results(const unsigned int cycle) const
   data_out.add_data_vector(solution, "u");
 
   data_out.build_patches(fe.degree);
-  std::ofstream output((filename + ".vtk").c_str());
+  std::ofstream output(filename + ".vtk");
   data_out.write_vtk(output);
 }
 
index fdc2b303e70e188f5f12c0bed67286000ae9cb3f..71170856080f4529e36aa6d95b0c1e0f2c1bfd07 100644 (file)
@@ -425,7 +425,7 @@ BEM<spacedim>::read_grid(std::string filename)
 {
   GridIn<spacedim - 1, spacedim> gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   for (auto cell = tria.begin_active(); cell != tria.end(); ++cell)
index fa61cbc19b223b0ddb217beab4411757a74725ab..4e48cfacd54aafc8bb1305fa1be055bb3d3bc42d 100644 (file)
@@ -49,7 +49,7 @@ test(std::string filename)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_Q<dim, spacedim>       fe(1);
index 797abd496ec6221b13b093243e555dfbaef0116b..374dcab1c9d4e38f8ff6642131ebd2318acc926d 100644 (file)
@@ -171,7 +171,7 @@ check()
     data_out.build_patches();
     std::string filename = spacedim == 2 ? "solution-2d-" : "solution-3d-";
     filename += Utilities::int_to_string(0, 2) + ".vtk";
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtk(output);
   }
 
index 4e21a4151edd79aa60436354a826249a69e2ab0b..f85f4d71305ce1a35c870ae0f9ac6d2307c4f5e1 100644 (file)
@@ -58,7 +58,7 @@ test(std::string filename)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   const QMidpoint<dim> q_midpoint;
index da5e8e5ecaba62f87f1f1ba9056f2073ff5811c2..fe7d6c9047a711700b5a32f0652a782d1382ece3 100644 (file)
@@ -58,7 +58,7 @@ test(std::string filename, unsigned int degree = 1)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   // finite elements used for the
index a9c8066eb8a931e6145e7aed78c130af61ae4181..f17ace3fa123c58c7b629e311e2d21da0727d6ea 100644 (file)
@@ -32,7 +32,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   GridOut grid_out;
index 58f5c72c789c31870ea8863e982a56c9a4ff77d0..547544cafdd60d5f81cabe96e9da4625eeb02d38 100644 (file)
@@ -32,7 +32,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   GridOut grid_out;
index de874e6e8fde3e8a7f7f04ec09456f7fd989b4dd..70fe9105c8fd31da3f61e8396b230a7b70257783 100644 (file)
@@ -36,7 +36,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   PersistentTriangulation<dim, spacedim>                      ptria(tria);
index 5bb56bff9175aa9b7063e6272c3253c64860dc70..0cfb1c4505146e6437bebc90b7f88dc888504a79 100644 (file)
@@ -37,7 +37,7 @@ test(std::string filename)
   Triangulation<dim, spacedim>     tria;
   GridIn<dim, spacedim>            gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
   tria.set_all_manifold_ids(1);
   tria.set_manifold(1, boundary);
index a224c48a62b7a4c405e99bb1808accd9263fcfd3..19161e3d8aafec8521ba14e016d974c6dd75985f 100644 (file)
@@ -39,7 +39,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   deallog << tria.n_active_cells() << " active cells" << std::endl;
index c172d5af7678a1fb7563d06b43e43f7a09f54597..00f7d7ef3f48178fbe4dc6c2464bc9663a6e0315 100644 (file)
@@ -57,7 +57,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   deallog << tria.n_active_cells() << " active cells" << std::endl;
index 659cbdd20915b08ce1aadae391780c237b56860d..2acda2b183383688f89b1c60eba00b6cc2da1987 100644 (file)
@@ -49,7 +49,7 @@ test(std::string filename, unsigned int n)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_Q<dim, spacedim>       fe(n);
index 58dbba99fdba2332047b429f2feb58a8a47beaf3..38d43e283585bbc29af6cfeb8d8379534cd5b772 100644 (file)
@@ -51,7 +51,7 @@ test(std::string filename)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_Q<dim, spacedim>       fe(1);
index 7315891fd1d8a70a1a7079f6bb133b96cc1d2aad..8bd12ab127f20ad097f2b44bd603752cf8e24e01 100644 (file)
@@ -53,7 +53,7 @@ test(std::string filename)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_Q<dim, spacedim>       fe_base(1);
index bfeb69c90d327974212c287d070ba25f2b1087b0..fdd4fc2b5a0449697bae1036b8495679f65390f7 100644 (file)
@@ -97,7 +97,7 @@ test(const unsigned int refs,
 
   std::string filename_scal =
     ("scal_check_" + Utilities::int_to_string(id) + ".vtu");
-  std::ofstream file_scal(filename_scal.c_str());
+  std::ofstream file_scal(filename_scal);
   data_out_scal.write_vtu(file_scal);
   data_out_scal.write_vtk(deallog.get_file_stream());
 
@@ -119,7 +119,7 @@ test(const unsigned int refs,
 
   std::string filename_euler =
     ("euler_check_" + Utilities::int_to_string(id) + ".vtu");
-  std::ofstream file_euler(filename_euler.c_str());
+  std::ofstream file_euler(filename_euler);
 
   data_out_euler.write_vtu(file_euler);
   data_out_euler.write_vtk(deallog.get_file_stream());
index 3974a0b6e042a1234b6de0694473656635e631be..a0c05c5bc6044e7e9c9cb37d29be29087c213653 100644 (file)
@@ -40,7 +40,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   GridOut grid_out;
index c1b8918c2ebd4e8c026db69aad36f644c1c327be..b8677675cdcbe0c5c3ac2a52f6651534c3104c90 100644 (file)
@@ -51,7 +51,7 @@ test(std::string filename)
 
   GridIn<dim, spacedim> gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   shift_dh.distribute_dofs(fe);
index 719fd3288dd110b381d63426d036787df6707aed..7b3f1f545f44f75b981469ecc6cdd73b69104f7c 100644 (file)
@@ -51,7 +51,7 @@ test(std::string filename, unsigned int degree)
 
   GridIn<dim, spacedim> gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   shift_dh.distribute_dofs(fe);
index 4035811c1435adaae50a7fb887ea337bf8eef7a0..bcebbb35812e3c7d10dbd09afe7b99bde9d6f5e0 100644 (file)
@@ -53,7 +53,7 @@ test(std::string filename, unsigned int n)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_Q<dim, spacedim>       fe(n);
index 2f793d8ed248d8e038c101f9a764a9af7e709edd..1779e437374b13aba43392c768e53ff5e05b9282 100644 (file)
@@ -54,7 +54,7 @@ test(std::string filename, unsigned int n)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   FE_DGP<dim, spacedim>     fe(n);
index 76799f17894b9bbcb099d48983913584a866aa72..93aa58244b7c92c4cfae5d7709daf0fb71ff91c7 100644 (file)
@@ -40,7 +40,7 @@ test(std::string filename)
   Triangulation<dim, spacedim> tria;
   GridIn<dim, spacedim>        gi;
   gi.attach_triangulation(tria);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   deallog << tria.n_active_cells() << " active cells" << std::endl;
index 60bea82566c366b5bf301734d54e45d191a69dcf..06403f32b66bddde4af7102fb4afcf18adf126b9 100644 (file)
@@ -48,7 +48,7 @@ test(std::string filename)
   GridIn<dim, spacedim>        gi;
 
   gi.attach_triangulation(triangulation);
-  std::ifstream in(filename.c_str());
+  std::ifstream in(filename);
   gi.read_ucd(in);
 
   const QGauss<dim>         quadrature(2);
index 503f999979c012c189db322ccf9918071cc86c06..96843cfb47370b14de890358994c5469bae77ebe 100644 (file)
@@ -124,7 +124,7 @@ check()
                           data_filter.get_data_set_dim(i));
     }
 
-  std::ofstream xdmf_file((output_basename + ".xdmf").c_str());
+  std::ofstream xdmf_file(output_basename + ".xdmf");
 
   xdmf_file << "<?xml version=\"1.0\" ?>\n";
   xdmf_file << "<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n";
@@ -150,7 +150,7 @@ check()
           << "\n==============================" << std::endl;
 
   cat_file((output_basename + ".xdmf").c_str());
-  std::ifstream f((output_basename + ".h5").c_str());
+  std::ifstream f(output_basename + ".h5");
   AssertThrow(f.good(), ExcIO());
 
   deallog << std::flush;
index 81e2f2ef5d91e9a7ff53f8483903ddec2e429986..fc0a829380fa24450b600274bf3451a3ff32b5f0 100644 (file)
@@ -324,7 +324,7 @@ TriaTest<dim>::write_vtu(const unsigned int counter) const
     case_name + Utilities::int_to_string(counter, 4);
   const std::string slot_itag = ".slot-" + Utilities::int_to_string(myid, 4);
 
-  std::ofstream output((output_tag + slot_itag + ".vtu").c_str());
+  std::ofstream output(output_tag + slot_itag + ".vtu");
   data_out.write_vtu(output);
 
   if (I_am_host)
@@ -337,7 +337,7 @@ TriaTest<dim>::write_vtu(const unsigned int counter) const
           filenames.push_back(output_tag + ".slot-" +
                               Utilities::int_to_string(i, 4) + ".vtu");
         }
-      std::ofstream pvtu_output((output_tag + ".pvtu").c_str());
+      std::ofstream pvtu_output(output_tag + ".pvtu");
       data_out.write_pvtu_record(pvtu_output, filenames);
     }
 #else
index 4c55019a480e04bf89d1b0ce8a967399c81d8dc3..897ace4b0556baa49b03ecdbcd601f5a14bce9ec 100644 (file)
@@ -324,7 +324,7 @@ TriaTest<dim>::write_vtu(const unsigned int counter) const
     case_name + Utilities::int_to_string(counter, 4);
   const std::string slot_itag = ".slot-" + Utilities::int_to_string(myid, 4);
 
-  std::ofstream output((output_tag + slot_itag + ".vtu").c_str());
+  std::ofstream output(output_tag + slot_itag + ".vtu");
   data_out.write_vtu(output);
 
   if (I_am_host)
@@ -337,7 +337,7 @@ TriaTest<dim>::write_vtu(const unsigned int counter) const
           filenames.push_back(output_tag + ".slot-" +
                               Utilities::int_to_string(i, 4) + ".vtu");
         }
-      std::ofstream pvtu_output((output_tag + ".pvtu").c_str());
+      std::ofstream pvtu_output(output_tag + ".pvtu");
       data_out.write_pvtu_record(pvtu_output, filenames);
     }
 #else
index a3f3668287ff39fbd91a62b622003784d39e7750..8e226d4cc7d81c7c4b3c563324b03b7a247f0129 100644 (file)
@@ -48,7 +48,7 @@ write_vtk(const parallel::distributed::Triangulation<dim, spacedim> &tria,
   // into the logstream
   {
     unsigned int  c = 0;
-    std::ifstream in((std::string(filename) + ".pvtu").c_str());
+    std::ifstream in(std::string(filename) + ".pvtu");
     while (in && ++c < 20)
       {
         std::string s;
@@ -59,7 +59,7 @@ write_vtk(const parallel::distributed::Triangulation<dim, spacedim> &tria,
 
   {
     unsigned int  c = 0;
-    std::ifstream in((std::string(filename) + "_0000.vtu").c_str());
+    std::ifstream in(std::string(filename) + "_0000.vtu");
     while (in && ++c < 20)
       {
         std::string s;
@@ -79,9 +79,9 @@ assert_tria_equal(const Triangulation<dim> &a, const Triangulation<dim> &b)
   std::string file1 = "tmp_grid1";
   std::string file2 = "tmp_grid2";
 
-  std::ofstream out1(file1.c_str());
+  std::ofstream out1(file1);
   GridOut().write_gnuplot(a, out1);
-  std::ofstream out2(file2.c_str());
+  std::ofstream out2(file2);
   GridOut().write_gnuplot(b, out2);
 
   out1.close();
index fa8ce0e169474b6ff4fbaf2e1201010127c3f8e7..48a10900e338b0ab933533e5375cf50423cccb72 100644 (file)
@@ -120,7 +120,7 @@ test(const bool adaptive_ref = true)
         dealii::Utilities::int_to_string(this_mpi_core);
 
       const std::string filename = base_filename + ".gp";
-      std::ofstream     f(filename.c_str());
+      std::ofstream     f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
index e3cb6462d65dd6883833dab25e27d11d2647a712..67f7d8599d966966f17f2accc78665ae7a996fc8 100644 (file)
@@ -97,7 +97,7 @@ test(const unsigned int flag)
 
       const std::string filename = "grid" + Utilities::int_to_string(dim) +
                                    Utilities::int_to_string(flag) + ".gp";
-      std::ofstream f(filename.c_str());
+      std::ofstream f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
index 159435c6c0568d8761482087cca52b3d5ce7b638..bb8367919232383f3a7803e559c6824ad666d80a 100644 (file)
@@ -157,7 +157,7 @@ test(const unsigned int flag)
       const std::string filename =
         output_name(flag, triangulation.locally_owned_subdomain());
 
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
 
       if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
@@ -170,7 +170,7 @@ test(const unsigned int flag)
 
           const std::string pvtu_filename =
             "output" + Utilities::int_to_string(flag) + ".pvtu";
-          std::ofstream pvtu_output(pvtu_filename.c_str());
+          std::ofstream pvtu_output(pvtu_filename);
           data_out.write_pvtu_record(pvtu_output, filenames);
         }
     }
index bb8d191cc6e9e5e45d7d70d09902feeaf39cdfce..bf78b33430ddb8af90df12e5d39db286e87e4b72 100644 (file)
@@ -122,7 +122,7 @@ test(const bool left = true)
 
       const std::string filename =
         "grid" + Utilities::int_to_string(dim) + ".gp";
-      std::ofstream f(filename.c_str());
+      std::ofstream f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
index 86690f8c84f721aada2cbbf31c4f4962ac55441c..7732236342f07e28c005c276fd49128cd2b6ace0 100644 (file)
@@ -229,7 +229,7 @@ test()
         const std::string filename =
           "grid" + dealii::Utilities::int_to_string(n_mpi_processes) +
           dealii::Utilities::int_to_string(this_mpi_process);
-        std::ofstream f((filename + ".gp").c_str());
+        std::ofstream f(filename + ".gp");
 
         f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
           << std::endl
@@ -281,7 +281,7 @@ test()
         const std::string filename =
           output_name(triangulation.locally_owned_subdomain());
 
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
         data_out.write_vtu(output);
 
         if (dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
@@ -293,7 +293,7 @@ test()
               filenames.push_back(output_name(i));
 
             const std::string pvtu_filename = "output.pvtu";
-            std::ofstream     pvtu_output(pvtu_filename.c_str());
+            std::ofstream     pvtu_output(pvtu_filename);
             data_out.write_pvtu_record(pvtu_output, filenames);
           }
       }
index 8a85810e76623a8b209de2f2a6752da9e3cb1a3b..b64616951af173340a57b03ae21425e51883bd50 100644 (file)
@@ -55,7 +55,7 @@ write_mesh(const parallel::shared::Triangulation<dim> &tria,
   const std::string filename =
     (filename_ + Utilities::int_to_string(tria.locally_owned_subdomain(), 4));
   {
-    std::ofstream output((filename + ".vtu").c_str());
+    std::ofstream output(filename + ".vtu");
     data_out.write_vtu(output);
   }
 }
index 2a6a71bd5e85e23c9d68ba9892935b510dcd30b2..8ddf60743dd9f379e8f3da47e90cfb988eff3957 100644 (file)
@@ -59,7 +59,7 @@ write_mesh(const parallel::shared::Triangulation<dim> &tria,
   const std::string filename =
     (filename_ + Utilities::int_to_string(tria.locally_owned_subdomain(), 4));
   {
-    std::ofstream output((filename + ".vtu").c_str());
+    std::ofstream output(filename + ".vtu");
     data_out.write_vtu(output);
   }
 }
index c98bfd723ace39043356692bad50abf2a514335e..c84e6344c5d55f12aa90f9d4eefd21294fb167a1 100644 (file)
@@ -302,7 +302,7 @@ Step6<dim>::output_results(const unsigned int cycle) const
   filename += ('0' + cycle);
   filename += ".eps";
 
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
 
   GridOut grid_out;
   grid_out.write_eps(triangulation, output);
index b56d3cc9d5944ce697d115d460e780aca9fe67bf..b1476bd7ed2f7e9df8ce4e7e5ab4be82fa6f57ca 100644 (file)
@@ -184,7 +184,7 @@ plot_shape_function()
 
   std::string filename =
     "shape_functions_" + dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 
   dof_handler.clear();
index 3e72d567d33ccd6cdb4cdb89ece2d23b61993fb8..fc25194a960a437b021a18da8752f61774c0a317 100644 (file)
@@ -135,7 +135,7 @@ test4()
 
   std::string filename =
     "h-shape_functions_" + dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index 151d886f3bc95a49b79968b5a6e68aeb6464a4ed..8ea8fb7034297d05eda2023a9c033869fc871ae3 100644 (file)
@@ -171,7 +171,7 @@ test5()
 
   std::string filename =
     "4cell_functions_" + dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index 7c55b4eee182b70c1dde288f5a97754e9e04f234..8b1538784070fc72ee05e609965b28f2389aa567 100644 (file)
@@ -186,7 +186,7 @@ test6(const bool         do_href,
                          "_p_feq=" + std::to_string(p_feq) +
                          "_p_feenr=" + std::to_string(p_feen) + "_" +
                          dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index 928e32ed569d89e7ef572cf804a40bff44064c75..96cf627c1141b464099ddeda9eef9fb46c970f78 100644 (file)
@@ -174,7 +174,7 @@ test2cells(const unsigned int p_feq = 2, const unsigned int p_feen = 1)
     "2cell-shape_functions_p_feq=" + std::to_string(p_feq) +
     "_p_feenr=" + std::to_string(p_feen) + "_" +
     dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index 5ae9fb3cdb3e55037095c4c8fc4f9f5e40bc20f2..fa4f4ea1399f22be2d70386922c2cbed448f5cba 100644 (file)
@@ -150,7 +150,7 @@ plot_shape_function(DoFHandler<dim> &dof_handler, unsigned int patches = 5)
 
   std::string filename =
     "hp-shape_functions_" + dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 }
 
index fc2488ad4c8a29ea41fa025e9d01b0ceae9ce409..ab0677094198811cccf002aef672a71f9850f4a1 100644 (file)
@@ -988,7 +988,7 @@ plot_shape_function(DoFHandler<dim> &dof_handler, unsigned int patches = 5)
         dealii::Utilities::int_to_string(0);
 
       const std::string filename = base_filename + ".gp";
-      std::ofstream     f(filename.c_str());
+      std::ofstream     f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
@@ -1030,7 +1030,7 @@ plot_shape_function(DoFHandler<dim> &dof_handler, unsigned int patches = 5)
   data_out.build_patches(patches);
 
   std::string   filename = "shape_functions.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 
   std::cout << "...finished plotting shape functions" << std::endl;
@@ -1361,7 +1361,7 @@ LaplaceProblem<dim>::build_fe_space()
             "fe_indices" + dealii::Utilities::int_to_string(dim) + "_p" +
             dealii::Utilities::int_to_string(0);
           const std::string filename = base_filename + ".gp";
-          std::ofstream     f(filename.c_str());
+          std::ofstream     f(filename);
 
           f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
             << std::endl
@@ -1391,7 +1391,7 @@ LaplaceProblem<dim>::build_fe_space()
             "cell_id" + dealii::Utilities::int_to_string(dim) + "_p" +
             dealii::Utilities::int_to_string(0);
           const std::string filename = base_filename + ".gp";
-          std::ofstream     f(filename.c_str());
+          std::ofstream     f(filename);
 
           f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
             << std::endl
@@ -1672,7 +1672,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle)
       std::string filename = "solution-";
       filename += Utilities::to_string(cycle);
       filename += ".vtk";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
 
       DataOut<dim> data_out;
       data_out.attach_dof_handler(dof_handler);
index 6a1eaf98650e2b01f165f311f02b24ebd194ca0f..15fd59a36654676fb36874b2aad10e707bd03271 100644 (file)
@@ -114,7 +114,7 @@ plot_shape_function(DoFHandler<dim> &dof_handler, unsigned int patches = 5)
         dealii::Utilities::int_to_string(0);
 
       const std::string filename = base_filename + ".gp";
-      std::ofstream     f(filename.c_str());
+      std::ofstream     f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
@@ -158,7 +158,7 @@ plot_shape_function(DoFHandler<dim> &dof_handler, unsigned int patches = 5)
   data_out.build_patches(patches);
 
   std::string   filename = "shape_functions.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 
   deallog << "...finished plotting shape functions" << std::endl;
index eabb8d684b7c7be394585597822fe8fc45840901..41944399a21a9c3653f61c7f3ef0266b4aba954f 100644 (file)
@@ -554,7 +554,7 @@ namespace Step36
         std::string filename = "solution-";
         filename += ('0' + cycle);
         filename += ".vtk";
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
 
         DataOut<dim> data_out;
         data_out.attach_dof_handler(dof_handler);
@@ -570,7 +570,7 @@ namespace Step36
         std::string filename = "mesh-";
         filename += ('0' + cycle);
         filename += ".vtk";
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
 
         DataOut<dim> data_out;
         data_out.attach_dof_handler(dof_handler);
@@ -586,7 +586,7 @@ namespace Step36
       {
         const std::string scalar_fname = "scalar-data.txt";
 
-        std::ofstream output(scalar_fname.c_str(),
+        std::ofstream output(scalar_fname,
                              std::ios::out |
                                (cycle == 0 ? std::ios::trunc : std::ios::app));
 
index 9b8cdabcc4b75b99e0dc447aad9e15ac29db6239..2d0a4addb2fb3b78d1c5a9938db86ebcfa146ff1 100644 (file)
@@ -814,7 +814,7 @@ namespace Step36
         std::string filename = "solution-";
         filename += ('0' + cycle);
         filename += ".vtk";
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
 
         Postprocessor<dim> postprocessor(
           enrichment); // has to live until the DataOut object is destroyed;
@@ -835,7 +835,7 @@ namespace Step36
         std::string filename = "mesh-";
         filename += ('0' + cycle);
         filename += ".vtk";
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
 
         DataOut<dim> data_out;
         data_out.attach_dof_handler(dof_handler);
@@ -851,7 +851,7 @@ namespace Step36
       {
         const std::string scalar_fname = "scalar-data.txt";
 
-        std::ofstream output(scalar_fname.c_str(),
+        std::ofstream output(scalar_fname,
                              std::ios::out |
                                (cycle == 0 ? std::ios::trunc : std::ios::app));
 
index ef1cdfb51565cc55a5524094833dc9eec66655eb..1dc3998c2dccaed6fafdca9fa07c1ff63de75324 100644 (file)
@@ -90,7 +90,7 @@ test(const bool renumber = false)
 
       const std::string filename = "grid" + Utilities::int_to_string(dim) +
                                    Utilities::int_to_string(renumber) + ".gp";
-      std::ofstream f(filename.c_str());
+      std::ofstream f(filename);
 
       f << "set terminal png size 420,440 enhanced font \"Helvetica,16\""
         << std::endl
index 3859b263859d147e105d248774fe289b4f627540..6947ba398b1ef70a8552f9d76e9e47a5618ed817 100644 (file)
@@ -160,7 +160,7 @@ test(const Triangulation<dim> &tria,
   data_out.add_data_vector(function1, fe_string1);
   data_out.build_patches(2);
   //    std::string file1_name=fe_string1+"_function.gnuplot";
-  //    std::ofstream file1(file1_name.c_str());
+  //    std::ofstream file1(file1_name);
   //    data_out.write_gnuplot(file1);
   //    file1.close();
   data_out.clear();
@@ -190,7 +190,7 @@ test(const Triangulation<dim> &tria,
 
   data_out.build_patches(2);
   data_out.write_gnuplot(deallog.get_file_stream());
-  //  std::ofstream file2(file2_name.c_str());
+  //  std::ofstream file2(file2_name);
   //  file2.setf(std::ios::showpoint | std::ios::left);
   //  data_out.write_gnuplot(file2);
   //  file2.close();
index 706f167ffde100da27bdd3b2abbafcfbbb449c57..bd297ba16fde76d928abc6f8c7e6da31d7a92d4a 100644 (file)
@@ -31,7 +31,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   // generate a version of the
index 67afa77ece2d20fd84459f77795752471bc685bd..8a593f6f9951d0a7ee10704cbe4e66428535d53f 100644 (file)
@@ -59,7 +59,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog << std::setprecision(PRECISION) << std::fixed;
   deallog.attach(logfile);
 
index be43d8083e172f59f60b34be5a3550bfe71e9e3f..7ffafbd65b5f47f9edbc19b34635588f23f825c9 100644 (file)
@@ -58,7 +58,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog << std::setprecision(PRECISION) << std::fixed;
   deallog.attach(logfile);
 
index e79273173f0e7aa33f05de1f259e3b15d9f6cfa0..a2900c60a1d7e55d0ff214fbf014c8b44243fe87 100644 (file)
@@ -99,7 +99,7 @@ test()
 
       const std::string filename =
         "output_" + Utilities::int_to_string(dim) + ".vtu";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 }
index f572d1c0d9cc48362bbf08ba0fa2f3633a796885..35fe9c2d086d176bc44ee9d9cf2f0530526873a8 100644 (file)
@@ -103,7 +103,7 @@ test()
 
       const std::string filename =
         "output_" + Utilities::int_to_string(dim) + ".vtu";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 }
index 0ca85a5f0d282ff57c744d74337d208d363b0688..fcde178f3d2575ff04e5a5c34a20acdaed5762c2 100644 (file)
@@ -103,7 +103,7 @@ test()
 
       const std::string filename =
         "output_" + Utilities::int_to_string(dim) + ".vtu";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 }
index 61a6c9d8888635a00ebddf3b1b35aa6fc43f0aa4..fc798b2fe18ee5fab211b5c2d1560e458f969785 100644 (file)
@@ -99,7 +99,7 @@ test()
 
       const std::string filename =
         "output_" + Utilities::int_to_string(dim) + ".vtu";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 }
index b7c8ea7a3fffe3e13110187fc776ab5342e8a30a..03f663dfd73173aa285037e0ec5c3c8acd105b5b 100644 (file)
@@ -69,7 +69,7 @@ test()
   //    + "d." +
   //    Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
   //    ".vtk");
-  // std::ofstream stream(filename.c_str());
+  // std::ofstream stream(filename);
   output(tr, deallog.get_file_stream());
 
   // tr.begin_active()->set_level_subdomain_id(1+myid);
index 8c9488d32a9b73eb4706c01c5c3d8e093863ff35..a1d5ace326116d62a13da232b907b06ca1adcc71 100644 (file)
@@ -86,7 +86,7 @@ test()
   {
     const std::string filename =
       "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 
@@ -112,7 +112,7 @@ test()
   {
     const std::string filename =
       "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 }
index 0cc9e1bb0ea5ffbb5a650eeb6fbb1deec0c3b796..0f87690e627bea621fefe73f79da41f55d639021 100644 (file)
@@ -113,7 +113,7 @@ test()
   {
     const std::string filename =
       "grid_no_skin_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 #endif
@@ -145,7 +145,7 @@ test()
   {
     const std::string filename =
       "grid_with_skin_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 #endif
index 1f3deb248af3fb51b32b458f0854ecb5a41500b7..3ffa68655c3a6cb858ef45e2b3489967acf10e9b 100644 (file)
@@ -81,7 +81,7 @@ test()
   {
     const std::string filename =
       "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 
@@ -107,7 +107,7 @@ test()
   {
     const std::string filename =
       "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 }
index 0af87dda9e2f1e8dea5d15f4113a59b1bf3c9f1b..f4a3891cc3a9dbe2106d9e73ab5467aec5326776 100644 (file)
@@ -75,7 +75,7 @@ test()
   {
     const std::string filename =
       "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 
@@ -99,7 +99,7 @@ test()
   {
     const std::string filename =
       "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 }
index 3f4e511c9bc20773cc31556618074bde08dd0923..276c6897dacae32ce9009f98e3a6a06d1f02442b 100644 (file)
@@ -80,7 +80,7 @@ test()
   {
     const std::string filename =
       "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 
@@ -108,7 +108,7 @@ test()
   {
     const std::string filename =
       "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk";
-    std::ofstream f(filename.c_str());
+    std::ofstream f(filename);
     GridOut().write_vtk(tria, f);
   }
 }
index 702cf05e0b5eec711799160bb417f3ed0caf7e46..023956e817b55e87b2756ab36efb1e20240ef0da 100644 (file)
@@ -69,7 +69,7 @@ write_vtk(const DoFHandler<dim> &dof_handler, const std::string filename)
                            data_component_interpretation);
   data_out.build_patches();
 
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtk(output);
 }
 
index 5a6b8df5271bb34a9e98c98a51a7bddf054e539d..a571862012230464edf698a7e542c47c5400f008 100644 (file)
@@ -69,7 +69,7 @@ write_vtk(const DoFHandler<dim> &dof_handler, const std::string filename)
                            data_component_interpretation);
   data_out.build_patches();
 
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtk(output);
 }
 
index 29376226d34c4cf8465bf0f07ef7e05cdf59d731..ff244ec5b0bc684a2f5fd6958e9917d7a27d93df 100644 (file)
@@ -525,7 +525,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   {
     const std::string filename =
       "grid-" + Utilities::int_to_string(cycle, 2) + ".eps";
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
 
     GridOut grid_out;
     grid_out.write_eps(triangulation, output);
@@ -563,7 +563,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
     data_out.add_data_vector(fe_indices, "fe_index");
     data_out.build_patches();
 
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtk(output);
   }
 }
index caee3829d9ea8e874fe0a594b1c3c6c3cf89e48b..aa1fc803e2273db79c2c3e696f6050ff6c68fd67 100644 (file)
@@ -533,7 +533,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   {
     const std::string filename =
       "grid-" + Utilities::int_to_string(cycle, 2) + ".eps";
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
 
     GridOut grid_out;
     grid_out.write_eps(triangulation, output);
@@ -571,7 +571,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
     data_out.add_data_vector(fe_indices, "fe_index");
     data_out.build_patches();
 
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtk(output);
   }
 }
index 7a0741d6ad4ced17f9118e7c692b014367cc18dd..ad5c622ba99928562ba3fc7687711f7c8f7f1886 100644 (file)
@@ -166,7 +166,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1)
   std::string filename = "shape_functions_" +
                          dealii::Utilities::int_to_string(counter, 1) + "_" +
                          dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index bec5aa61cb568e88f3d89b9bbb6953112113f827..0cb04b486dcc126a047352a3c0290f3fb98b2af0 100644 (file)
@@ -214,7 +214,7 @@ test2cells(const FiniteElement<dim> &fe_0,
   std::string filename = "shape_functions_" +
                          dealii::Utilities::int_to_string(counter, 1) + "_" +
                          dealii::Utilities::int_to_string(dim) + "D.vtu";
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 #endif
 
index 743589fb7e2b7c2e6c47daa7130c10857565b4a0..b4d3449569e6d44146e78801c6da450fcce8e6da 100644 (file)
@@ -139,7 +139,7 @@ test(const bool apply_constrains, const unsigned int hp)
                << (apply_constrains ? "_constrained" : "") << hp_string << '_'
                << i << ".vtk";
 
-      std::ofstream output(filename.str().c_str());
+      std::ofstream output(filename.str());
       data_out.write_vtk(output);
 #endif
     }
index aa3d13281ca6bd4220b2ac4401cbb7414459c245..bcba063f9b4808e41a579f5d30d9e15b9a55da92 100644 (file)
@@ -602,7 +602,7 @@ Laplace<dim>::print_errors()
       error_table.write_text(std::cout);
 
       const std::string fname = output_name + ".gp";
-      std::ofstream     output(fname.c_str(), std::ios::out | std::ios::trunc);
+      std::ofstream     output(fname, std::ios::out | std::ios::trunc);
 
       // use Gnuplot datablocks:
       output << "$data << EOD" << std::endl;
index c925cd8016e7060b106e1ebc6b7cc46feead98e2..8e4f65f767995405836bc8c968b54cff07105ac0 100644 (file)
@@ -331,7 +331,7 @@ namespace Step27
 
         const std::string filename =
           "solution-" + Utilities::int_to_string(cycle, 2) + ".vtk";
-        std::ofstream output(filename.c_str());
+        std::ofstream output(filename);
         data_out.write_vtk(output);
       }
 
index 4baf9afb9740d65c133d41d573cb51ced2b3f7f5..874a90b8728d5e3cce10056bcf5603ce6ba25b44 100644 (file)
@@ -54,7 +54,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   Triangulation<2, 2> tr;
index b7be41ddd041f0489d22ed927162ed798532586e..fca631c090abe30b61e287f1714dcfd306d2ba0f 100644 (file)
@@ -54,7 +54,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   Triangulation<2, 2> tr;
index 97dea68355254a2a719cb18dc61fac2f2d1c0c61..86516cce0e0ab178893e8d41558a2fe44f9f76e6 100644 (file)
@@ -85,7 +85,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index e66f11926b7c78ae21deaf646fef3c3ecbab7df0..f815a2422e370669777427757e2c2d5859bd3222 100644 (file)
@@ -85,7 +85,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index 9e067c3391ae4300f91486d0c1c65d0299f45764..2cbfdee2c8b116d82e77f2a68583a855066ace00 100644 (file)
@@ -116,7 +116,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index 7264d8e7cc0a9eeb66b3bf77bcb99f97c2d22752..8580689d5491329ebc7ed2f5291f3135384e29d2 100644 (file)
@@ -54,7 +54,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   Triangulation<2, 2> tr;
index 0ce35f8c428cdadc67e53cde9fa323a997057c88..b8afd48c149b3ad3ea5efc76790e1f41dede7f27 100644 (file)
@@ -82,7 +82,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index c412efbf54298a3f2844efe8919f811d522c4bc5..d71c7b4ecd1fd24c84c1d34a2f339a83f0b8b543 100644 (file)
@@ -124,7 +124,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index 5ff21666b27bcbffbdb9b354822cc9f76ab48b36..79da1f07fc01cb65c90d663e83006f2fcd92b390 100644 (file)
@@ -231,7 +231,7 @@ int
 main()
 {
   const std::string logname("output");
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>           p0(0);
index da81bbe96ddedca1b318f386d4b57445c2596217..759ff3175ba639cbc5ac4c8ab5345d229badf095 100644 (file)
@@ -218,7 +218,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2> el2(0);
index e497de263df919b3af6bb961ccce6dbb844085cf..ff6f58151228fa78a8852dd91df7793f73985efc 100644 (file)
@@ -240,7 +240,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   Triangulation<2> tr2;
index fbc014e985d9fc0b523c018938e568c3d4549555..c8a2e47dd0220342168f721ae630fb8e2cb105c5 100644 (file)
@@ -190,7 +190,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2> el2(0);
index ef44d9d0de7ec44a15d50a7e243314db82a2e3b1..850c61942bd23f63d2f73072ed802c049a074477 100644 (file)
@@ -228,7 +228,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   std::vector<std::shared_ptr<FiniteElement<2>>> fe2;
index 302424fd877325fc8646a1562840950b1824a45c..7dce6e778b3b686bed65730c9f873b91c66de996 100644 (file)
@@ -326,7 +326,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   std::vector<std::shared_ptr<FiniteElement<2>>> fe2;
index 89fc9d4da1a935f04b61890e2a93ec3a020aa611..ed2ad3f79631e77dcf5569aa40424984663c0b1b 100644 (file)
@@ -326,7 +326,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2> dgp0(0);
index 2a9570c4d98cc5b8a480f969cd9280ea680b0596..e76f0a5f8900681d9a216217357a0540fec5d4a6 100644 (file)
@@ -461,7 +461,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   Advection::AdvectionProblem<1> advection_problem;
index c198c713da1bddb26772a7c599825fe7c611e381..9188499d0a1434c36251cdf98c6d3bb3b192c399 100644 (file)
@@ -230,7 +230,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   FE_DGP<2>                       p0(0);
index 28e66827d4322abd2770946b77dc8240ec03e1a4..495b4a3e078fc296b15b6507b97a19d25bfd9695 100644 (file)
@@ -58,7 +58,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   //  logfile.setf(std::ios::fixed);
   deallog << std::setprecision(4);
   deallog.attach(logfile);
index e5ec9fbc43889070947d69a53aafb2c45a49f771..e1c18c1a77e7f399eff1c03c6447ab8b2d7b3cb9 100644 (file)
@@ -59,7 +59,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   //  logfile.setf(std::ios::fixed);
   deallog << std::setprecision(4);
   deallog.attach(logfile);
index af432d6a6f82d7481bdb3c82e62edfb24d30bef9..09590735ccd869a025dabf19e0ce7596fc9f015f 100644 (file)
@@ -60,7 +60,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   //  logfile.setf(std::ios::fixed);
   deallog << std::setprecision(4);
   deallog.attach(logfile);
index c543cd501d76d09b4cffe13a617d185a93841033..b3a75c4f88ad16d11bf00c396fa7c42d7cb89e35 100644 (file)
@@ -58,7 +58,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   //  logfile.setf(std::ios::fixed);
   deallog << std::setprecision(4);
   deallog.attach(logfile);
index 3f04b2795a6d5631bf98b3edd720cfa818907afd..1ff9206b0cce82ebee256f8a498e63e0b3191e07 100644 (file)
@@ -80,7 +80,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
   Testing::srand(3391466);
 
index 03cbd447a84c16105dd073c07985fa248e4d3cc5..4f140ecc52f8e88dbb16e52a8d1b410caef85b32 100644 (file)
@@ -85,7 +85,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
   Testing::srand(3391466);
 
index 5ad22c633f84021f4060d5562af0157e5b804c20..2120b523257d7e370660da7ce151714dbb843ee2 100644 (file)
@@ -22,7 +22,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
 
   SparsityPattern pattern(4, 5, 2);
index 9a26261a9604547f1f144a211eb874b76f0d2201..13079df684a42a5232ce92a4298fec53da54f8f2 100644 (file)
@@ -80,7 +80,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
   Testing::srand(3391466);
 
index b354f166965d525fb1eccf627fd545bfeeccb399..d0df8feef5d5fb683fcee2dc79515e095133c793 100644 (file)
@@ -85,7 +85,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   deallog.attach(logfile);
   Testing::srand(3391466);
 
index 2e9581fa9dd26048118ad7cdd64ea25986ab9918..47156c372bd31485e6bf9b6cfa7617b859d10c4f 100644 (file)
@@ -153,7 +153,7 @@ test(const bool adaptive_ref = true)
         dealii::Utilities::int_to_string(this_mpi_core);
 
       const std::string filename = base_filename + ".gp";
-      std::ofstream     f(filename.c_str());
+      std::ofstream     f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
index 5cf1e1739a3a31c7a6eefbc6ec7ad9dff78fa4c7..2ea4edc5200d1d5c95803bce74243b13f1056758 100644 (file)
@@ -155,7 +155,7 @@ test(const bool adaptive_ref = true)
         dealii::Utilities::int_to_string(this_mpi_core);
 
       const std::string filename = base_filename + ".gp";
-      std::ofstream     f(filename.c_str());
+      std::ofstream     f(filename);
 
       f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
         << std::endl
index aa60ed9879811064e54c810d5f7670b2e54169e5..f2226fb70c169b3fdd6ea4d8c94bc0277a192199 100644 (file)
@@ -163,7 +163,7 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
       data_out.build_patches();
       const std::string filename =
         "output_" + Utilities::int_to_string(myid) + ".vtu";
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
 
       const std::string mg_mesh = "mg_mesh";
index 8465dfd269ca86e4c4c34e6a25143f1d85b4d11d..8865449d5f1f3e8121512bdc26829fde64499f9a 100644 (file)
@@ -113,7 +113,7 @@ test(const bool with_weighting, const bool write_to_vtk = false)
       std::stringstream filename;
       filename << "grid_" << dim << "d.with_weighting_" << with_weighting
                << ".vtk";
-      std::ofstream outfile(filename.str().c_str());
+      std::ofstream outfile(filename.str());
       data_out.write_vtk(outfile);
     }
 }
index a30b962daa9dc44aa4a366536bb6d08283346227..bc88b2a41e4cbf059a453da6ad5d7b3a9316836d 100644 (file)
@@ -104,7 +104,7 @@ test(std::ostream & /*out*/)
   name[1] += tr.locally_owned_subdomain();
 
   {
-    std::ofstream file(name.c_str());
+    std::ofstream file(name);
     data_out.build_patches();
     data_out.write_vtu(file);
   }
index 03e2cb613490924617b5bd3cd0389d1f2bb9f1b4..18263be934fa359abc0d6c07f25a8b67197a5106 100644 (file)
@@ -95,7 +95,7 @@ test()
 
   /*std::string
   filename("grid"+Utilities::int_to_string(Utilities::MPI::this_mpi_process(MPI_COMM_WORLD),2)+".vtu");
-  std::ofstream out(filename.c_str());
+  std::ofstream out(filename);
   GridOut grid_out;
   grid_out.write_vtu(triangulation, out);*/
   deallog << Utilities::int_to_string(dim, 1) << "D OK" << std::endl;
index 61def44c8051d153b1362fa9a2a3653798f1b432..f94ae20aa6f4fdc84414ccd24aa09e1e0196379e 100644 (file)
@@ -77,7 +77,7 @@ check()
                           data_filter.get_data_set_dim(i));
     }
 
-  std::ofstream xdmf_file((output_basename + ".xdmf").c_str());
+  std::ofstream xdmf_file(output_basename + ".xdmf");
 
   xdmf_file << "<?xml version=\"1.0\" ?>\n";
   xdmf_file << "<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n";
@@ -105,7 +105,7 @@ check()
   if (0 == Utilities::MPI::this_mpi_process(MPI_COMM_WORLD))
     {
       cat_file((output_basename + ".xdmf").c_str());
-      std::ifstream f((output_basename + ".h5").c_str());
+      std::ifstream f(output_basename + ".h5");
       AssertThrow(f.good(), ExcIO());
     }
 
index ed0b3eca113c848f191c9274ce66713074b8be4d..7af7359dc898563bd5b952c6c747f001ffdaa0f5 100644 (file)
@@ -124,7 +124,7 @@ output_vector(const VectorType &     v,
     (output_name + "." +
      Utilities::int_to_string(Utilities::MPI::this_mpi_process(MPI_COMM_WORLD),
                               1));
-  std::ofstream output((filename + ".vtu").c_str());
+  std::ofstream output(filename + ".vtu");
   data_out.write_vtu(output);
 }
 
index 14ab76e87685cef9e195c8ad77ba0730a01515b1..4bb7abb0774f979c243e706a979f9c26bcfeb468 100644 (file)
@@ -87,7 +87,7 @@ output(DoFHandler<dim> & dh,
   filename << filename_ << Utilities::int_to_string(loop, 2) << '.'
            << Utilities::int_to_string(myid, 2) << ".vtu";
 
-  std::ofstream output(filename.str().c_str());
+  std::ofstream output(filename.str());
   data_out.write_vtu(output);
   if (myid)
     {
@@ -99,7 +99,7 @@ output(DoFHandler<dim> & dh,
                             "." + Utilities::int_to_string(i, 2) + ".vtu");
       const std::string pvtu_filename =
         (filename_ + Utilities::int_to_string(loop, 2) + ".pvtu");
-      std::ofstream pvtu_output(pvtu_filename.c_str());
+      std::ofstream pvtu_output(pvtu_filename);
       data_out.write_pvtu_record(pvtu_output, filenames);
     }
 }
index 74ec6c7d539f413dcefe2f89b6e4d69e5957fcac..18198f36c695d3985976d8c73ae6d6c66cb9ff87 100644 (file)
@@ -45,7 +45,7 @@ output(parallel::distributed::Triangulation<dim> &tr)
   const std::string filename =
     ("mesh." + Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
      ".fig");
-  std::ofstream stream(filename.c_str());
+  std::ofstream stream(filename);
 
   GridOutFlags::XFig flags;
   flags.color_by = GridOutFlags::XFig::level_subdomain_id;
index 8c5247a0a474a601007dc633a6f9b5552e59de7f..3e24516cff8c144dc5f94877ccd29cc0d17730c6 100644 (file)
@@ -58,7 +58,7 @@ output(parallel::distributed::Triangulation<dim> &tr)
   const std::string filename =
     ("mesh." + Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
      ".svg");
-  std::ofstream stream(filename.c_str());
+  std::ofstream stream(filename);
   /*
   GridOutFlags::XFig flags;
   flags.color_by = GridOutFlags::XFig::level_subdomain_id;
index 8ba227f22b4b2755dfbcd67c1fb2f0855510ef5d..a057992d3aa154dfeb276c4fefb91aa4b4d89824 100644 (file)
@@ -62,7 +62,7 @@ output(parallel::distributed::Triangulation<dim> &tr)
   const std::string filename =
     ("mg_06/mesh." + Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
      ".svg");
-  std::ofstream stream(filename.c_str());
+  std::ofstream stream(filename);
   /*
   GridOutFlags::XFig flags;
   flags.color_by = GridOutFlags::XFig::level_subdomain_id;
index 7a6b65d0885039f9733aa2ed82339706db23e11d..e2303344179e573e58fc21569e4b10be3ae90394 100644 (file)
@@ -685,7 +685,7 @@ namespace Step22
       << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2)
       << ".vtu";
 
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtu(output);
 
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
@@ -700,7 +700,7 @@ namespace Step22
         const std::string pvtu_filename =
           ("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
            ".pvtu");
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
       }
   }
index 8186d701b1ceffb46b4a574c2502c487b5f039c1..bb51670c3d6b616b7c35cbee63824ebf5bc29b4b 100644 (file)
@@ -130,7 +130,7 @@ test()
   {
     // write the constraintmatrix to a file on each cpu
     std::string fname = base + "cm_" + Utilities::int_to_string(myid) + ".dot";
-    std::ofstream file(fname.c_str());
+    std::ofstream file(fname);
     constraints.print(file);
   }
   MPI_Barrier(MPI_COMM_WORLD);
@@ -143,7 +143,7 @@ test()
         (std::string("cat ") + base + "cm_?.dot|sort -n|uniq >" + base + "cm")
           .c_str());
       {
-        std::ifstream     file((base + "cm").c_str());
+        std::ifstream     file(base + "cm");
         std::stringstream ss;
         ss << file.rdbuf();
         std::string str = ss.str();
index 1868f1a3bb400ee82aef8eca558c6bd614cb19d8..199c48d9c893998ce6866dc55a98926408580052 100644 (file)
@@ -103,7 +103,7 @@ test()
   {
     // write the constraintmatrix to a file on each cpu
     std::string fname = base + "cm_" + Utilities::int_to_string(myid) + ".dot";
-    std::ofstream file(fname.c_str());
+    std::ofstream file(fname);
     constraints.print(file);
   }
   MPI_Barrier(MPI_COMM_WORLD);
@@ -116,7 +116,7 @@ test()
                                  "cm_*.dot | sort -n | uniq > " + base + "cm")
                                   .c_str());
       {
-        std::ifstream     file((base + "cm").c_str());
+        std::ifstream     file(base + "cm");
         std::stringstream ss;
         ss << file.rdbuf();
         std::string str = ss.str();
index 66943440cf38f628086387d2743d057f9d896793..e6f26faaa76add20d01cf22e86f9a950236e8456 100644 (file)
@@ -283,7 +283,7 @@ test()
   const std::string filename =
     ("solution." + Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
      ".d2");
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_deal_II_intermediate(output);
 
   tr.reset_manifold(0);
index 8f1d67e90bf1faab08bf5cda63b7922b8285cbad..ad352dc419b1297c4e1aad3bcebb2230fb8823f4 100644 (file)
@@ -283,7 +283,7 @@ test()
   const std::string filename =
     ("solution." + Utilities::int_to_string(tr.locally_owned_subdomain(), 4) +
      ".vtu");
-  std::ofstream output(filename.c_str());
+  std::ofstream output(filename);
   data_out.write_vtu(output);
 
   tr.reset_manifold(0);
index 30f90c3be8c0217841527892a79cc448cb3e4acc..47e0ae92611b8c499050c752898de8d3146b22e8 100644 (file)
@@ -488,7 +488,7 @@ namespace Step40
     const std::string filename =
       ("solution-" + Utilities::int_to_string(cycle, 2) + "." +
        Utilities::int_to_string(triangulation.locally_owned_subdomain(), 4));
-    std::ofstream output((filename + ".vtu").c_str());
+    std::ofstream output(filename + ".vtu");
     data_out.write_vtu(output);
 
     if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
@@ -500,7 +500,7 @@ namespace Step40
           filenames.push_back("solution-" + Utilities::int_to_string(cycle, 2) +
                               "." + Utilities::int_to_string(i, 4) + ".vtu");
 
-        std::ofstream pvtu_output((filename + ".pvtu").c_str());
+        std::ofstream pvtu_output(filename + ".pvtu");
         data_out.write_pvtu_record(pvtu_output, filenames);
       }
   }
index 370d8c0a95bc313ccc323d6756d176e9062bd4de..6dd9bbeb042adee6f21e16640ec10bbdd74509c7 100644 (file)
@@ -703,7 +703,7 @@ namespace Step22
       << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2)
       << ".vtu";
 
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtu(output);
 
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
@@ -718,7 +718,7 @@ namespace Step22
         const std::string pvtu_filename =
           ("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
            ".pvtu");
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
       }
   }
index 314132dfec1a1375213b163d4c91d9232a9f25ea..7f7226e2e3650b6cd8da7421e590714ebd984dec 100644 (file)
@@ -786,7 +786,7 @@ namespace Step22
       << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2)
       << ".vtu";
 
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtu(output);
 
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
@@ -801,7 +801,7 @@ namespace Step22
         const std::string pvtu_filename =
           ("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
            ".pvtu");
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
       }
   }
index 5309203dd3236e2d5d1a7624e7275581145bd6aa..e1989a87f43066bf093b354490769dd78daf444a 100644 (file)
@@ -479,7 +479,7 @@ namespace Step37
 
         std::string pvtu_filename =
           "solution-" + Utilities::to_string(cycle) + ".pvtu";
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
       }
 
@@ -495,7 +495,7 @@ namespace Step37
           "grid" + dealii::Utilities::int_to_string(dim) + "_" +
           dealii::Utilities::int_to_string(cycle);
         const std::string filename = base_filename + ".gp";
-        std::ofstream     f(filename.c_str());
+        std::ofstream     f(filename);
 
         f << "set terminal png size 400,410 enhanced font \"Helvetica,8\""
           << std::endl
index 1c261864d967a5e7073cec4c08af73c9c54f6cbe..5288d72801461fe20e8201a289f4044e95c1161e 100644 (file)
@@ -560,7 +560,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   std::ostringstream filename;
   filename << "solution-" << cycle << ".vtk";
 
-  std::ofstream output(filename.str().c_str());
+  std::ofstream output(filename.str());
   data_out.write_vtk(output);
 }
 
index a88ef577ffe3011c01d5431cecd4afc7e5832657..b6d623a06ca2abad2741d89b643f1b3578274096 100644 (file)
@@ -539,7 +539,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   std::ostringstream filename;
   filename << "solution-" << cycle << ".vtk";
 
-  //  std::ofstream output (filename.str().c_str());
+  //  std::ofstream output (filename.str());
   //  data_out.write_vtk (output);
 }
 
index d444a66432455f1625faaa0b0f30a6966095836d..2afe8876fd721e10958dee7d67f12e83c5f88389 100644 (file)
@@ -547,7 +547,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   std::ostringstream filename;
   filename << "solution-" << cycle << ".vtk";
 
-  //  std::ofstream output (filename.str().c_str());
+  //  std::ofstream output (filename.str());
   //  data_out.write_vtk (output);
 }
 
index bf5c8e993878ffc67505a71c6637b8481d7111f5..44cab6f8373a6bd19e2447b1d723b17d1a8967bc 100644 (file)
@@ -579,7 +579,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   std::ostringstream filename;
   filename << "solution-" << cycle << ".vtk";
 
-  std::ofstream output(filename.str().c_str());
+  std::ofstream output(filename.str());
   data_out.write_vtk(output);
 }
 
index 543cc22dcd50d6569e8f861e4dc6276f2f3afe2e..054144157207ad4f63e3e579702554017dd95012 100644 (file)
@@ -540,7 +540,7 @@ LaplaceProblem<dim>::output_results(const unsigned int cycle) const
   std::ostringstream filename;
   filename << "solution-" << cycle << ".vtk";
 
-  //  std::ofstream output (filename.str().c_str());
+  //  std::ofstream output (filename.str());
   //  data_out.write_vtk (output);
 }
 
index 2679e83ded084edf38285cfe6236e36cae556e7c..914ccd85f0c7884ea93077ea683c0237bc77351b 100644 (file)
@@ -737,7 +737,7 @@ namespace Step39
     filename += ".gnuplot";
     deallog << "Writing solution to <" << filename << ">..." << std::endl
             << std::endl;
-    std::ofstream gnuplot_output(filename.c_str());
+    std::ofstream gnuplot_output(filename);
 
     DataOut<dim> data_out;
     data_out.attach_dof_handler(dof_handler);
index 4f650b1a648f514ca95592bf7c30f164de1b6e4d..95810f3bc28fe9c116328d6e05b55a7fe4e58ba6 100644 (file)
@@ -744,7 +744,7 @@ namespace Step39
     filename += ".gnuplot";
     deallog << "Writing solution to <" << filename << ">..." << std::endl
             << std::endl;
-    std::ofstream gnuplot_output(filename.c_str());
+    std::ofstream gnuplot_output(filename);
 
     DataOut<dim> data_out;
     data_out.attach_dof_handler(dof_handler);
index 6f242fc345b2d30d83d7fd251315626b0fdda743..462667e7a59125097a11ea86d0f8193df29717cf 100644 (file)
@@ -743,7 +743,7 @@ namespace Step39
     filename += ".gnuplot";
     deallog << "Writing solution to <" << filename << ">..." << std::endl
             << std::endl;
-    std::ofstream gnuplot_output(filename.c_str());
+    std::ofstream gnuplot_output(filename);
 
     DataOut<dim> data_out;
     data_out.attach_dof_handler(dof_handler);
index e9ae4679e9f644a157e8f57420f8430f453d0594..eceed9f6a2f839cd3ffe6f37ac254ce2d71db401 100644 (file)
@@ -725,7 +725,7 @@ namespace Step39
     filename += ".gnuplot";
     deallog << "Writing solution to <" << filename << ">..." << std::endl
             << std::endl;
-    std::ofstream gnuplot_output(filename.c_str());
+    std::ofstream gnuplot_output(filename);
 
     DataOut<dim> data_out;
     data_out.attach_dof_handler(dof_handler);
index 7ad15818c0eeef25795749da6b7ec2013a99b5ac..402f8a19662c8a780e434ed250428e1456d01501 100644 (file)
@@ -116,7 +116,7 @@ check_fe(FiniteElement<dim> &fe)
       const std::string filename =
         ("solution." +
          Utilities::int_to_string(tr.locally_owned_subdomain(), 4) + ".vtu");
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 
index 02728f133f959408d95d7d2da67d5618ef9bf669..108d47f6bdeaccbe56c9b6df064ce9b2a4e6f7e6 100644 (file)
@@ -115,7 +115,7 @@ check_fe(FiniteElement<dim> &fe)
       const std::string filename =
         ("solution." +
          Utilities::int_to_string(tr.locally_owned_subdomain(), 4) + ".vtu");
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 
index ff4e3e9e0343895070631c4b8de1b9f744a31270..119ac686e85dd696969927e627aad847154680ef 100644 (file)
@@ -115,7 +115,7 @@ check_fe(FiniteElement<dim> &fe)
       const std::string filename =
         ("solution." +
          Utilities::int_to_string(tr.locally_owned_subdomain(), 4) + ".vtu");
-      std::ofstream output(filename.c_str());
+      std::ofstream output(filename);
       data_out.write_vtu(output);
     }
 
index b11350920bae2f9fbf1edbed0e992c2fc7d6d537..df0c6db9e4d28670f977abb842ae35797cf92afe 100644 (file)
@@ -91,7 +91,7 @@ check(const FiniteElement<dim> &fe, const unsigned int selected_block)
   std::ostringstream out_filename;
   out_filename << "gitter.eps";
 
-  //   std::ofstream grid_output (out_filename.str().c_str());
+  //   std::ofstream grid_output (out_filename.str());
   //   GridOut grid_out;
   //   grid_out.write_eps (tr, grid_output);
 
index 13b40c5f0189be238e58d6e0c5846a91f18c21ef..766bad222325012351d0ded332f26ce4fc0130d6 100644 (file)
@@ -250,7 +250,7 @@ output(const std::string         name,
   data_out.add_data_vector(error, std::string("error"));
   data_out.build_patches();
 
-  std::ofstream output(name.c_str());
+  std::ofstream output(name);
   data_out.write_vtu(output);
 }
 
index 980df3601c3ad95ad17335110d54a1b0afebb826..60380412899dc6c2dac45aa5c0223a4e357d24ca 100644 (file)
@@ -195,7 +195,7 @@ output(const std::string                   name,
   data_out.add_data_vector(error, std::string("error"));
   data_out.build_patches();
 
-  std::ofstream output(name.c_str());
+  std::ofstream output(name);
   data_out.write_vtu(output);
 }
 
index c23ce514fe2f9a8511263e7e5a3642f04f1589d0..aa5db1ab50099f052fef6d499c3313c2f28ee536 100644 (file)
@@ -87,7 +87,7 @@ run()
   tria.reset_manifold(0);
 
   /*  std::string filename = "Mesh.eps";
-  std::ofstream output (filename.c_str());
+  std::ofstream output (filename);
   GridOut grid_out;
   grid_out.write_eps (tria, output);
   */
index 39a6aeec75b229cf226210e4de96cbe5ab4612d4..d507c1245a7f0e204c02bab5f61ef6eaf818d0dd 100644 (file)
@@ -249,7 +249,7 @@ TestPointValueHistory<dim>::run()
     {
       deallog << "Copying output file " << filenames[i] << std::endl;
 
-      std::ifstream in(filenames[i].c_str());
+      std::ifstream in(filenames[i]);
       AssertThrow(in, ExcIO());
 
       std::string s;
index 8d3095b49b643da93aa22efd95f5f335ba892e77..df0c791d6930873b99949cc377e911c61a61f0f3 100644 (file)
@@ -389,7 +389,7 @@ TestPointValueHistory<dim>::run()
     {
       deallog << "Copying output file " << filenames[i] << std::endl;
 
-      std::ifstream in(filenames[i].c_str());
+      std::ifstream in(filenames[i]);
       AssertThrow(in, ExcIO());
 
       std::string s;
@@ -430,7 +430,7 @@ TestPointValueHistory<dim>::output_results(unsigned int   step,
   std::ostringstream filename;
   filename << "solution-" << Utilities::int_to_string(step, 2) << ".gpl";
 
-  std::ofstream output(filename.str().c_str());
+  std::ofstream output(filename.str());
   data_out.write_gnuplot(output);
 }
 
index 69283f11de1473bfafd5790137e2a3a1fa53cc49..599996774dcdb777a77110602f571e2889f33706 100644 (file)
@@ -348,7 +348,7 @@ TestPointValueHistory<dim>::run()
     {
       deallog << "Copying output file " << filenames[i] << std::endl;
 
-      std::ifstream in(filenames[i].c_str());
+      std::ifstream in(filenames[i]);
       AssertThrow(in, ExcIO());
 
       std::string s;
@@ -378,7 +378,7 @@ TestPointValueHistory<dim>::output_results(unsigned int   step,
   std::ostringstream filename;
   filename << "solution-" << Utilities::int_to_string(step, 2) << ".gpl";
 
-  std::ofstream output(filename.str().c_str());
+  std::ofstream output(filename.str());
   data_out.write_gnuplot(output);
 }
 
index 92a6758703a929758c9150c8e5550b22864b66be..fcbc1d6efc82f6518941b2f7da0e877a96c291b6 100644 (file)
@@ -2235,7 +2235,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index f9d1c392dd9c7f36154896febad4817173509dc9..f0145191b23165c6f17fd9f04d34b85bd4eadf07 100644 (file)
@@ -71,7 +71,7 @@ main()
     SOURCE_DIR "/parameter_acceptor_parameters/parameter_acceptor_05.prm",
     output_name);
   ParameterAcceptor::prm.log_parameters(deallog);
-  std::ifstream file(output_name.c_str());
+  std::ifstream file(output_name);
 
   std::string str;
   deallog << "reading " << output_name << std::endl;
index 1c46852ca06d03e6501a13b1fa07aabb605637dd..78a6b190bae195fe2e936bd0539cc4631199dc54 100644 (file)
@@ -71,7 +71,7 @@ main()
     SOURCE_DIR "/parameter_acceptor_parameters/parameter_acceptor_05.prm",
     output_name);
   ParameterAcceptor::prm.log_parameters(deallog);
-  std::ifstream file(output_name.c_str());
+  std::ifstream file(output_name);
 
   std::string str;
   deallog << "reading " << output_name << std::endl;
index a55fbca89431a80a8bfae0dc081196cd4a03f78b..8e8b26c2b7afb7a1b90def28c2ab3a16dcbf6021 100644 (file)
@@ -548,7 +548,7 @@ namespace Step18
       "solution-" + Utilities::int_to_string(timestep_no, 4) + "." +
       Utilities::int_to_string(this_mpi_process, 3) + ".vtu";
     AssertThrow(n_mpi_processes < 1000, ExcNotImplemented());
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtu(output);
     if (this_mpi_process == 0)
       {
@@ -559,12 +559,12 @@ namespace Step18
                               Utilities::int_to_string(i, 3) + ".vtu");
         const std::string visit_filename =
           ("solution-" + Utilities::int_to_string(timestep_no, 4) + ".visit");
-        std::ofstream visit_output(visit_filename.c_str());
+        std::ofstream visit_output(visit_filename);
         DataOutBase::write_visit_record(visit_output, filenames);
 
         const std::string pvtu_filename =
           ("solution-" + Utilities::int_to_string(timestep_no, 4) + ".pvtu");
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
         static std::vector<std::pair<double, std::string>> times_and_names;
         times_and_names.push_back(
index 55f21962ea63c33659ba58c2c7ca8a339fe755a8..1c32432cf1df557dcf1d2fa213e11896d38e8401 100644 (file)
@@ -564,7 +564,7 @@ namespace Step18
       "solution-" + Utilities::int_to_string(timestep_no, 4) + "." +
       Utilities::int_to_string(this_mpi_process, 3) + ".vtu";
     AssertThrow(n_mpi_processes < 1000, ExcNotImplemented());
-    std::ofstream output(filename.c_str());
+    std::ofstream output(filename);
     data_out.write_vtu(output);
     if (this_mpi_process == 0)
       {
@@ -575,12 +575,12 @@ namespace Step18
                               Utilities::int_to_string(i, 3) + ".vtu");
         const std::string visit_filename =
           ("solution-" + Utilities::int_to_string(timestep_no, 4) + ".visit");
-        std::ofstream visit_output(visit_filename.c_str());
+        std::ofstream visit_output(visit_filename);
         DataOutBase::write_visit_record(visit_output, filenames);
 
         const std::string pvtu_filename =
           ("solution-" + Utilities::int_to_string(timestep_no, 4) + ".pvtu");
-        std::ofstream pvtu_output(pvtu_filename.c_str());
+        std::ofstream pvtu_output(pvtu_filename);
         data_out.write_pvtu_record(pvtu_output, filenames);
         static std::vector<std::pair<double, std::string>> times_and_names;
         times_and_names.push_back(
index 8554ff36c5a25b58394f035924a96402dd6c20b8..73313d9a6abfef025d906dfe8d3ddfdad610a368 100644 (file)
@@ -2083,7 +2083,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index 0b89710bd2c5576723d580fdf9ce78818a57a514..9fe9a7875ae5635f1be66f4a22527e30c5c97189 100644 (file)
@@ -2269,7 +2269,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index 3f81437fee53285c169e2543c5b53e9c31aca9c4..477ab91d99c5420951f652fa03ad008971792fe2 100644 (file)
@@ -2069,7 +2069,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index e99dce27dc4415769e100edc9bdf5fbead8a9fe0..6678628f7ab5de670044aa3609e9103a12383a01 100644 (file)
@@ -2084,7 +2084,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index cd2dc6e2885710d908059cfa6953fb59bb535284..b8b87f6959ee1aede6d2755ccb2a131f33858945 100644 (file)
@@ -96,7 +96,7 @@ int
 main()
 {
   const std::string logname = "output";
-  std::ofstream     logfile(logname.c_str());
+  std::ofstream     logfile(logname);
   logfile.precision(3);
   deallog.attach(logfile);
 
index d469018607a9f64280d6af674e0b3033dc8d9b1f..a5b36dcdd8b0e875130ed1864ee25cac65b595b0 100644 (file)
@@ -48,7 +48,7 @@ write_mesh(const parallel::shared::Triangulation<dim, spacedim> &tria,
   const std::string filename =
     (filename_ + Utilities::int_to_string(tria.locally_owned_subdomain(), 4));
   {
-    std::ofstream output((filename + ".vtu").c_str());
+    std::ofstream output(filename + ".vtu");
     data_out.write_vtu(output);
   }
 }
index f13e687b126026e3dcb1febbd1fa6d4782e516d0..878a067d1b2920d95914df63fcd063cb7f4897a8 100644 (file)
@@ -51,7 +51,7 @@ write_mesh(const parallel::shared::Triangulation<dim, spacedim> &tria,
   const std::string filename =
     (filename_ + Utilities::int_to_string(tria.locally_owned_subdomain(), 4));
   {
-    std::ofstream output((filename + ".vtu").c_str());
+    std::ofstream output(filename + ".vtu");
     data_out.write_vtu(output);
   }
 }
index f513ea6d7c18cf36e67d1c7114998c064191a5a9..1ad023ebd2a4a761d52cdf4bcb406afbebcee40d 100644 (file)
@@ -106,10 +106,10 @@ test(const FiniteElement<dim, spacedim> &fe, const unsigned int n_components)
   // Sadly hdf5 is binary and we can not use hd5dump because it might
   // not be in the path. At least we can make sure that both the xdmf and
   // the h5 file are created.
-  std::ifstream h5((output_basename + ".h5").c_str());
+  std::ifstream h5(output_basename + ".h5");
   AssertThrow(h5.good(), ExcIO());
 
-  std::ifstream xdmf((output_basename + ".xdmf").c_str());
+  std::ifstream xdmf(output_basename + ".xdmf");
   AssertThrow(h5.good(), ExcIO());
 
   deallog << "Files " << output_basename + ".h5"
index 8bcc16475fa132fbaa1c0ea91946398032b72989..c16bc4edb0fba51217598b2f4494f5965842a650 100644 (file)
@@ -129,10 +129,10 @@ test(const FiniteElement<dim, spacedim> &fe, const unsigned int n_components)
   // files are created.
   if (Utilities::MPI::this_mpi_process(comm) == 0)
     {
-      std::ifstream h5((output_basename + ".h5").c_str());
+      std::ifstream h5(output_basename + ".h5");
       AssertThrow(h5.good(), ExcIO());
 
-      std::ifstream xdmf((output_basename + ".xdmf").c_str());
+      std::ifstream xdmf(output_basename + ".xdmf");
       AssertThrow(h5.good(), ExcIO());
 
       deallog << "Files " << output_basename + ".h5"
index f8f3b778325aac901b80c13232199aa921e7999d..c97e0e090f1da914f38998ae9da9d29740e6c3ac 100644 (file)
@@ -522,7 +522,7 @@ DGHeat<dim>::output_results(unsigned int it) const
 
   deallog << "  Writing solution to <" << fname << '>' << std::endl;
 
-  std::ofstream output(fname.c_str());
+  std::ofstream output(fname);
 
   if (false)
     {
index df86d60d61c0a281967a7772dde3fbba37eef33b..d53d5c1af9b171ca87afc965e3e0801032a62b82 100644 (file)
@@ -2034,7 +2034,7 @@ namespace Step44
     data_out.build_patches(q_mapping, degree);
     std::ostringstream filename;
     filename << "solution-" << dim << "d-" << time.get_timestep() << ".vtk";
-    std::ofstream output(filename.str().c_str());
+    std::ofstream output(filename.str());
     data_out.write_vtk(output);
   }
 } // namespace Step44
index d406393f8b329d508b1f28e438ed62ceeee7b956..1ed7def214d1887db9ea14bfe1ada4396fc489a1 100644 (file)
@@ -467,7 +467,7 @@ Test_Solver_Output::output(unsigned int cycle)
   const std::string filename =
     ("solution-" + Utilities::int_to_string(cycle, 2) + "." +
      Utilities::int_to_string(triangulation.locally_owned_subdomain(), 4));
-  std::ofstream output((filename + ".vtu").c_str());
+  std::ofstream output(filename + ".vtu");
   data_out.write_vtu(output);
 
   if (Utilities::MPI::this_mpi_process(mpi_comm) == 0)

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.