PSCF v1.1
TWave.h
1#ifndef PSSP_TWAVE_H
2#define PSSP_TWAVE_H
3/*
4* PSCF - Polymer Self-Consistent Field Theory
5*
6* Copyright 2016 - 2022, The Regents of the University of Minnesota
7* Distributed under the terms of the GNU General Public License.
8*/
9
10#include <pscf/math/IntVec.h>
11
12namespace Pscf {
13
14 using namespace Util;
15
21 template <int D>
22 struct TWave
23 {
24 double sqNorm;
25 double phase;
26 IntVec<D> indicesDft;
27 IntVec<D> indicesBz;
28 };
29
37 template <int D>
39
43 bool operator() (const TWave<D>& a, const TWave<D>& b) const
44 { return (a.sqNorm < b.sqNorm); }
45
46 };
47
55 template <int D>
56 struct TWaveDftComp {
57
61 bool operator() (const TWave<D>& a, const TWave<D>& b) const
62 { return (a.indicesDft < b.indicesDft); }
63
64 };
65
73 template <int D>
74 struct TWaveBzComp {
75
79 bool operator() (const TWave<D>& a, const TWave<D>& b) const
80 { return (a.indicesBz > b.indicesBz); }
81
82 };
83
84} // namespace Pscf
85#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition: IntVec.h:27
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1
Comparator for TWave objects, based on TWave::indicesBz.
Definition: TWave.h:74
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.indicesBz > b.indicesBz.
Definition: TWave.h:79
Comparator for TWave objects, based on TWave::indicesDft.
Definition: TWave.h:56
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.indicesDft < b.indicesDft.
Definition: TWave.h:61
Comparator for TWave objects, based on TWave::sqNorm.
Definition: TWave.h:38
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.sqNorm < b.sqNorm.
Definition: TWave.h:43
Simple wave struct for use within Basis construction.
Definition: TWave.h:23