<commit_before>//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// QUESO - a library to support the Quantification of Uncertainty
// for Estimation, Simulation and Optimization
//
// Copyright (C) 2008,2009,2010,2011,2012,2013 The PECOS Development Team
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the Version 2.1 GNU Lesser General
// Public License as published by the Free Software Foundation.
//
// 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. 51 Franklin Street, Fifth Floor,
// Boston, MA  02110-1301  USA
//
//-----------------------------------------------------------------------el-

/*
 * Brief description of this file:
 *
 * This file contains the code for the user defined qoi routine.
 */

#include <queso/GslVector.h>
#include <queso/GslMatrix.h>
#include <gravity_qoi.h>

template<class P_V, class P_M, class Q_V, class Q_M>
Qoi<P_V, P_M, Q_V, Q_M>::Qoi(const char * prefix,
    const QUESO::VectorSet<P_V, P_M> & domainSet,
    const QUESO::VectorSet<Q_V, Q_M> & imageSet)
  : QUESO::BaseVectorFunction<P_V, P_M, Q_V, Q_M>(prefix, domainSet, imageSet),
    m_angle(M_PI / 4.0),
    m_initialVelocity(5.0),
    m_initialHeight(0.0)
{
}

template<class P_V, class P_M, class Q_V, class Q_M>
Qoi<P_V, P_M, Q_V, Q_M>::~Qoi()
{
  // Deconstruct here
}

template<class P_V, class P_M, class Q_V, class Q_M>
void
Qoi<P_V, P_M, Q_V, Q_M>::compute(const P_V & domainVector,
    const P_V * domainDirection,
    Q_V & imageVector, QUESO::DistArray<P_V *> * gradVectors,
    QUESO::DistArray<P_M *> * hessianMatrices,
    QUESO::DistArray<P_V *> * hessianEffects) const
{
  double g = domainVector[0];  // Sample of the RV 'gravity acceleration'
  double distanceTraveled = 0.0;
  double aux = m_initialVelocity * std::sin(m_angle);<commit_msg>Add back in the error messages<commit_after>//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// QUESO - a library to support the Quantification of Uncertainty
// for Estimation, Simulation and Optimization
//
// Copyright (C) 2008,2009,2010,2011,2012,2013 The PECOS Development Team
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the Version 2.1 GNU Lesser General
// Public License as published by the Free Software Foundation.
//
// 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. 51 Franklin Street, Fifth Floor,
// Boston, MA  02110-1301  USA
//
//-----------------------------------------------------------------------el-

/*
 * Brief description of this file:
 *
 * This file contains the code for the user defined qoi routine.
 */

#include <queso/GslVector.h>
#include <queso/GslMatrix.h>
#include <gravity_qoi.h>

template<class P_V, class P_M, class Q_V, class Q_M>
Qoi<P_V, P_M, Q_V, Q_M>::Qoi(const char * prefix,
    const QUESO::VectorSet<P_V, P_M> & domainSet,
    const QUESO::VectorSet<Q_V, Q_M> & imageSet)
  : QUESO::BaseVectorFunction<P_V, P_M, Q_V, Q_M>(prefix, domainSet, imageSet),
    m_angle(M_PI / 4.0),
    m_initialVelocity(5.0),
    m_initialHeight(0.0)
{
}

template<class P_V, class P_M, class Q_V, class Q_M>
Qoi<P_V, P_M, Q_V, Q_M>::~Qoi()
{
  // Deconstruct here
}

template<class P_V, class P_M, class Q_V, class Q_M>
void
Qoi<P_V, P_M, Q_V, Q_M>::compute(const P_V & domainVector,
    const P_V * domainDirection,
    Q_V & imageVector, QUESO::DistArray<P_V *> * gradVectors,
    QUESO::DistArray<P_M *> * hessianMatrices,
    QUESO::DistArray<P_V *> * hessianEffects) const
{
  if (domainVector.sizeLocal() != 1) {
    queso_error_msg("domainVector does not have size 1");
  }
  if (imageVector.sizeLocal() != 1) {
    queso_error_msg("imageVector does not have size 1");
  }

  double g = domainVector[0];  // Sample of the RV 'gravity acceleration'
  double distanceTraveled = 0.0;
  double aux = m_initialVelocity * std::sin(m_angle);
{'fraction_non_alphanumeric': 0.1938049393051486, 'fraction_numerical': 0.020092088740058602, 'mean_word_length': 2.6122448979591835, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '650266', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1505, 'n_words': 500}