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

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

    if (s == "newmark")
      return Config::Newmark;

    if (s == "eulerPair")
      return Config::EulerPair;

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