Skip to content
Snippets Groups Projects
Forked from agnumpde / dune-tectonic
288 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
enum_scheme.cc 351 B
#include <dune/common/exceptions.hh>

#include "enums.hh"

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

    if (s == "backwardEuler")
      return Config::BackwardEuler;

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