PSCF v1.3.1
SystemConstRefTmpl.h
1#ifndef PRDC_SYSTEM_CONST_REF_TMPL_H
2#define PRDC_SYSTEM_CONST_REF_TMPL_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
32 template <class ST>
34 {
35
36 public:
37
38 // Public type name aliases
39 using SystemT = ST;
40 using MixtureT = typename SystemT::MixtureT;
41 using InteractionT = typename SystemT::InteractionT;
42 using DomainT = typename SystemT::DomainT;
43 using CFieldsT = typename SystemT::CFieldsT;
44 using WFieldsT = typename SystemT::WFieldsT;
45 using MaskT = typename SystemT::MaskT;
46 using RFieldT = typename SystemT::RFieldT;
47
48 // Public member functions
49
54
58 SystemConstRefTmpl(SystemT const & system);
59
64
68 void associate(SystemT const & system);
69
71 SystemT const & system() const
72 { return *systemPtr_; }
73
75 MixtureT const & mixture() const
76 { return *mixturePtr_; }
77
79 InteractionT const & interaction() const
80 { return *interactionPtr_; }
81
83 DomainT const & domain() const
84 { return *domainPtr_; }
85
87 CFieldsT const & c() const
88 { return *cPtr_; }
89
91 WFieldsT const & w() const
92 { return *wPtr_; }
93
95 WFieldsT const & h() const
96 { return *hPtr_; }
97
99 MaskT const & mask() const
100 { return *maskPtr_; }
101
103 FileMaster const & fileMaster() const
104 { return *fileMasterPtr_; }
105
106 private:
107
109 SystemT const * systemPtr_;
110
112 MixtureT const * mixturePtr_;
113
115 InteractionT const * interactionPtr_;
116
118 DomainT const * domainPtr_;
119
121 CFieldsT const * cPtr_;
122
124 WFieldsT const * wPtr_;
125
127 WFieldsT const * hPtr_;
128
130 MaskT const * maskPtr_;
131
133 FileMaster const * fileMasterPtr_;
134
135 };
136
137} // namespace Prdc
138} // namespace Pscf
139#endif
MaskT const & mask() const
Get the mask.
WFieldsT const & w() const
Get the chemical potential (w) field container.
CFieldsT const & c() const
Get the concentration (c) field container.
void associate(SystemT const &system)
Create associations with a system and its components.
SystemConstRefTmpl(SystemT const &system)
Constructor.
InteractionT const & interaction() const
Get the Interaction.
WFieldsT const & h() const
Get the external potential (h) field container.
MixtureT const & mixture() const
Get the Mixture.
DomainT const & domain() const
Get the Domain.
SystemConstRefTmpl()
Default constructor.
FileMaster const & fileMaster() const
Get the FileMaster.
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.