From: Wolfgang Bangerth Date: Mon, 24 Jan 2011 04:18:28 +0000 (+0000) Subject: Avoid trailing space in output files. X-Git-Tag: v8.0.0~4444 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf05e2e1507037591662849f557a2842bb4f7956;p=dealii.git Avoid trailing space in output files. git-svn-id: https://svn.dealii.org/trunk@23252 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/data_out_base.cc b/deal.II/source/base/data_out_base.cc index 993244255c..c9d54809df 100644 --- a/deal.II/source/base/data_out_base.cc +++ b/deal.II/source/base/data_out_base.cc @@ -4333,7 +4333,7 @@ DataOutBase::write_vtu (const std::vector > &patches, << time->tm_hour << ":" << std::setw(2) << time->tm_min << ":" << std::setw(2) << time->tm_sec - << "\n --> \n"; + << "\n-->\n"; // LittleEndian vs BigEndian should not // matter; we are writing an ascii // file. @@ -4385,39 +4385,39 @@ DataOutBase::write_vtu (const std::vector > &patches, // note that according to the standard, we // have to print d=1..3 dimensions, even if // we are in reality in 2d, for example - out << " \n"; - out << " \n"; - out << " \n"; + out << "\n"; + out << " \n"; + out << " \n"; write_nodes(patches, vtu_out); - out << " \n"; - out << " \n \n"; + out << " \n"; + out << " \n\n"; ///////////////////////////////// // now for the cells - out << " \n"; - out << " \n"; + out << " \n"; + out << " \n"; write_cells(patches, vtu_out); - out << " \n"; + out << " \n"; // XML VTU format uses offsets; this is // different than the VTK format, which // puts the number of nodes per cell in // front of the connectivity list. - out << " \n"; + out << " \n"; for(unsigned int i=0; i::vertices_per_cell); - out << " \n"; + out << " \n"; // next output the types of the // cells. since all cells are // the same, this is simple - out << " \n"; + out << " \n"; for (unsigned int i=0; i \n"; - out << " \n"; + out << " \n"; + out << " \n"; /////////////////////////////////////// @@ -4434,7 +4434,7 @@ DataOutBase::write_vtu (const std::vector > &patches, // we do not support explicitly // here). all following data sets // are point data - out << " \n"; + out << " \n"; // when writing, first write out // all vector data, then handle the @@ -4480,7 +4480,7 @@ DataOutBase::write_vtu (const std::vector > &patches, out << data_names[std_cxx1x::get<1>(vector_data_ranges[n_th_vector])]; } - out << "\" NumberOfComponents=\"3\" format=\"ascii\"> \n"; + out << "\" NumberOfComponents=\"3\" format=\"ascii\">\n"; // now write data. pad all // vectors to have three @@ -4518,7 +4518,7 @@ DataOutBase::write_vtu (const std::vector > &patches, } } - out << " \n"; + out << " \n"; } // now do the left over scalar data sets @@ -4527,21 +4527,21 @@ DataOutBase::write_vtu (const std::vector > &patches, { out << " \n"; + << "\" format=\"ascii\">\n"; std::copy (data_vectors[data_set].begin(), data_vectors[data_set].end(), std::ostream_iterator(out, "\n")); out << '\n'; - out << " \n"; + out << " \n"; } - out << " \n"; + out << " \n"; // Finish up writing a valid XML file - out << " \n"; - out << " \n"; - out << " \n"; + out << " \n"; + out << " \n"; + out << "\n"; // make sure everything now gets to // disk out.flush (); @@ -4790,11 +4790,11 @@ DataOutInterface::write_pvtu_record (std::ostream &out, const unsigned int n_data_sets = data_names.size(); - out << " \n"; + out << "\n"; std::time_t time1= std::time (0); std::tm *time = std::localtime(&time1); - out << " \n"; + << "\n-->\n"; - out << " \n"; - out << " \n"; - out << " \n"; - - // We need to output in the same order as the write_vtu function does: + out << "\n"; + out << " \n"; + out << " \n"; + // We need to output in the same order as + // the write_vtu function does: std::vector data_set_written (n_data_sets, false); for (unsigned int n_th_vector=0; n_th_vector::write_pvtu_record (std::ostream &out, out << data_names[std_cxx1x::get<1>(vector_data_ranges[n_th_vector])]; } - out << "\" NumberOfComponents=\"3\" format=\"ascii\"/> \n"; + out << "\" NumberOfComponents=\"3\" format=\"ascii\"/>\n"; } for (unsigned int data_set=0; data_set::write_pvtu_record (std::ostream &out, { out << " \n"; + << "\" format=\"ascii\"/>\n"; } - out << " \n"; + out << " \n"; - out << " \n"; - out << " \n"; - out << " \n"; + out << " \n"; + out << " \n"; + out << " \n"; for(unsigned int i=0; i \n"; + out << " \n"; - out << " \n"; - out << " \n"; + out << " \n"; + out << "\n"; out.flush();