Browse files

Removing OStringStream from various classes.

DofMap
AdjointResidualErrorEstimator
Utility
UniformRefinementEstimator
EnsightIO
UnstructuredMesh
DerivedRBEvaluation
RBEIMConstruction
RBEIMEvaluation
RBEvaluation
RBSCMEvaluation
TransientRBConstruction
TransientRBEvaluation
System
Xdr

Issue #22.
  • Loading branch information...
1 parent 8a0bddc commit 756f29c305c1cf2e4d59b4cc2de691c3ebb72a2d @jwpeterson jwpeterson committed Dec 20, 2012
View
3 src/base/dof_map.C
@@ -35,7 +35,6 @@
#include "libmesh/mesh_base.h"
#include "libmesh/mesh_tools.h"
#include "libmesh/numeric_vector.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/parallel.h"
#include "libmesh/periodic_boundaries.h"
#include "libmesh/sparse_matrix.h"
@@ -2760,7 +2759,7 @@ void DofMap::print_info(std::ostream& os) const
std::string DofMap::get_info() const
{
- OStringStream os;
+ std::ostringstream os;
// If we didn't calculate the exact sparsity pattern, the threaded
// sparsity pattern assembly may have just given us an upper bound
View
3 src/base/dof_map_constraints.C
@@ -36,7 +36,6 @@
#include "libmesh/mesh_base.h"
#include "libmesh/mesh_inserter_iterator.h"
#include "libmesh/numeric_vector.h" // for enforce_constraints_exactly()
-#include "libmesh/o_string_stream.h"
#include "libmesh/parallel.h"
#include "libmesh/parallel_algebra.h"
#include "libmesh/periodic_boundaries.h"
@@ -1025,7 +1024,7 @@ void DofMap::print_dof_constraints(std::ostream& os,
std::string DofMap::get_local_constraints(bool print_nonlocal) const
{
- OStringStream os;
+ std::ostringstream os;
#ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
if (print_nonlocal)
os << "All ";
View
24 src/error_estimation/adjoint_residual_error_estimator.C
@@ -18,11 +18,11 @@
// C++ includes
#include <iostream>
+#include <iomanip>
// Local Includes
#include "libmesh/adjoint_residual_error_estimator.h"
#include "libmesh/error_vector.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/patch_recovery_error_estimator.h"
#include "libmesh/libmesh_logging.h"
#include "libmesh/numeric_vector.h"
@@ -197,13 +197,23 @@ void AdjointResidualErrorEstimator::estimate_error (const System& _system,
// Loop over variables
for(unsigned int v = 0; v < n_vars; v++)
{
- OStringStream primal_out;
- OStringStream dual_out;
+ std::ostringstream primal_out;
+ std::ostringstream dual_out;
primal_out << "primal_" << error_plot_suffix << ".";
dual_out << "dual_" << error_plot_suffix << ".";
- OSSRealzeroright(primal_out, 1,0,v);
- OSSRealzeroright(dual_out, 1,0,v);
+ primal_out << std::setw(1)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << v;
+
+ dual_out << std::setw(1)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << v;
+
(*primal_errors_per_cell[std::make_pair(&_system, v)]).plot_error(primal_out.str(), _system.get_mesh());
(*total_dual_errors_per_cell[std::make_pair(&_system, v)]).plot_error(dual_out.str(), _system.get_mesh());
@@ -213,8 +223,8 @@ void AdjointResidualErrorEstimator::estimate_error (const System& _system,
}
else // If not
{
- OStringStream primal_out;
- OStringStream dual_out;
+ std::ostringstream primal_out;
+ std::ostringstream dual_out;
primal_out << "primal_" << error_plot_suffix ;
dual_out << "dual_" << error_plot_suffix ;
View
9 src/error_estimation/uniform_refinement_estimator.C
@@ -32,7 +32,6 @@
#include "libmesh/mesh_base.h"
#include "libmesh/mesh_refinement.h"
#include "libmesh/numeric_vector.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/quadrature.h"
#include "libmesh/system.h"
#include "libmesh/uniform_refinement_estimator.h"
@@ -296,7 +295,7 @@ void UniformRefinementEstimator::_estimate_error (const EquationSystems* _es,
const NumericVector<Number> *vec = solution_vectors->find(sys)->second;
for (unsigned int j=0; j != sys->qoi.size(); ++j)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << j;
if (vec == sys->request_vector(adjoint_name.str()))
@@ -341,7 +340,7 @@ void UniformRefinementEstimator::_estimate_error (const EquationSystems* _es,
bool found_vec = false;
for (unsigned int j=0; j != sys->qoi.size(); ++j)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << j;
if (vec == sys->request_vector(adjoint_name.str()))
@@ -370,7 +369,7 @@ void UniformRefinementEstimator::_estimate_error (const EquationSystems* _es,
const NumericVector<Number> *vec = solution_vectors->find(sys)->second;
for (unsigned int j=0; j != sys->qoi.size(); ++j)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << j;
if (vec == sys->request_vector(adjoint_name.str()))
@@ -426,7 +425,7 @@ void UniformRefinementEstimator::_estimate_error (const EquationSystems* _es,
unsigned int adj = libMesh::invalid_uint;
for (unsigned int j=0; j != sys->qoi.size(); ++j)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << j;
if (vec == sys->request_vector(adjoint_name.str()))
View
28 src/mesh/ensight_io.C
@@ -22,13 +22,13 @@
#include <string>
#include <cstring>
#include <stdio.h>
+#include <iomanip>
#include "libmesh/dof_map.h"
#include "libmesh/ensight_io.h"
#include "libmesh/equation_systems.h"
#include "libmesh/fe_interface.h"
#include "libmesh/libmesh.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/system.h"
@@ -142,10 +142,14 @@ void EnsightIO::write_ascii (const double time)
void EnsightIO::write_geometry_ascii()
{
- OStringStream file;
+ std::ostringstream file;
file << _ensight_file_name << ".geo";
- OSSRealzeroright(file,3,0,_time_steps.size()-1);
+ file << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << _time_steps.size()-1;
FILE* fout = fopen(file.str().c_str(),"w");
@@ -350,9 +354,14 @@ void EnsightIO::write_solution_ascii()
void EnsightIO::write_scalar_ascii(const std::string &sys, const std::string &var_name)
{
- OStringStream scl_file;
+ std::ostringstream scl_file;
scl_file << _ensight_file_name << "_" << var_name << ".scl";
- OSSRealzeroright(scl_file,3,0,_time_steps.size()-1);
+
+ scl_file << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << _time_steps.size()-1;
FILE * fout = fopen(scl_file.str().c_str(),"w");
@@ -429,9 +438,14 @@ void EnsightIO::write_scalar_ascii(const std::string &sys, const std::string &va
void EnsightIO::write_vector_ascii(const std::string &sys, const std::vector<std::string> &vec, const std::string &var_name)
{
- OStringStream vec_file;
+ std::ostringstream vec_file;
vec_file<<_ensight_file_name<<"_"<<var_name<<".vec";
- OSSRealzeroright(vec_file,3,0,_time_steps.size()-1);
+
+ vec_file << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << _time_steps.size()-1;
FILE * fout = fopen(vec_file.str().c_str(),"w");
fprintf(fout,"Per vector per value\n");
View
7 src/mesh/unstructured_mesh.C
@@ -30,7 +30,6 @@
#include "libmesh/libmesh_logging.h"
#include "libmesh/elem.h"
#include "libmesh/mesh_tools.h" // For n_levels
-#include "libmesh/o_string_stream.h"
#include "libmesh/parallel.h"
#include "libmesh/remote_elem.h"
@@ -478,7 +477,7 @@ void UnstructuredMesh::read (const std::string& name,
if (name.rfind(".nem") + 4 == name.size() ||
name.rfind(".n") + 2 == name.size())
{
- OStringStream full_name;
+ std::ostringstream full_name;
full_name << name << '.' << libMesh::n_processors() << '.' << libMesh::processor_id();
std::ifstream in (full_name.str().c_str());
@@ -577,7 +576,7 @@ void UnstructuredMesh::read (const std::string& name,
// the other processors will pick it up
if (libMesh::processor_id() == 0)
{
- OStringStream pid_suffix;
+ std::ostringstream pid_suffix;
pid_suffix << '_' << getpid();
// Nasty hack for reading/writing zipped files
std::string new_name = name;
@@ -746,7 +745,7 @@ void UnstructuredMesh::write (const std::string& name,
if (libMesh::processor_id() == 0)
pid_0 = getpid();
CommWorld.broadcast(pid_0);
- OStringStream pid_suffix;
+ std::ostringstream pid_suffix;
pid_suffix << '_' << pid_0;
if (name.size() - name.rfind(".bz2") == 4)
View
5 src/reduced_basis/derived_rb_evaluation.C
@@ -19,7 +19,6 @@
#include "libmesh/derived_rb_evaluation.h"
#include "libmesh/system.h"
-#include "libmesh/o_string_stream.h"
#include <sys/stat.h>
@@ -90,7 +89,7 @@ void DerivedRBEvaluation<Base>::write_out_basis_functions(System& ,
{
std::ofstream derived_bf_size_out;
{
- OStringStream file_name;
+ std::ostringstream file_name;
file_name << directory_name << "/derived_bf_size.dat";
derived_bf_size_out.open(file_name.str().c_str());
}
@@ -115,7 +114,7 @@ void DerivedRBEvaluation<Base>::read_in_basis_functions(System& ,
// First, get the number of size of the derived basis functions
unsigned int derived_bf_size;
{
- OStringStream file_name;
+ std::ostringstream file_name;
file_name << directory_name << "/derived_bf_size.dat";
std::ifstream derived_bf_size_in(file_name.str().c_str());
View
1 src/reduced_basis/rb_eim_construction.C
@@ -35,7 +35,6 @@
#include "libmesh/getpot.h"
#include <fstream>
#include <sstream>
-#include "libmesh/o_string_stream.h"
#include "libmesh/exodusII_io.h"
#include "libmesh/fem_context.h"
View
5 src/reduced_basis/rb_eim_evaluation.C
@@ -23,7 +23,6 @@
#include "libmesh/rb_parametrized_function.h"
// libMesh includes
-#include "libmesh/o_string_stream.h"
#include "libmesh/xdr_cxx.h"
#include "libmesh/libmesh_logging.h"
@@ -245,7 +244,7 @@ void RBEIMEvaluation::write_offline_data_to_files(const std::string& directory_n
if(libMesh::processor_id() == 0)
{
- OStringStream file_name;
+ std::ostringstream file_name;
// Next write out the interpolation_matrix
file_name.str("");
@@ -345,7 +344,7 @@ void RBEIMEvaluation::read_offline_data_from_files(const std::string& directory_
const std::string suffix = read_binary_data ? ".xdr" : ".dat";
// Stream for creating file names
- OStringStream file_name;
+ std::ostringstream file_name;
// Read in the interpolation matrix
file_name.str("");
View
66 src/reduced_basis/rb_evaluation.C
@@ -28,7 +28,6 @@
#include "libmesh/libmesh_logging.h"
#include "libmesh/xdr_cxx.h"
#include "libmesh/mesh_tools.h"
-#include "libmesh/o_string_stream.h"
// C/C++ includes
#include <sys/types.h>
@@ -467,7 +466,7 @@ void RBEvaluation::write_offline_data_to_files(const std::string& directory_name
// }
// First, write out how many basis functions we have generated
- OStringStream file_name;
+ std::ostringstream file_name;
{
file_name << directory_name << "/n_bfs" << suffix;
Xdr n_bfs_out(file_name.str(), mode);
@@ -496,7 +495,12 @@ void RBEvaluation::write_offline_data_to_files(const std::string& directory_name
{
file_name.str("");
file_name << directory_name << "/output_";
- OSSRealzeroright(file_name,3,0,n);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << n;
+
file_name << "_dual_innerprods" << suffix;
Xdr output_dual_innerprods_out(file_name.str(), mode);
@@ -516,9 +520,17 @@ void RBEvaluation::write_offline_data_to_files(const std::string& directory_name
{
file_name.str("");
file_name << directory_name << "/output_";
- OSSRealzeroright(file_name,3,0,n);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << n;
file_name << "_";
- OSSRealzeroright(file_name,3,0,q_l);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_l;
file_name << suffix;
Xdr output_n_out(file_name.str(), mode);
@@ -551,7 +563,11 @@ void RBEvaluation::write_offline_data_to_files(const std::string& directory_name
{
file_name.str("");
file_name << directory_name << "/RB_F_";
- OSSRealzeroright(file_name,3,0,q_f);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_f;
file_name << suffix;
Xdr RB_Fq_f_out(file_name.str(), mode);
@@ -567,7 +583,11 @@ void RBEvaluation::write_offline_data_to_files(const std::string& directory_name
{
file_name.str("");
file_name << directory_name << "/RB_A_";
- OSSRealzeroright(file_name,3,0,q_a);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_a;
file_name << suffix;
Xdr RB_Aq_a_out(file_name.str(), mode);
@@ -655,7 +675,7 @@ void RBEvaluation::read_offline_data_from_files(const std::string& directory_nam
const std::string suffix = read_binary_data ? ".xdr" : ".dat";
// The string stream we'll use to make the file names
- OStringStream file_name;
+ std::ostringstream file_name;
// First, find out how many basis functions we had when Greedy terminated
unsigned int n_bfs;
@@ -681,9 +701,17 @@ void RBEvaluation::read_offline_data_from_files(const std::string& directory_nam
{
file_name.str("");
file_name << directory_name << "/output_";
- OSSRealzeroright(file_name,3,0,n);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << n;
file_name << "_";
- OSSRealzeroright(file_name,3,0,q_l);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_l;
file_name << suffix;
Xdr output_n_in(file_name.str(), mode);
@@ -721,7 +749,11 @@ void RBEvaluation::read_offline_data_from_files(const std::string& directory_nam
{
file_name.str("");
file_name << directory_name << "/RB_F_";
- OSSRealzeroright(file_name,3,0,q_f);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_f;
file_name << suffix;
Xdr RB_Fq_f_in(file_name.str(), mode);
@@ -739,7 +771,11 @@ void RBEvaluation::read_offline_data_from_files(const std::string& directory_nam
{
file_name.str("");
file_name << directory_name << "/RB_A_";
- OSSRealzeroright(file_name,3,0,q_a);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_a;
file_name << suffix;
Xdr RB_Aq_a_in(file_name.str(), mode);
@@ -775,7 +811,11 @@ void RBEvaluation::read_offline_data_from_files(const std::string& directory_nam
{
file_name.str("");
file_name << directory_name << "/output_";
- OSSRealzeroright(file_name,3,0,n);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << n;
file_name << "_dual_innerprods" << suffix;
Xdr output_dual_innerprods_in(file_name.str(), mode);
View
5 src/reduced_basis/rb_scm_evaluation.C
@@ -30,7 +30,6 @@
// libMesh includes
#include "libmesh/libmesh_logging.h"
#include "libmesh/numeric_vector.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/sparse_matrix.h"
#include "libmesh/equation_systems.h"
#include "libmesh/getpot.h"
@@ -392,7 +391,7 @@ void RBSCMEvaluation::write_offline_data_to_files(const std::string& directory_n
const std::string suffix = write_binary_data ? ".xdr" : ".dat";
// Stream for building the file names
- OStringStream file_name;
+ std::ostringstream file_name;
// Write out the parameter ranges
file_name.str("");
@@ -496,7 +495,7 @@ void RBSCMEvaluation::read_offline_data_from_files(const std::string& directory_
const std::string suffix = read_binary_data ? ".xdr" : ".dat";
// The string stream we'll use to make the file names
- OStringStream file_name;
+ std::ostringstream file_name;
// Read in the parameter ranges
file_name.str("");
View
9 src/reduced_basis/transient_rb_construction.C
@@ -29,7 +29,6 @@
#include "libmesh/dof_map.h"
#include "libmesh/libmesh_logging.h"
#include "libmesh/linear_solver.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/equation_systems.h"
#include "libmesh/exodusII_io.h"
#include "libmesh/getpot.h"
@@ -843,10 +842,14 @@ Real TransientRBConstruction::truth_solve(int write_interval)
{
libMesh::out << std::endl << "Truth solve, plotting time step " << time_level << std::endl;
- OStringStream file_name;
+ std::ostringstream file_name;
file_name << "truth.e.";
- OSSRealzeroright(file_name,3,0, time_level);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << time_level;
#ifdef LIBMESH_HAVE_EXODUS_API
ExodusII_IO(get_mesh()).write_equation_systems (file_name.str(),
View
19 src/reduced_basis/transient_rb_evaluation.C
@@ -27,11 +27,11 @@
#include "libmesh/xdr_cxx.h"
#include "libmesh/parallel.h"
#include "libmesh/getpot.h"
-#include "libmesh/o_string_stream.h"
// C++ includes
#include <fstream>
#include <sstream>
+#include <iomanip>
namespace libMesh
{
@@ -735,7 +735,7 @@ void TransientRBEvaluation::write_offline_data_to_files(const std::string& direc
if(libMesh::processor_id() == 0)
{
- OStringStream file_name;
+ std::ostringstream file_name;
// Write out the temporal discretization data
file_name.str("");
@@ -769,7 +769,11 @@ void TransientRBEvaluation::write_offline_data_to_files(const std::string& direc
{
file_name.str("");
file_name << directory_name << "/RB_M_";
- OSSRealzeroright(file_name,3,0,q_m);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_m;
file_name << suffix;
Xdr RB_M_q_m_out(file_name.str(), mode);
@@ -887,7 +891,7 @@ void TransientRBEvaluation::read_offline_data_from_files(const std::string& dire
const std::string suffix = read_binary_data ? ".xdr" : ".dat";
// The string stream we'll use to make the file names
- OStringStream file_name;
+ std::ostringstream file_name;
// Write out the temporal discretization data
file_name.str("");
@@ -921,7 +925,12 @@ void TransientRBEvaluation::read_offline_data_from_files(const std::string& dire
{
file_name.str("");
file_name << directory_name << "/RB_M_";
- OSSRealzeroright(file_name,3,0,q_m);
+ file_name << std::setw(3)
+ << std::setprecision(0)
+ << std::setfill('0')
+ << std::right
+ << q_m;
+
file_name << suffix;
Xdr RB_M_q_m_in(file_name.str(), mode);
View
31 src/systems/system.C
@@ -27,7 +27,6 @@
#include "libmesh/libmesh_logging.h"
#include "libmesh/mesh_base.h"
#include "libmesh/numeric_vector.h"
-#include "libmesh/o_string_stream.h"
#include "libmesh/parameter_vector.h"
#include "libmesh/point.h" // For point_value
#include "libmesh/point_locator_base.h" // For point_value
@@ -900,7 +899,7 @@ bool System::vector_preservation (const std::string &vec_name) const
NumericVector<Number> & System::add_sensitivity_solution (unsigned int i)
{
- OStringStream sensitivity_name;
+ std::ostringstream sensitivity_name;
sensitivity_name << "sensitivity_solution" << i;
return this->add_vector(sensitivity_name.str());
@@ -910,7 +909,7 @@ NumericVector<Number> & System::add_sensitivity_solution (unsigned int i)
NumericVector<Number> & System::get_sensitivity_solution (unsigned int i)
{
- OStringStream sensitivity_name;
+ std::ostringstream sensitivity_name;
sensitivity_name << "sensitivity_solution" << i;
return this->get_vector(sensitivity_name.str());
@@ -920,7 +919,7 @@ NumericVector<Number> & System::get_sensitivity_solution (unsigned int i)
const NumericVector<Number> & System::get_sensitivity_solution (unsigned int i) const
{
- OStringStream sensitivity_name;
+ std::ostringstream sensitivity_name;
sensitivity_name << "sensitivity_solution" << i;
return this->get_vector(sensitivity_name.str());
@@ -951,7 +950,7 @@ const NumericVector<Number> & System::get_weighted_sensitivity_solution () const
NumericVector<Number> & System::add_adjoint_solution (unsigned int i)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << i;
return this->add_vector(adjoint_name.str());
@@ -961,7 +960,7 @@ NumericVector<Number> & System::add_adjoint_solution (unsigned int i)
NumericVector<Number> & System::get_adjoint_solution (unsigned int i)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << i;
return this->get_vector(adjoint_name.str());
@@ -971,7 +970,7 @@ NumericVector<Number> & System::get_adjoint_solution (unsigned int i)
const NumericVector<Number> & System::get_adjoint_solution (unsigned int i) const
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "adjoint_solution" << i;
return this->get_vector(adjoint_name.str());
@@ -981,7 +980,7 @@ const NumericVector<Number> & System::get_adjoint_solution (unsigned int i) cons
NumericVector<Number> & System::add_weighted_sensitivity_adjoint_solution (unsigned int i)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "weighted_sensitivity_adjoint_solution" << i;
return this->add_vector(adjoint_name.str());
@@ -991,7 +990,7 @@ NumericVector<Number> & System::add_weighted_sensitivity_adjoint_solution (unsig
NumericVector<Number> & System::get_weighted_sensitivity_adjoint_solution (unsigned int i)
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "weighted_sensitivity_adjoint_solution" << i;
return this->get_vector(adjoint_name.str());
@@ -1001,7 +1000,7 @@ NumericVector<Number> & System::get_weighted_sensitivity_adjoint_solution (unsig
const NumericVector<Number> & System::get_weighted_sensitivity_adjoint_solution (unsigned int i) const
{
- OStringStream adjoint_name;
+ std::ostringstream adjoint_name;
adjoint_name << "weighted_sensitivity_adjoint_solution" << i;
return this->get_vector(adjoint_name.str());
@@ -1011,7 +1010,7 @@ const NumericVector<Number> & System::get_weighted_sensitivity_adjoint_solution
NumericVector<Number> & System::add_adjoint_rhs (unsigned int i)
{
- OStringStream adjoint_rhs_name;
+ std::ostringstream adjoint_rhs_name;
adjoint_rhs_name << "adjoint_rhs" << i;
return this->add_vector(adjoint_rhs_name.str(), false);
@@ -1021,7 +1020,7 @@ NumericVector<Number> & System::add_adjoint_rhs (unsigned int i)
NumericVector<Number> & System::get_adjoint_rhs (unsigned int i)
{
- OStringStream adjoint_rhs_name;
+ std::ostringstream adjoint_rhs_name;
adjoint_rhs_name << "adjoint_rhs" << i;
return this->get_vector(adjoint_rhs_name.str());
@@ -1031,7 +1030,7 @@ NumericVector<Number> & System::get_adjoint_rhs (unsigned int i)
const NumericVector<Number> & System::get_adjoint_rhs (unsigned int i) const
{
- OStringStream adjoint_rhs_name;
+ std::ostringstream adjoint_rhs_name;
adjoint_rhs_name << "adjoint_rhs" << i;
return this->get_vector(adjoint_rhs_name.str());
@@ -1041,7 +1040,7 @@ const NumericVector<Number> & System::get_adjoint_rhs (unsigned int i) const
NumericVector<Number> & System::add_sensitivity_rhs (unsigned int i)
{
- OStringStream sensitivity_rhs_name;
+ std::ostringstream sensitivity_rhs_name;
sensitivity_rhs_name << "sensitivity_rhs" << i;
return this->add_vector(sensitivity_rhs_name.str(), false);
@@ -1051,7 +1050,7 @@ NumericVector<Number> & System::add_sensitivity_rhs (unsigned int i)
NumericVector<Number> & System::get_sensitivity_rhs (unsigned int i)
{
- OStringStream sensitivity_rhs_name;
+ std::ostringstream sensitivity_rhs_name;
sensitivity_rhs_name << "sensitivity_rhs" << i;
return this->get_vector(sensitivity_rhs_name.str());
@@ -1061,7 +1060,7 @@ NumericVector<Number> & System::get_sensitivity_rhs (unsigned int i)
const NumericVector<Number> & System::get_sensitivity_rhs (unsigned int i) const
{
- OStringStream sensitivity_rhs_name;
+ std::ostringstream sensitivity_rhs_name;
sensitivity_rhs_name << "sensitivity_rhs" << i;
return this->get_vector(sensitivity_rhs_name.str());
View
3 src/utils/utility.C
@@ -26,7 +26,6 @@
#include <sys/utsname.h>
// Local includes
-#include "libmesh/o_string_stream.h"
#include "libmesh/utility.h"
#include "libmesh/timestamp.h"
@@ -44,7 +43,7 @@ namespace libMesh
// system without creating a perf_log object.
std::string Utility::system_info()
{
- OStringStream out;
+ std::ostringstream out;
std::string date = Utility::get_timestamp();
View
5 src/utils/xdr_cxx.C
@@ -24,7 +24,6 @@
#include "libmesh/xdr_cxx.h"
#include "libmesh/libmesh_logging.h"
#include "libmesh/o_f_stream.h"
-#include "libmesh/o_string_stream.h"
#ifdef LIBMESH_HAVE_GZSTREAM
# include "gzstream.h"
#endif
@@ -63,7 +62,7 @@ namespace {
// be running multiple zip utilities on parallel files.
// libmesh_assert_equal_to (libMesh::processor_id(), 0);
- OStringStream pid_suffix;
+ std::ostringstream pid_suffix;
pid_suffix << '_' << getpid();
std::string new_name = name;
@@ -131,7 +130,7 @@ namespace {
// remove an unzipped file
void remove_unzipped_file (const std::string &name)
{
- OStringStream pid_suffix;
+ std::ostringstream pid_suffix;
pid_suffix << '_' << getpid();
// If we temporarily decompressed a file, remove the

0 comments on commit 756f29c

Please sign in to comment.