PSCF v1.3
SystemConstRefReal.h
1#ifndef PRDC_SYSTEM_CONST_REF_REAL_H
2#define PRDC_SYSTEM_CONST_REF_REAL_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 declarations
12namespace Util {
13 class FileMaster;
14}
15
16namespace Pscf {
17namespace Prdc {
18
19 using namespace Util;
20
31 template <class ST>
33 {
34
35 public:
36
37 // Public type name aliases
38 using SystemT = ST;
39 using MixtureT = typename SystemT::MixtureT;
40 using InteractionT = typename SystemT::InteractionT;
41 using DomainT = typename SystemT::DomainT;
42 using CFieldContainerT = typename SystemT::CFieldContainerT;
43 using WFieldContainerT = typename SystemT::WFieldContainerT;
44 using MaskT = typename SystemT::MaskT;
45 using FieldT = typename SystemT::FieldT;
46
47 // Public member functions
48
53
57 SystemConstRefReal(SystemT const & system);
58
63
67 void associate(SystemT const & system);
68
70 SystemT const & system() const
71 { return *systemPtr_; }
72
74 MixtureT const & mixture() const
75 { return *mixturePtr_; }
76
78 InteractionT const & interaction() const
79 { return *interactionPtr_; }
80
82 DomainT const & domain() const
83 { return *domainPtr_; }
84
86 CFieldContainerT const & c() const
87 { return *cPtr_; }
88
90 WFieldContainerT const & w() const
91 { return *wPtr_; }
92
94 WFieldContainerT const & h() const
95 { return *hPtr_; }
96
98 MaskT const & mask() const
99 { return *maskPtr_; }
100
102 FileMaster const & fileMaster() const
103 { return *fileMasterPtr_; }
104
105 private:
106
108 SystemT const * systemPtr_;
109
111 MixtureT const * mixturePtr_;
112
114 InteractionT const * interactionPtr_;
115
117 DomainT const * domainPtr_;
118
120 CFieldContainerT const * cPtr_;
121
123 WFieldContainerT const * wPtr_;
124
126 WFieldContainerT const * hPtr_;
127
129 MaskT const * maskPtr_;
130
132 FileMaster const * fileMasterPtr_;
133
134 };
135
136} // namespace Prdc
137} // namespace Pscf
138#endif
SystemConstRefReal(SystemT const &system)
Constructor.
FileMaster const & fileMaster() const
Get the FileMaster.
DomainT const & domain() const
Get the Domain.
void associate(SystemT const &system)
Create associations with a system and its components.
MaskT const & mask() const
Get the mask.
WFieldContainerT const & w() const
Get the chemical potential (w) field container.
MixtureT const & mixture() const
Get the Mixture.
WFieldContainerT const & h() const
Get the external potential (h) field container.
SystemConstRefReal()
Default constructor.
CFieldContainerT const & c() const
Get the concentration (c) field container.
InteractionT const & interaction() const
Get the Interaction.
A FileMaster manages input and output files for a simulation.
Definition FileMaster.h:143
Periodic fields and crystallography.
Definition CField.cpp:11
PSCF package top-level namespace.
Definition param_pc.dox:1
Utility classes for scientific computation.