PSCF v1.1
FilmIterator.h
1#ifndef PSPC_FILM_ITERATOR_H
2#define PSPC_FILM_ITERATOR_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2021, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "FilmIteratorBase.h"
12
13namespace Pscf {
14namespace Pspc
15{
16
17 template <int D>
18 class System;
19
20 using namespace Util;
21
49 template <int D, typename IteratorType>
50 class FilmIterator : public FilmIteratorBase<D,IteratorType>
51 {};
52
53 // Partial Specializations
54
58 template <typename IteratorType>
59 class FilmIterator<1, IteratorType>
60 : public FilmIteratorBase<1, IteratorType>
61 {
62 public:
63
68
83 void setFlexibleParams();
84
92 void checkLatticeVectors() const;
93
94 using FilmIteratorBase<1,IteratorType>::setClassName;
95 using FilmIteratorBase<1,IteratorType>::normalVecId;
96
97 protected:
98
99 using FilmIteratorBase<1,IteratorType>::system;
100 using FilmIteratorBase<1,IteratorType>::iterator;
102
103 };
104
108 template <typename IteratorType>
109 class FilmIterator<2,IteratorType>
110 : public FilmIteratorBase<2,IteratorType>
111 {
112 public:
113
118
130 void setFlexibleParams();
131
139 void checkLatticeVectors() const;
140
141 using FilmIteratorBase<2,IteratorType>::setClassName;
142 using FilmIteratorBase<2,IteratorType>::normalVecId;
144
145 protected:
146
147 using FilmIteratorBase<2,IteratorType>::system;
148 using FilmIteratorBase<2,IteratorType>::iterator;
150
151 };
152
156 template <typename IteratorType>
157 class FilmIterator<3,IteratorType>
158 : public FilmIteratorBase<3,IteratorType>
159 {
160 public:
161
166
178 void setFlexibleParams();
179
187 void checkLatticeVectors() const;
188
189 using FilmIteratorBase<3,IteratorType>::setClassName;
190 using FilmIteratorBase<3,IteratorType>::normalVecId;
192
193 protected:
194
195 using FilmIteratorBase<3,IteratorType>::system;
196 using FilmIteratorBase<3,IteratorType>::iterator;
198
199 };
200
201} // namespace Pspc
202} // namespace Pscf
203#endif
Descriptor for a FilmIterator object.
IteratorType const & iterator() const
Return const reference to the real iterator within this FilmIterator.
int normalVecId() const
Get value of normalVecId.
virtual void setFlexibleParams()=0
Modifies flexibleParams_ to be compatible with thin film constraint.
virtual void checkLatticeVectors() const =0
Check that lattice vectors are compatible with thin film constraint.
Iterator for a thin film (empty base template).
Definition: FilmIterator.h:51
Base class for iterative solvers for SCF equations.
System< D > const & system() const
Get parent system by const reference.
int nFlexibleParams() const
Get the number of flexible lattice parameters.
Main class for SCFT simulation of one system.
Definition: pspc/System.h:76
void setClassName(const char *className)
Set class name string.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1