PSCF v1.3.1
rpc/fts/simulator/SimulatorFactory.h
1#ifndef RPC_SIMULATOR_FACTORY_H
2#define RPC_SIMULATOR_FACTORY_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <util/param/Factory.h>
12#include <rpc/fts/simulator/Simulator.h>
13
14#include <string>
15
16namespace Pscf {
17namespace Rpc {
18
19 template <int D> class System;
20
21 using namespace Util;
22
28 template <int D>
29 class SimulatorFactory : public Factory< Simulator<D> >
30 {
31
32 public:
33
40
47 Simulator<D>* factory(const std::string &className) const;
48
51
52 private:
53
55 System<D>* systemPtr_;
56
57 };
58
59 // Explicit instantiation declarations
60 extern template class SimulatorFactory<1>;
61 extern template class SimulatorFactory<2>;
62 extern template class SimulatorFactory<3>;
63
64}
65}
66#endif
Factory for subclasses of Simulator.
Simulator< D > * factory(const std::string &className) const
Method to create any Simulator supplied with PSCF.
SimulatorFactory(System< D > &system)
Constructor.
Field theoretic simulator (base class).
Main class, representing a complete physical system.
Simulator< D > * trySubfactories(const std::string &className) const
Definition Factory.h:425
Simulator< D > * readObjectOptional(std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
Definition Factory.h:378
Real periodic fields, SCFT and PS-FTS (CPU).
Definition param_pc.dox:2
PSCF package top-level namespace.
Definition param_pc.dox:1