PolyFEM
Loading...
Searching...
No Matches
ProblemFactory.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
polyfem/assembler/Problem.hpp
>
4
5
#include <functional>
6
#include <memory>
7
8
namespace
polyfem
9
{
10
namespace
problem
11
{
12
13
class
ProblemFactory
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
:
22
ProblemFactory
();
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
Problem.hpp
polyfem::problem::ProblemFactory
Definition
ProblemFactory.hpp:14
polyfem::problem::ProblemFactory::ProblemFactory
ProblemFactory()
Definition
ProblemFactory.cpp:29
polyfem::problem::ProblemFactory::problem_names_
std::vector< std::string > problem_names_
Definition
ProblemFactory.hpp:24
polyfem::problem::ProblemFactory::problems_
std::map< std::string, std::function< std::shared_ptr< assembler::Problem >()> > problems_
Definition
ProblemFactory.hpp:23
polyfem::problem::ProblemFactory::get_problem_names
const std::vector< std::string > & get_problem_names() const
Definition
ProblemFactory.hpp:19
polyfem::problem::ProblemFactory::factory
static const ProblemFactory & factory()
Definition
ProblemFactory.cpp:22
polyfem::problem::ProblemFactory::get_problem
std::shared_ptr< assembler::Problem > get_problem(const std::string &problem) const
Definition
ProblemFactory.cpp:84
polyfem
Definition
AMIPSEnergy.cpp:6
src
polyfem
problem
ProblemFactory.hpp
Generated by
1.9.8