PolyFEM
Loading...
Searching...
No Matches
VarFormFactory.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <polyfem/Common.hpp>
5
6#include <memory>
7#include <string>
8
9namespace polyfem::varform
10{
11 class VarForm;
12
14 {
15 public:
16 static bool supports(const std::string &formulation, const json &args, bool is_optimization = false);
17 static std::shared_ptr<VarForm> create(
18 const std::string &formulation,
19 const json &args,
20 const io::ResourceIO &resources,
21 bool is_optimization = false);
22 };
23
27 std::string formulation_from_args(const json &args);
28
33 bool uses_varform_state(json args, const io::ResourceIO &resources);
34} // namespace polyfem::varform
Read-only interface to a hierarchical collection of simulation resources.
static std::shared_ptr< VarForm > create(const std::string &formulation, const json &args, const io::ResourceIO &resources, bool is_optimization=false)
static bool supports(const std::string &formulation, const json &args, bool is_optimization=false)
std::string formulation_from_args(const json &args)
Extracts the formulation type from the given JSON arguments.
bool uses_varform_state(json args, const io::ResourceIO &resources)
Checks if the given JSON arguments use a VarForm state.
nlohmann::json json
Definition Common.hpp:9