<commit_before>// The libMesh Finite Element Library.
// Copyright (C) 2002-2022 <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


// Local includes
#include "libmesh/exodusII_io.h"
#include "libmesh/boundary_info.h"
#include "libmesh/mesh_base.h"
#include "libmesh/enum_elem_type.h"
#include "libmesh/elem.h"
#include "libmesh/equation_systems.h"
#include "libmesh/libmesh_logging.h"
#include "libmesh/system.h"
#include "libmesh/numeric_vector.h"
#include "libmesh/exodusII_io_helper.h"
#include "libmesh/enum_to_string.h"
#include "libmesh/mesh_communication.h"
#include "libmesh/parallel_mesh.h"
#include "libmesh/dof_map.h"
#include "libmesh/parallel.h"
#include "libmesh/utility.h"
#include "libmesh/auto_ptr.h" // libmesh_make_unique
#include "libmesh/dyna_io.h"  // ElementDefinition for BEX

// TIMPI includes
#include "timpi/parallel_sync.h"

// C++ includes
#include <cmath>   // llround
#include <cstring>
#include <fstream>
#include <map>
#include <sstream>

namespace
{
  using namespace libMesh;

  const std::vector<Real> & bex_constraint_vec(std::size_t i,
                                               const ExodusII_IO_Helper & helper)
  {
    std::size_t vec_offset = 0;
    for (auto block_num : index_range(helper.bex_dense_constraint_vecs))
    {
      const auto & vecblock = helper.bex_dense_constraint_vecs[block_num];
      libmesh_assert_greater_equal(i, vec_offset);
      if (i - vec_offset < vecblock.size())
        return vecblock[i - vec_offset];

      vec_offset += vecblock.size();
    }

    libmesh_error_msg("Requested BEX coefficient vector " << i << " not found");
  }
}

namespace libMesh
{

// ------------------------------------------------------------
// ExodusII_IO class members<commit_msg>Wrap Exodus-only API in ENABLE_EXODUS check<commit_after>// The libMesh Finite Element Library.
// Copyright (C) 2002-2022 <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


// Local includes
#include "libmesh/exodusII_io.h"
#include "libmesh/boundary_info.h"
#include "libmesh/mesh_base.h"
#include "libmesh/enum_elem_type.h"
#include "libmesh/elem.h"
#include "libmesh/equation_systems.h"
#include "libmesh/libmesh_logging.h"
#include "libmesh/system.h"
#include "libmesh/numeric_vector.h"
#include "libmesh/exodusII_io_helper.h"
#include "libmesh/enum_to_string.h"
#include "libmesh/mesh_communication.h"
#include "libmesh/parallel_mesh.h"
#include "libmesh/dof_map.h"
#include "libmesh/parallel.h"
#include "libmesh/utility.h"
#include "libmesh/auto_ptr.h" // libmesh_make_unique
#include "libmesh/dyna_io.h"  // ElementDefinition for BEX

// TIMPI includes
#include "timpi/parallel_sync.h"

// C++ includes
#include <cmath>   // llround
#include <cstring>
#include <fstream>
#include <map>
#include <sstream>

#ifdef LIBMESH_HAVE_EXODUS_API
namespace
{
  using namespace libMesh;

  const std::vector<Real> & bex_constraint_vec(std::size_t i,
                                               const ExodusII_IO_Helper & helper)
  {
    std::size_t vec_offset = 0;
    for (auto block_num : index_range(helper.bex_dense_constraint_vecs))
    {
      const auto & vecblock = helper.bex_dense_constraint_vecs[block_num];
      libmesh_assert_greater_equal(i, vec_offset);
      if (i - vec_offset < vecblock.size())
        return vecblock[i - vec_offset];

      vec_offset += vecblock.size();
    }

    libmesh_error_msg("Requested BEX coefficient vector " << i << " not found");
  }
}
#endif

namespace libMesh
{

// ------------------------------------------------------------
// ExodusII_IO class members
{'fraction_non_alphanumeric': 0.1283239323126511, 'fraction_numerical': 0.010072522159548751, 'mean_word_length': 3.4409660107334528, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 21, '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': '5593859', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1529, 'n_words': 471}