<commit_before>/*
 * Host based encapsulated base sweeper.
 */

#ifndef _PFASST_ENCAPSULATED_HPP_
#define _PFASST_ENCAPSULATED_HPP_

#include <vector>

#include "../interfaces.hpp"
#include "../quadrature.hpp"

using namespace std;

namespace pfasst
{
  namespace encap
  {

    typedef enum EncapType { solution, function } EncapType;

    /**
     * basic encapsulation.
     * 
     * An Encapsulation provides basic functionality of the user data used by PFASST such as 
     * mathematical operation @em axpy @f$y=ax+y@f$ and packing/unpacking for message passing.
     * @tparam time time precision
     *     defaults to pfasst::time_precision
     */
    template<typename time = time_precision>
    class Encapsulation
    {
      public:
        //! @{
        virtual ~Encapsulation() { }
        //! @}

        //! @{
        // required for time-parallel communications
        virtual void send()
        {
          throw NotImplementedYet("pfasst");
        }
        virtual void recv()
        {
          throw NotImplementedYet("pfasst");
        }
        //! @}

        //! @{
        // required for host based encap helpers
        virtual void zero()
        {
          throw NotImplementedYet("encap");
        }
        virtual void copy(const Encapsulation<time>*)
        {
          throw NotImplementedYet("encap");
        }
        //! @}

        //! @{
        /**
         * provides basic mathematical operation @f$y+=ax@f$.
         * 
         * This is the main mathematical operation applied by PFASST on the data structures.
         * Here, @f$a@f$ is a time point and @f$x@f$ another data structure (usually of the same 
         * type).
         */
        virtual void saxpy(time a, const Encapsulation<time>*)
        {
          throw NotImplementedYet("encap");
        }
        /**
         * defines matrix-vector multiplication for this data type.
         */
        virtual void mat_apply(vector<Encapsulation<time>*> dst, time a, matrix<time> m,
                               vector<Encapsulation<time>*> src, bool zero = true)
        {
          throw NotImplementedYet("encap");
        }
        //! @}
    };

    template<typename time = time_precision>
    class EncapFactory
    {
      public:
        virtual Encapsulation<time>* create(const EncapType) = 0;
    };

  }
}

#endif
<commit_msg>docu: using MathJAX markers directly (not Doxygen's)<commit_after>/*
 * Host based encapsulated base sweeper.
 */

#ifndef _PFASST_ENCAPSULATED_HPP_
#define _PFASST_ENCAPSULATED_HPP_

#include <vector>

#include "../interfaces.hpp"
#include "../quadrature.hpp"

using namespace std;

namespace pfasst
{
  namespace encap
  {

    typedef enum EncapType { solution, function } EncapType;

    /**
     * basic encapsulation.
     * 
     * An Encapsulation provides basic functionality of the user data used by PFASST such as 
     * mathematical operation @em axpy \\(y=ax+y\\) and packing/unpacking for message passing.
     * @tparam time time precision
     *     defaults to pfasst::time_precision
     */
    template<typename time = time_precision>
    class Encapsulation
    {
      public:
        //! @{
        virtual ~Encapsulation() { }
        //! @}

        //! @{
        // required for time-parallel communications
        virtual void send()
        {
          throw NotImplementedYet("pfasst");
        }
        virtual void recv()
        {
          throw NotImplementedYet("pfasst");
        }
        //! @}

        //! @{
        // required for host based encap helpers
        virtual void zero()
        {
          throw NotImplementedYet("encap");
        }
        virtual void copy(const Encapsulation<time>*)
        {
          throw NotImplementedYet("encap");
        }
        //! @}

        //! @{
        /**
         * provides basic mathematical operation \\(y+=ax\\).
         * 
         * This is the main mathematical operation applied by PFASST on the data structures.
         * Here, \\(a\\) is a time point and \\(x\\) another data structure (usually of the 
         * same type).
         */
        virtual void saxpy(time a, const Encapsulation<time>*)
        {
          throw NotImplementedYet("encap");
        }
        /**
         * defines matrix-vector multiplication for this data type.
         */
        virtual void mat_apply(vector<Encapsulation<time>*> dst, time a, matrix<time> m,
                               vector<Encapsulation<time>*> src, bool zero = true)
        {
          throw NotImplementedYet("encap");
        }
        //! @}
    };

    template<typename time = time_precision>
    class EncapFactory
    {
      public:
        virtual Encapsulation<time>* create(const EncapType) = 0;
    };

  }
}

#endif

{'fraction_non_alphanumeric': 0.10698552548772813, 'fraction_numerical': 0.0004195510803440319, 'mean_word_length': 1.8533812088569719, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6800292', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1335, 'n_words': 360}