PSCF v1.5.0
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 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/backend/TmplDeclare.h> // declaration macros
12
13// Forward declarations
14namespace Util {
15 class FileMaster;
16}
17namespace Pscf {
18 class Interaction;
19 namespace Rp {
20 template <int D, class T> class System;
21 template <int D, class T> class Mixture;
22 template <int D, class T> class Domain;
23 template <int D, class T> class CFields;
24 template <int D, class T> class WFields;
25 template <int D, class T> class Mask;
26 }
27}
28
29namespace Pscf {
30namespace Rp {
31
32 using namespace Util;
33
45 template <int D, class T>
47 {
48
49 public:
50
54 System<D,T> const & system() const
55 { return *systemPtr_; }
56
60 Mixture<D,T> const & mixture() const
61 { return *mixturePtr_; }
62
66 Interaction const & interaction() const
67 { return *interactionPtr_; }
68
72 Domain<D,T> const & domain() const
73 { return *domainPtr_; }
74
78 CFields<D,T> const & c() const
79 { return *cPtr_; }
80
84 WFields<D,T> const & w() const
85 { return *wPtr_; }
86
90 WFields<D,T> const & h() const
91 { return *hPtr_; }
92
96 Mask<D,T> const & mask() const
97 { return *maskPtr_; }
98
102 FileMaster const & fileMaster() const
103 { return *fileMasterPtr_; }
104
105 protected:
106
111
121
126
132 void associate(System<D,T> const & system);
133
134 private:
135
137 System<D,T> const * systemPtr_;
138
140 Mixture<D,T> const * mixturePtr_;
141
143 Interaction const * interactionPtr_;
144
146 Domain<D,T> const * domainPtr_;
147
149 CFields<D,T> const * cPtr_;
150
152 WFields<D,T> const * wPtr_;
153
155 WFields<D,T> const * hPtr_;
156
158 Mask<D,T> const * maskPtr_;
159
161 FileMaster const * fileMasterPtr_;
162
163 };
164
165 // Explicit instantiation declarations
166 PSCF_TMPL_DECLARE(SystemConstRef)
167
168} // namespace Rp
169} // namespace Pscf
170#endif
Interaction model for complex Langevin FTS.
Definition Interaction.h:24
A list of c fields stored in both basis and r-grid format.
Definition CFields.h:58
Spatial domain for a periodic structure with real fields.
A field that specifies an inhomogeneous total monomer concentration.
Definition Mask.h:85
Solver and descriptor for a mixture of polymers and solvents.
Base class template for const access to an associated System.
FileMaster const & fileMaster() const
Get the FileMaster.
System< D, T > const & system() const
Get the associated System.
Mask< D, T > const & mask() const
Get the mask (if any).
void associate(System< D, T > const &system)
Create associations with a system and its components.
CFields< D, T > const & c() const
Get the concentration (c) field container.
WFields< D, T > const & h() const
Get the external potential (h) field container (if any).
Mixture< D, T > const & mixture() const
Get the Mixture.
SystemConstRef()
Default constructor.
Interaction const & interaction() const
Get the Interaction.
WFields< D, T > const & w() const
Get the chemical potential (w) field container.
Domain< D, T > const & domain() const
Get the Domain.
Base class template for classes that represent a complete system.
A container of w fields stored in both basis and r-grid format.
Definition WFields.h:87
A FileMaster manages input and output files for a simulation.
Definition FileMaster.h:143
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.
Utility classes for scientific computation.