<commit_before>#ifndef DUNE_DETAILED_DISCRETIZATIONS_ASSEMBLER_SYSTEM_HH
#define DUNE_DETAILED_DISCRETIZATIONS_ASSEMBLER_SYSTEM_HH

#include <vector>
#include <memory>

#include <dune/common/dynmatrix.hh>
#include <dune/common/dynvector.hh>

namespace Dune {
namespace Detailed {
namespace Discretizations {
namespace Assembler {

template< class TestFunctionSpaceImp, class AnsatzFunctionSpaceImp = TestFunctionSpaceImp >
class System
{
public:
  typedef TestFunctionSpaceImp TestFunctionSpaceType;

  typedef AnsatzFunctionSpaceImp AnsatzFunctionSpaceType;

  typedef System< TestFunctionSpaceImp, AnsatzFunctionSpaceImp > ThisType;

private:
  typedef typename TestFunctionSpaceType::GridViewType GridViewType;

  typedef typename GridViewType::template Codim< 0 >::Entity EntityType;

  typedef typename TestFunctionSpaceType::FunctionSpaceType::RangeFieldType RangeFieldType;

  typedef Dune::DynamicMatrix< RangeFieldType > LocalMatrixType;

  typedef Dune::DynamicVector< RangeFieldType > LocalVectorType;

  typedef std::vector< std::vector< LocalMatrixType > > LocalMatricesContainerType;

  typedef std::vector< std::vector< LocalVectorType > > LocalVectorsContainerType;

  class LocalMatrixAssemblerApplication
  {
  public:
    virtual ~LocalMatrixAssemblerApplication(){}

    virtual void apply(const TestFunctionSpaceType& /*_testSpace*/,
                       const AnsatzFunctionSpaceType& /*_ansatzSpace*/,
                       const EntityType& /*_entity*/,
                       LocalMatricesContainerType& /*_localMatricesContainer*/) const = 0;

    virtual std::vector< unsigned int > numTmpObjectsRequired() const = 0;
  }; // class LocalOperatorApplication

  template< class LocalMatrixAssemblerType, class MatrixType >
  class LocalMatrixAssemblerApplicationWrapper
    : public LocalMatrixAssemblerApplication
  {
  public:
    LocalMatrixAssemblerApplicationWrapper(const std::shared_ptr< const LocalMatrixAssemblerType > _localMatrixAssembler,
                                           std::shared_ptr< MatrixType > _matrix)
      : localMatrixAssembler_(_localMatrixAssembler)
      , matrix_(_matrix)
    {}

    virtual void apply(const TestFunctionSpaceType& _testSpace,
                       const AnsatzFunctionSpaceType& _ansatzSpace,
                       const EntityType& _entity,
                       LocalMatricesContainerType& _localMatricesContainer) const
    {
      localMatrixAssembler_->assembleLocal(_testSpace, _ansatzSpace, _entity, *matrix_, _localMatricesContainer);
    } // virtual void applyLocal(...) const

    virtual std::vector< unsigned int > numTmpObjectsRequired() const
    {
      return localMatrixAssembler_->numTmpObjectsRequired();
    } // virtual std::vector< unsigned int > numTmpObjectsRequired() const

  private:
    const std::shared_ptr< const LocalMatrixAssemblerType > localMatrixAssembler_;
    std::shared_ptr< MatrixType > matrix_;
  }; // class LocalMatrixAssemblerApplicationWrapper

  class LocalVectorAssemblerApplication
  {
  public:
    virtual void apply(const TestFunctionSpaceType& /*_testSpace*/,
                       const EntityType& /*_entity*/,
                       LocalVectorsContainerType& /*_localMatricesContainer*/) const = 0;

    virtual std::vector< unsigned int > numTmpObjectsRequired() const = 0;
  }; // class LocalOperatorApplication

