PSCF v1.3.1
rpg/environment/FilmFieldGenExt.h
1#ifndef RPG_EXT_GEN_FILM_H
2#define RPG_EXT_GEN_FILM_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 <rpg/system/System.h>
12#include <prdc/environment/FilmFieldGenExtBase.h> // Base class
13
14namespace Pscf {
15namespace Rpg {
16
17 using namespace Util;
18 using namespace Pscf::Prdc;
19
37 template <int D>
39 {
40
41 public:
42
47
54
59
72 double stress(int paramId) const;
73
80
81 protected:
82
86 void compute();
87
91 System<D> & system();
92
96 System<D> const & system() const;
97
101 std::string systemSpaceGroup() const;
102
108 RealVec<D> systemLatticeVector(int id) const;
109
113 int systemNMonomer() const;
114
119
120 private:
121
123 System<D>* sysPtr_;
124
126 double interfaceThickness_;
127
128 };
129
130 // Inline member functions
131
132 // Get parent System by non-const reference.
133 template <int D> inline
135 { return *sysPtr_; }
136
137 // Get parent System by const reference.
138 template <int D> inline
140 { return *sysPtr_; }
141
142 // Get space group name for this system.
143 template <int D> inline
145 { return system().domain().groupName(); }
146
147 // Get one of the lattice vectors for this system.
148 template <int D> inline
150 { return system().domain().unitCell().rBasis(id); }
151
152 // Get the number of monomer species for this system.
153 template <int D> inline
155 { return system().mixture().nMonomer(); }
156
157 // Explicit instantiation declarations
158 extern template class FilmFieldGenExt<1>;
159 extern template class FilmFieldGenExt<2>;
160 extern template class FilmFieldGenExt<3>;
161
162} // namespace Rpg
163} // namespace Pscf
164#endif
DArray< double > chiTopCurrent_
The chiTop array used to generate the current external fields.
DArray< double > const & chiTop() const
Get const chiTop array by reference.
DArray< double > chiBottomCurrent_
The chiBottom array used to generate the current external fields.
double excludedThickness() const
Get value of excludedThickness.
DArray< double > const & chiBottom() const
Get const chiBottom matrix by reference.
bool isAthermal() const
Are the walls athermal?
double interfaceThickness() const
Get value of interfaceThickness.
RealVec< D > normalVecCurrent_
The lattice vector normal to the film used to generate these fields.
int normalVecId() const
Get value of normalVecId.
A RealVec<D, T> is D-component vector with elements of floating type T.
Definition RealVec.h:28
Field Generator for external fields in thin-film systems.
std::string systemSpaceGroup() const
Get the space group name for this system.
void compute()
Compute the fields and store where the System can access.
RealVec< D > systemLatticeVector(int id) const
Get one of the lattice vectors for this system.
int systemNMonomer() const
Get the number of monomer species for this system.
double stress(int paramId) const
Get contribution to the stress from the external fields.
System< D > & system()
Get the System associated with this object by reference.
Main class, representing a complete physical system.
void setClassName(const char *className)
Set class name string.
Periodic fields and crystallography.
Definition CField.cpp:11
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1