Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
app.h
1 #ifndef APP_H
2 #define APP_H
3 
4 #include "active_bandstructure.h"
5 #include "bandstructure.h"
6 #include "context.h"
7 
22 class App {
23 public:
30  static std::unique_ptr<App> loadApp(const std::string &choice);
31 
35  virtual void run(Context &context);
36 
43  virtual void checkRequirements(Context &context);
44 
45 protected:
46 
47  static void throwErrorIfUnset(const std::string &x, const std::string &name);
48  static void throwErrorIfUnset(const std::vector<std::string> &x,
49  const std::string &name);
50  static void throwErrorIfUnset(const double &x, const std::string &name);
51  static void throwErrorIfUnset(const Eigen::VectorXi &x, const std::string &name);
52  static void throwErrorIfUnset(const Eigen::Vector3i &x, const std::string &name);
53  static void throwErrorIfUnset(const Eigen::VectorXd &x, const std::string &name);
54  static void throwErrorIfUnset(const Eigen::MatrixXd &x, const std::string &name);
55  static void throwErrorIfUnset(const Eigen::Tensor<double, 3> &x,
56  const std::string &name);
57 
58  static void throwWarningIfUnset(const std::string &x, const std::string &name);
59 };
60 
61 #endif
Base class for launching apps.
Definition: app.h:22
virtual void run(Context &context)
Launches the subprogram.
Definition: app.cpp:75
static std::unique_ptr< App > loadApp(const std::string &choice)
Factory method, used to load the desired subclass.
Definition: app.cpp:18
virtual void checkRequirements(Context &context)
Checks that the user wrote a complete input file.
Definition: app.cpp:81
Class containing the user input variables.
Definition: context.h:15