  template< class LocalVectorAssemblerType, class VectorType >
  class LocalVectorAssemblerApplicationWrapper
    : public LocalVectorAssemblerApplication
  {
  public:
    LocalVectorAssemblerApplicationWrapper(const std::shared_ptr< const LocalVectorAssemblerType > _localVectorAssembler,
                                           std::shared_ptr< VectorType > _vector)
      : localVectorAssembler_(_localVectorAssembler)
      , vector_(_vector)
    {}

    virtual void apply(const TestFunctionSpaceType& _testSpace,
                       const EntityType& _entity,
                       LocalVectorsContainerType& _localVectorsContainer) const<commit_msg>[assembler.system] added missing virtual dtor<commit_after>#ifndef DUNE_DETAILED_DISCRETIZATIONS_ASSEMBLER_SYSTEM_HH
#define DUNE_DETAILED_DISCRETIZATIONS_ASSEMBLER_SYSTEM_HH

#include <vector>
#include <memory>

#include <dune/common/dynmatrix.hh>
#include <dune/common/dynvector.hh>

namespace Dune {
namespace Detailed {
namespace Discretizations {
namespace Assembler {

template< class TestFunctionSpaceImp, class AnsatzFunctionSpaceImp = TestFunctionSpaceImp >
class System
{
public:
  typedef TestFunctionSpaceImp TestFunctionSpaceType;

  typedef AnsatzFunctionSpaceImp AnsatzFunctionSpaceType;

  typedef System< TestFunctionSpaceImp, AnsatzFunctionSpaceImp > ThisType;

private:
  typedef typename TestFunctionSpaceType::GridViewType GridViewType;

  typedef typename GridViewType::template Codim< 0 >::Entity EntityType;

  typedef typename TestFunctionSpaceType::FunctionSpaceType::RangeFieldType RangeFieldType;

  typedef Dune::DynamicMatrix< RangeFieldType > LocalMatrixType;

  typedef Dune::DynamicVector< RangeFieldType > LocalVectorType;

  typedef std::vector< std::vector< LocalMatrixType > > LocalMatricesContainerType;

  typedef std::vector< std::vector< LocalVectorType > > LocalVectorsContainerType;

  class LocalMatrixAssemblerApplication
  {
  public:
    virtual ~LocalMatrixAssemblerApplication(){}

    virtual void apply(const TestFunctionSpaceType& /*_testSpace*/,
                       const AnsatzFunctionSpaceType& /*_ansatzSpace*/,
                       const EntityType& /*_entity*/,
                       LocalMatricesContainerType& /*_localMatricesContainer*/) const = 0;

    virtual std::vector< unsigned int > numTmpObjectsRequired() const = 0;
  }; // class LocalOperatorApplication

  template< class LocalMatrixAssemblerType, class MatrixType >
  class LocalMatrixAssemblerApplicationWrapper
    : public LocalMatrixAssemblerApplication
  {
  public:
    LocalMatrixAssemblerApplicationWrapper(const std::shared_ptr< const LocalMatrixAssemblerType > _localMatrixAssembler,
                                           std::shared_ptr< MatrixType > _matrix)
      : localMatrixAssembler_(_localMatrixAssembler)
      , matrix_(_matrix)
    {}

    virtual void apply(const TestFunctionSpaceType& _testSpace,
                       const AnsatzFunctionSpaceType& _ansatzSpace,
                       const EntityType& _entity,
                       LocalMatricesContainerType& _localMatricesContainer) const
    {
      localMatrixAssembler_->assembleLocal(_testSpace, _ansatzSpace, _entity, *matrix_, _localMatricesContainer);
    } // virtual void applyLocal(...) const

    virtual std::vector< unsigned int > numTmpObjectsRequired() const
    {
      return localMatrixAssembler_->numTmpObjectsRequired();
    } // virtual std::vector< unsigned int > numTmpObjectsRequired() const

  private:
    const std::shared_ptr< const LocalMatrixAssemblerType > localMatrixAssembler_;
    std::shared_ptr< MatrixType > matrix_;
  }; // class LocalMatrixAssemblerApplicationWrapper

  class LocalVectorAssemblerApplication
  {
  public:
    virtual ~LocalVectorAssemblerApplication(){}

    virtual void apply(const TestFunctionSpaceType& /*_testSpace*/,
                       const EntityType& /*_entity*/,
                       LocalVectorsContainerType& /*_localMatricesContainer*/) const = 0;

    virtual std::vector< unsigned int > numTmpObjectsRequired() const = 0;
  }; // class LocalOperatorApplication

  template< class LocalVectorAssemblerType, class VectorType >
  class LocalVectorAssemblerApplicationWrapper
    : public LocalVectorAssemblerApplication
  {
  public:
    LocalVectorAssemblerApplicationWrapper(const std::shared_ptr< const LocalVectorAssemblerType > _localVectorAssembler,
                                           std::shared_ptr< VectorType > _vector)
      : localVectorAssembler_(_localVectorAssembler)
      , vector_(_vector)
    {}

    virtual void apply(const TestFunctionSpaceType& _testSpace,
                       const EntityType& _entity,
                       LocalVectorsContainerType& _localVectorsContainer) const
{'fraction_non_alphanumeric': 0.07105974920088517, 'fraction_numerical': 0.0012294074256208507, 'mean_word_length': 3.885885885885886, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2134408', 'n_tokens_mistral': 2176, 'n_tokens_neox': 2072, 'n_words': 457}