<commit_before>// The libMesh Finite Element Library.
// Copyright (C) 2002-2012 <NAME>, <NAME>, <NAME>

// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#ifndef LIBMESH_OFSTREAM_H
#define LIBMESH_OFSTREAM_H

// Local Includes
#include "libmesh/libmesh_common.h"

// C++ includes
#include <fstream>
#include <string>
#include <vector>

/*
 * Some compilers, at least HP \p aCC do not even
 * accept empty classes derived from \p std::ostringstream.
 * Therefore, resort to preprocessor definitions.
 */

#ifndef LIBMESH_BROKEN_IOSTREAM
 /*
  * ---------------------------------------------------------------------------------
  * Everything for a clean iostream
  */

# include <iomanip>

 /*
  * Outputs \p Real \p d  with width
  * \p v in scientific format to stream \p o.
  */
# define OFSRealscientific(o,v,d)       (o) << std::setprecision(v) << std::scientific << (d)

 /*
  * Outputs \p Number \p d, (note that \p Number
  * may be either real or complex) with width
  * \p v in scientific format to stream \p o.
  */
# if defined(LIBMESH_USE_COMPLEX_NUMBERS)
#  define OFSNumberscientific(o,v,d)    (o) << std::setprecision(v) << std::scientific << (d).real() << " " \
                                            << std::setprecision(v) << std::scientific << (d).imag()
# else
#  define OFSNumberscientific(o,v,d)    (o) << std::setprecision(v) << std::scientific << (d)
# endif

 /*
  * class alias
  */
# define OFStream                    std::ofstream


#else
 /*
  * ---------------------------------------------------------------------------------
  * Everything for broken iostream
  */

# include <cstdio>

 /*
  * Outputs \p Real \p d with width
  * \p v in scientific format to stream \p o.
  */
# define OFSRealscientific(o,v,d)       (o).scientific( (v), (d) )

 /*
  * Outputs \p Number \p d, (note that \p Number
  * may be either real or complex) with width
  * \p v in scientific format to stream \p o.
  */
# define OFSNumberscientific(o,v,d)     (o).scientific( (v), (d) )

//  /*
//   * class alias
//   */
// # define OFSOFStream                    OFStream


namespace libMesh
{


 /**
  * This class provides a compatibility class for broken
  * features in the \p std::ofstream of the older \p GCC
  * versions.  Other compilers do not see this class.
  */

 // ------------------------------------------------------------
 // OFStream class definition
 class OFStream : public std::ofstream
 {
 public:

  /**
   * Default constructor.
   */
  OFStream () {}

  /**
   * Default destructor.
   */
  ~OFStream () {}

  /**
   * convenient typedef
   */
  typedef std::string::size_type sizetype;
<commit_msg>Deprecating OFStream.<commit_after>// The libMesh Finite Element Library.
// Copyright (C) 2002-2012 <NAME>, <NAME>, <NAME>

// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#ifndef LIBMESH_OFSTREAM_H
#define LIBMESH_OFSTREAM_H

// Local Includes
#include "libmesh/libmesh_common.h"

// C++ includes
#include <fstream>
#include <string>
#include <vector>

/*
 * Some compilers, at least HP \p aCC do not even
 * accept empty classes derived from \p std::ostringstream.
 * Therefore, resort to preprocessor definitions.
 */

#ifndef LIBMESH_BROKEN_IOSTREAM
 /*
  * ---------------------------------------------------------------------------------
  * Everything for a clean iostream
  */

# include <iomanip>

 /*
  * Outputs \p Real \p d  with width
  * \p v in scientific format to stream \p o.
  */
# define OFSRealscientific(o,v,d)       (o) << std::setprecision(v) << std::scientific << (d)

 /*
  * Outputs \p Number \p d, (note that \p Number
  * may be either real or complex) with width
  * \p v in scientific format to stream \p o.
  */
# if defined(LIBMESH_USE_COMPLEX_NUMBERS)
#  define OFSNumberscientific(o,v,d)    (o) << std::setprecision(v) << std::scientific << (d).real() << " " \
                                            << std::setprecision(v) << std::scientific << (d).imag()
# else
#  define OFSNumberscientific(o,v,d)    (o) << std::setprecision(v) << std::scientific << (d)
# endif

 /*
  * class alias
  */
# define OFStream                    std::ofstream


#else
 /*
  * ---------------------------------------------------------------------------------
  * Everything for broken iostream
  */

# include <cstdio>

 /*
  * Outputs \p Real \p d with width
  * \p v in scientific format to stream \p o.
  */
# define OFSRealscientific(o,v,d)       (o).scientific( (v), (d) )

 /*
  * Outputs \p Number \p d, (note that \p Number
  * may be either real or complex) with width
  * \p v in scientific format to stream \p o.
  */
# define OFSNumberscientific(o,v,d)     (o).scientific( (v), (d) )

//  /*
//   * class alias
//   */
// # define OFSOFStream                    OFStream


namespace libMesh
{


 /**
  * This class provides a compatibility class for broken
  * features in the \p std::ofstream of the older \p GCC
  * versions.  Other compilers do not see this class.
  */

 // ------------------------------------------------------------
 // OFStream class definition
 class OFStream : public std::ofstream
 {
 public:

  /**
   * Default constructor.
   */
  OFStream ()
   {
     // [JWP] TODO: I will remove this class at the next libmesh
     // release or on on March 21, 2013, whichever comes first.
     libmesh_deprecated();
   }

  /**
   * Default destructor.
   */
  ~OFStream () {}

  /**
   * convenient typedef
   */
  typedef std::string::size_type sizetype;

{'fraction_non_alphanumeric': 0.1773413454492159, 'fraction_numerical': 0.007914407152279056, 'mean_word_length': 2.1680594243268336, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2613659', 'n_tokens_mistral': 2108, 'n_tokens_neox': 1972, 'n_words': 739}