PSCF v1.5.0
SimulatorFactory.h
1#ifndef RP_SIMULATOR_FACTORY_H
2#define RP_SIMULATOR_FACTORY_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <util/param/Factory.h> // base class template
12#include <rp/fts/simulator/Simulator.h> // base class argument
13#include <pscf/backend/TmplDeclare.h> // declaration macros
14
15#include <string>
16
17// Forward declarations
18namespace Pscf {
19 namespace Rp {
20 template <int D, class T> class System;
21 template <int D, class T> class Simulator;
22 }
23}
24
25namespace Pscf {
26namespace Rp {
27
28 using namespace Util;
29
35 template <int D, class T>
36 class SimulatorFactory : public Factory< Simulator<D,T> >
37 {
38
39 public:
40
47
54 Simulator<D,T>* factory(const std::string &className) const;
55
58
59 private:
60
62 System<D,T>* systemPtr_;
63
64 };
65
66 // Explicit instantation declarations
67 PSCF_TMPL_DECLARE(SimulatorFactory)
68
69}
70}
71#endif
Factory for subclasses of Simulator.
Simulator< D, T > * factory(const std::string &className) const
Method to create any Simulator supplied with PSCF.
SimulatorFactory(System< D, T > &system)
Constructor.
Base class for field theoretic PS-FTS simulator.
Definition Simulator.h:93
Base class template for classes that represent a complete system.
Simulator< D, T > * trySubfactories(const std::string &className) const
Definition Factory.h:427
Simulator< D, T > * readObjectOptional(std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
Definition Factory.h:380
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.