#ifndef SRC_SLIDING_BLOCK_DATA_MYGLOBALFRICTIONDATA_HH
#define SRC_SLIDING_BLOCK_DATA_MYGLOBALFRICTIONDATA_HH

#include <dune/common/function.hh>
#include <dune/common/fvector.hh>

#include <dune/fufem/functions/constantfunction.hh>

#include <dune/tectonic/globalfrictiondata.hh>

#include "mygeometry.hh"

template <int dimension>
class MyGlobalFrictionData : public GlobalFrictionData<dimension> {
private:
  using typename GlobalFrictionData<dimension>::VirtualFunction;

public:
  MyGlobalFrictionData(Dune::ParameterTree const &parset, MyGeometry const &tri)
      : C_(parset.get<double>("C")),
        L_(parset.get<double>("L")),
        V0_(parset.get<double>("V0")),
        a_(parset.get<double>("a")),
        b_(parset.get<double>("b")),
        mu0_(parset.get<double>("mu0")) {}

  double virtual const &C() const override { return C_; }
  double virtual const &L() const override { return L_; }
  double virtual const &V0() const override { return V0_; }
  VirtualFunction virtual const &a() const override { return a_; }
  VirtualFunction virtual const &b() const override { return b_; }
  double virtual const &mu0() const override { return mu0_; }

private:
  using MyConstantFunction = ConstantFunction<
      Dune::FieldVector<double, dimension>, Dune::FieldVector<double, 1>>;

  double const C_;
  double const L_;
  double const V0_;
  MyConstantFunction const a_;
  MyConstantFunction const b_;
  double const mu0_;
};

#endif