PolyFEM
Loading...
Searching...
No Matches
ProblemFactory.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <functional>
6#include <memory>
7
8namespace polyfem
9{
10 namespace problem
11 {
12
14 {
15 public:
16 static const ProblemFactory &factory();
17
18 std::shared_ptr<assembler::Problem> get_problem(const std::string &problem) const;
19 inline const std::vector<std::string> &get_problem_names() const { return problem_names_; }
20
21 private:
23 std::map<std::string, std::function<std::shared_ptr<assembler::Problem>()>> problems_;
24 std::vector<std::string> problem_names_;
25 };
26 } // namespace problem
27} // namespace polyfem
std::vector< std::string > problem_names_
std::map< std::string, std::function< std::shared_ptr< assembler::Problem >()> > problems_
const std::vector< std::string > & get_problem_names() const
static const ProblemFactory & factory()
std::shared_ptr< assembler::Problem > get_problem(const std::string &problem) const