<commit_before>// dune-multiscale
// Copyright Holders: <NAME>, <NAME>
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

#ifndef DHUUNE_MSFEM_TRAITS_HH
#define DHUUNE_MSFEM_TRAITS_HH

#include <dune/multiscale/common/la_backend.hh>
#include <dune/multiscale/common/traits.hh>

#include <dune/grid/spgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dune/fem/space/lagrange.hh>
#include <vector>

namespace Dune {

namespace Multiscale {
namespace MsFEM {

template <class F, class U, class B, class A, class R>
class ErrorEstimator;

//! type construction for the MSFEM code
struct MsFEMTraits {
  typedef typename CommonTraits::DiscreteFunctionType::DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType;
//  typedef Dune::SPGrid<double, CommonTraits::GridType::dimension> LocalGridType;
  typedef Dune::SGrid<CommonTraits::GridType::dimension, CommonTraits::GridType::dimension> LocalGridType;
  typedef Fem::AdaptiveLeafGridPart<LocalGridType> LocalGridPartType;<commit_msg>use spgrid for local grids too - way faster<commit_after>// dune-multiscale
// Copyright Holders: <NAME>, <NAME>
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

#ifndef DHUUNE_MSFEM_TRAITS_HH
#define DHUUNE_MSFEM_TRAITS_HH

#include <dune/multiscale/common/la_backend.hh>
#include <dune/multiscale/common/traits.hh>

#include <dune/grid/spgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dune/fem/space/lagrange.hh>
#include <vector>

namespace Dune {

namespace Multiscale {
namespace MsFEM {

template <class F, class U, class B, class A, class R>
class ErrorEstimator;

//! type construction for the MSFEM code
struct MsFEMTraits {
  typedef typename CommonTraits::DiscreteFunctionType::DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType;
  typedef Dune::SPGrid<double, CommonTraits::GridType::dimension> LocalGridType;
//  typedef Dune::SGrid<CommonTraits::GridType::dimension, CommonTraits::GridType::dimension> LocalGridType;
  typedef Fem::AdaptiveLeafGridPart<LocalGridType> LocalGridPartType;
{'fraction_non_alphanumeric': 0.11504854368932038, 'fraction_numerical': 0.001941747572815534, 'mean_word_length': 6.806818181818182, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '1441383', 'n_tokens_mistral': 713, 'n_tokens_neox': 692, 'n_words': 144}