PSCF v1.3.1
rpc/environment/EnvironmentFactory.h
1#ifndef RPC_ENVIRONMENT_FACTORY_H
2#define RPC_ENVIRONMENT_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 <prdc/environment/Environment.h>
12#include <util/param/Factory.h>
13
14#include <string>
15
16namespace Pscf {
17namespace Rpc {
18
19 template <int D> class System;
20
21 using namespace Util;
22 using namespace Pscf::Prdc;
23
29
30 template <int D>
31 class EnvironmentFactory : public Factory<Environment>
32 {
33
34 public:
35
40
47 Environment* factory(const std::string &className) const;
48
51
52 private:
53
55 System<D>* sysPtr_;
56
57 };
58
59 // Explicit instantiation declarations
60 extern template class EnvironmentFactory<1>;
61 extern template class EnvironmentFactory<2>;
62 extern template class EnvironmentFactory<3>;
63
64}
65}
66#endif
Base class mask and external field generator for variable-cell SCFT.
Definition Environment.h:59
Factory for subclasses of Environment.
Environment * factory(const std::string &className) const
Method to create any Environment supplied with PSCF.
EnvironmentFactory(System< D > &system)
Constructor.
Main class, representing a complete physical system.
Environment * trySubfactories(const std::string &className) const
Definition Factory.h:425
Environment * readObjectOptional(std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
Definition Factory.h:378
Periodic fields and crystallography.
Definition CField.cpp:11
Real periodic fields, SCFT and PS-FTS (CPU).
Definition param_pc.dox:2
PSCF package top-level namespace.
Definition param_pc.dox:1