<commit_before>#include "libmesh/enum_fe_family.h"
#include "libmesh/fem_system.h"
#include "libmesh/parameter_vector.h"
#include "libmesh/qoi_set.h"
#include "libmesh/system.h"

// Bring in everything from the libMesh namespace
using namespace libMesh;

// FEMSystem, TimeSolver and  NewtonSolver will handle most tasks,
// but we must specify element residuals
class LaplaceSystem : public FEMSystem
{
public:
  // Constructor
  LaplaceSystem(EquationSystems & es,
                const std::string & name_in,
                const unsigned int number_in)
    : FEMSystem(es, name_in, number_in),
      _fe_family("LAGRANGE"),
      _fe_order(1),
      _analytic_jacobians(true)
  {}

  std::string & fe_family() { return _fe_family; }
  unsigned int & fe_order() { return _fe_order; }
  bool & analytic_jacobians() { return _analytic_jacobians; }

  Number & get_parameter_value(unsigned int parameter_index)
  {
    return parameters[parameter_index];
  }

  ParameterVector & get_parameter_vector()
  {
    parameter_vector.resize(parameters.size());
    for (unsigned int i = 0; i != parameters.size(); ++i)
      parameter_vector[i] = &parameters[i];

    return parameter_vector;
  }

protected:
  // System initialization
  virtual void init_data ();

  // Context initialization
  virtual void init_context (DiffContext & context);
<commit_msg>Avoid deprecated code in adjoints_ex2.<commit_after>#include "libmesh/enum_fe_family.h"
#include "libmesh/fem_system.h"
#include "libmesh/parameter_vector.h"
#include "libmesh/qoi_set.h"
#include "libmesh/system.h"
#include "libmesh/parameter_pointer.h"

// Bring in everything from the libMesh namespace
using namespace libMesh;

// FEMSystem, TimeSolver and  NewtonSolver will handle most tasks,
// but we must specify element residuals
class LaplaceSystem : public FEMSystem
{
public:
  // Constructor
  LaplaceSystem(EquationSystems & es,
                const std::string & name_in,
                const unsigned int number_in)
    : FEMSystem(es, name_in, number_in),
      _fe_family("LAGRANGE"),
      _fe_order(1),
      _analytic_jacobians(true)
  {}

  std::string & fe_family() { return _fe_family; }
  unsigned int & fe_order() { return _fe_order; }
  bool & analytic_jacobians() { return _analytic_jacobians; }

  Number & get_parameter_value(unsigned int parameter_index)
  {
    return parameters[parameter_index];
  }

  ParameterVector & get_parameter_vector()
  {
    typedef ParameterPointer<Number> PP;
    parameter_vector.clear();
    for (unsigned int i = 0; i != parameters.size(); ++i)
      parameter_vector.push_back(UniquePtr<ParameterAccessor<Number> >(new PP(&parameters[i])));

    return parameter_vector;
  }

protected:
  // System initialization
  virtual void init_data ();

  // Context initialization
  virtual void init_context (DiffContext & context);

{'fraction_non_alphanumeric': 0.10323033707865169, 'fraction_numerical': 0.0017556179775280898, 'mean_word_length': 4.007029876977153, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1547999', 'n_tokens_mistral': 905, 'n_tokens_neox': 868, 'n_words': 214}