PSCF v1.4.0
system/SystemConstRef.h
1#ifndef RP_SYSTEM_CONST_REF_H
2#define RP_SYSTEM_CONST_REF_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// Forward declaration
12namespace Util {
13 class FileMaster;
14}
15
16namespace Pscf {
17namespace Rp {
18
19 using namespace Util;
20
32 template <int D, class T>
34 {
35
36 public:
37
41 typename T::System const & system() const
42 { return *systemPtr_; }
43
47 typename T::Mixture const & mixture() const
48 { return *mixturePtr_; }
49
53 typename T::Interaction const & interaction() const
54 { return *interactionPtr_; }
55
59 typename T::Domain const & domain() const
60 { return *domainPtr_; }
61
65 typename T::CFields const & c() const
66 { return *cPtr_; }
67
71 typename T::WFields const & w() const
72 { return *wPtr_; }
73
77 typename T::WFields const & h() const
78 { return *hPtr_; }
79
83 typename T::Mask const & mask() const
84 { return *maskPtr_; }
85
89 FileMaster const & fileMaster() const
90 { return *fileMasterPtr_; }
91
92 protected:
93
98
107 SystemConstRef(typename T::System const & system);
108
113
119 void associate(typename T::System const & system);
120
121 private:
122
124 typename T::System const * systemPtr_;
125
127 typename T::Mixture const * mixturePtr_;
128
130 typename T::Interaction const * interactionPtr_;
131
133 typename T::Domain const * domainPtr_;
134
136 typename T::CFields const * cPtr_;
137
139 typename T::WFields const * wPtr_;
140
142 typename T::WFields const * hPtr_;
143
145 typename T::Mask const * maskPtr_;
146
148 FileMaster const * fileMasterPtr_;
149
150 };
151
152} // namespace Rp
153} // namespace Pscf
154#endif
T::CFields const & c() const
Get the concentration (c) field container.
FileMaster const & fileMaster() const
Get the FileMaster.
void associate(typename T::System const &system)
Create associations with a system and its components.
T::Domain const & domain() const
Get the Domain.
T::WFields const & w() const
Get the chemical potential (w) field container.
T::WFields const & h() const
Get the external potential (h) field container (if any).
T::Interaction const & interaction() const
Get the Interaction.
SystemConstRef()
Default constructor.
T::Mask const & mask() const
Get the mask (if any).
T::Mixture const & mixture() const
Get the Mixture.
T::System const & system() const
Get the associated System.
A FileMaster manages input and output files for a simulation.
Definition FileMaster.h:143
Class templates for real-valued periodic fields.
PSCF package top-level namespace.
Utility classes for scientific computation.