<commit_before>// The libMesh Finite Element Library.
// Copyright (C) 2002-2019 <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_GMSH_IO_H
#define LIBMESH_GMSH_IO_H

// Local includes
#include "libmesh/libmesh_common.h"
#include "libmesh/mesh_input.h"
#include "libmesh/mesh_output.h"

// C++ includes
#include <cstddef>

namespace libMesh
{

// Forward declarations
class MeshBase;



/**
 * \brief Reading and writing meshes in the Gmsh format.
 *
 * For a full description of the Gmsh format and to obtain the
 * GMSH software see
 * <a href="http://http://www.geuz.org/gmsh/">the Gmsh home page</a>
 *
 * \author <NAME>
 * \date 2004, 2014
 * \author <NAME>
 * \date 2005
 */
class GmshIO : public MeshInput<MeshBase>,
               public MeshOutput<MeshBase>
{
public:

  /**
   * Constructor.  Takes a non-const Mesh reference which it
   * will fill up with elements via the read() command.
   */
  explicit
  GmshIO (MeshBase & mesh);

  /**
   * Constructor.  Takes a reference to a constant mesh object.
   * This constructor will only allow us to write the mesh.
   */
  explicit
  GmshIO (const MeshBase & mesh);

  /**
   * Reads in a mesh in the Gmsh *.msh format from the ASCII file
   * given by name.
   *
   * \note The user is responsible for calling Mesh::prepare_for_use()
   * after reading the mesh and before using it.
   *
   * The physical group names defined in the Gmesh-file are stored, depending
   * on the element dimension, as either subdomain name or as side name. The
   * IDs of the former can be retrieved by using the MeshBase::get_id_by_name
   * method; the IDs of the latter can be retriebed by using the
   * MeshBase::get_boundary_info and the BoundaryInfo::get_id_by_name methods.
   */
  virtual void read (const std::string & name) override;

  /**
   * This method implements writing a mesh to a specified file
   * in the Gmsh *.msh format.
   */
  virtual void write (const std::string & name) override;<commit_msg>Fix typos.<commit_after>// The libMesh Finite Element Library.
// Copyright (C) 2002-2019 <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_GMSH_IO_H
#define LIBMESH_GMSH_IO_H

// Local includes
#include "libmesh/libmesh_common.h"
#include "libmesh/mesh_input.h"
#include "libmesh/mesh_output.h"

// C++ includes
#include <cstddef>

namespace libMesh
{

// Forward declarations
class MeshBase;



/**
 * \brief Reading and writing meshes in the Gmsh format.
 *
 * For a full description of the Gmsh format and to obtain the
 * GMSH software see
 * <a href="http://http://www.geuz.org/gmsh/">the Gmsh home page</a>
 *
 * \author <NAME>
 * \date 2004, 2014
 * \author <NAME>
 * \date 2005
 */
class GmshIO : public MeshInput<MeshBase>,
               public MeshOutput<MeshBase>
{
public:

  /**
   * Constructor.  Takes a non-const Mesh reference which it
   * will fill up with elements via the read() command.
   */
  explicit
  GmshIO (MeshBase & mesh);

  /**
   * Constructor.  Takes a reference to a constant mesh object.
   * This constructor will only allow us to write the mesh.
   */
  explicit
  GmshIO (const MeshBase & mesh);

  /**
   * Reads in a mesh in the Gmsh *.msh format from the ASCII file
   * given by name.
   *
   * \note The user is responsible for calling Mesh::prepare_for_use()
   * after reading the mesh and before using it.
   *
   * The physical group names defined in the Gmsh-file are stored, depending
   * on the element dimension, as either subdomain name or as side name. The
   * IDs of the former can be retrieved by using the MeshBase::get_id_by_name
   * method; the IDs of the latter can be retrieved by using the
   * MeshBase::get_boundary_info and the BoundaryInfo::get_id_by_name methods.
   */
  virtual void read (const std::string & name) override;

  /**
   * This method implements writing a mesh to a specified file
   * in the Gmsh *.msh format.
   */
  virtual void write (const std::string & name) override;
{'fraction_non_alphanumeric': 0.08677071720549981, 'fraction_numerical': 0.013377926421404682, 'mean_word_length': 3.26883425852498, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6575136', 'n_tokens_mistral': 1689, 'n_tokens_neox': 1587, 'n_words': 706}