ABLATE Source Documentation  0.12.34
initializer.hpp
1 #ifndef ABLATELIBRARY_DOMAIN_INITIALIZER_HPP
2 #define ABLATELIBRARY_DOMAIN_INITIALIZER_HPP
3 
4 #include <memory>
5 #include <utility>
6 #include <vector>
7 #include "field.hpp"
8 #include "mathFunctions/fieldFunction.hpp"
9 
10 namespace ablate::domain {
14 class Initializer {
15  private:
16  const std::vector<std::shared_ptr<mathFunctions::FieldFunction>> fieldFunctions;
17 
18  public:
22  explicit Initializer(std::vector<std::shared_ptr<mathFunctions::FieldFunction>>);
23 
27  template <class... FieldFunctions>
28  explicit Initializer(FieldFunctions&&... functions) : fieldFunctions{std::forward<FieldFunctions>(functions)...} {};
29 
33  virtual ~Initializer() = default;
34 
38  [[nodiscard]] virtual std::vector<std::shared_ptr<mathFunctions::FieldFunction>> GetFieldFunctions(const std::vector<domain::Field>& fields) const { return fieldFunctions; }
39 };
40 
41 } // namespace ablate::domain
42 
43 #endif // ABLATELIBRARY_DOMAIN_INITIALIZER_HPP
Definition: initializer.hpp:14
Initializer(FieldFunctions &&... functions)
Definition: initializer.hpp:28
virtual std::vector< std::shared_ptr< mathFunctions::FieldFunction > > GetFieldFunctions(const std::vector< domain::Field > &fields) const
Definition: initializer.hpp:38
virtual ~Initializer()=default
Initializer(std::vector< std::shared_ptr< mathFunctions::FieldFunction >>)
Definition: initializer.cpp:2