PSCF v1.3
rpg/environment/FilmFieldGenMask.h
1#ifndef RPG_MASK_GEN_FILM_H
2#define RPG_MASK_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/FilmFieldGenMaskBase.h> // Base class
13
14namespace Pscf {
15namespace Rpg {
16
17 using namespace Util;
18 using namespace Pscf::Prdc;
19
33 template <int D>
35 {
36
37 public:
38
43
50
55
68 double stress(int paramId) const;
69
86 double modifyStress(int paramId, double stress) const;
87
92
93 protected:
94
98 void compute();
99
103 void setFlexibleParams() const;
104
108 System<D>& system();
112 System<D> const & system() const;
113
117 std::string systemSpaceGroup() const;
118
124 RealVec<D> systemLatticeVector(int id) const;
125
130
131 private:
132
134 System<D>* sysPtr_;
135
136 };
137
138 // Inline member functions
139
140 // Get parent System by non-const reference.
141 template <int D>
143 { return *sysPtr_; }
144
145 // Get parent System by const reference.
146 template <int D>
148 { return *sysPtr_; }
149
150 // Get space group name for this system.
151 template <int D>
152 inline std::string FilmFieldGenMask<D>::systemSpaceGroup() const
153 { return system().domain().groupName(); }
154
155 // Get one of the lattice vectors for this system.
156 template <int D>
158 { return system().domain().unitCell().rBasis(id); }
159
160 #ifndef RPG_MASK_GEN_FILM_TPP
161 extern template class FilmFieldGenMask<1>;
162 extern template class FilmFieldGenMask<2>;
163 extern template class FilmFieldGenMask<3>;
164 #endif
165
166} // namespace Rpg
167} // namespace Pscf
168
169#endif
RealVec< D > normalVecCurrent_
The lattice vector normal to the film used to generate these fields.
int normalVecId() const
Get value of normalVecId.
double fBulk_
Reference free energy used to calculate stress normal to the film.
bool hasFBulk() const
Check whether a value of fBulk was provided.
FSArray< bool, 6 > modifyFlexibleParams(FSArray< bool, 6 > current, UnitCell< D > const &cell) const
Modifies a flexibleParams array to be compatible with this mask.
double interfaceThickness() const
Get value of interfaceThickness.
double excludedThickness() const
Get value of excludedThickness.
A RealVec<D, T> is D-component vector with elements of floating type T.
Definition RealVec.h:28
Field Generator for thin-film masks.
void compute()
Compute the field and store where the System can access.
double modifyStress(int paramId, double stress) const
Modify stress value in direction normal to the film.
System< D > & system()
Get the System associated with this object by reference.
void setFlexibleParams() const
Modifies iterator().flexibleParams_ to be compatible with the mask.
double stress(int paramId) const
Get contribution to the stress from this mask.
std::string systemSpaceGroup() const
Get the space group name for this system.
RealVec< D > systemLatticeVector(int id) const
Get one of the lattice vectors for this system.
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