PSCF v1.3
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();
95 System<D> const & system() const;
96
100 std::string systemSpaceGroup() const;
101
107 RealVec<D> systemLatticeVector(int id) const;
108
112 int systemNMonomer() const;
113
118
119 private:
120
122 System<D>* sysPtr_;
123
125 double interfaceThickness_;
126
127 };
128
129 // Inline member functions
130
131 // Get parent System by non-const reference.
132 template <int D>
134 { return *sysPtr_; }
135
136 // Get parent System by const reference.
137 template <int D>
139 { return *sysPtr_; }
140
141 // Get space group name for this system.
142 template <int D>
143 inline std::string FilmFieldGenExt<D>::systemSpaceGroup() const
144 { return system().domain().groupName(); }
145
146 // Get one of the lattice vectors for this system.
147 template <int D>
149 { return system().domain().unitCell().rBasis(id); }
150
151 // Get the number of monomer species for this system.
152 template <int D>
154 { return system().mixture().nMonomer(); }
155
156 #ifndef RPG_EXT_GEN_FILM_TPP
157 extern template class FilmFieldGenExt<1>;
158 extern template class FilmFieldGenExt<2>;
159 extern template class FilmFieldGenExt<3>;
160 #endif
161
162} // namespace Rpg
163} // namespace Pscf
164
165#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 one complete 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