#include <dune/common/exceptions.hh>

#include "enums.hh"

template <> struct StringToEnum<Config::stateModel> {
  static Config::stateModel convert(std::string const &s) {
    if (s == "AgeingLaw")
      return Config::AgeingLaw;

    if (s == "SlipLaw")
      return Config::SlipLaw;

    DUNE_THROW(Dune::Exception, "failed to parse enum");
  }
};