PSCF v1.2
TWave.h
1#ifndef PRDC_TWAVE_H
2#define PRDC_TWAVE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2022, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/math/IntVec.h>
12
13namespace Pscf {
14namespace Prdc {
15
16 using namespace Util;
17
23 template <int D>
24 struct TWave
25 {
26 double sqNorm;
27 double phase;
28 IntVec<D> indicesDft;
29 IntVec<D> indicesBz;
30 };
31
39 template <int D>
41
45 bool operator() (const TWave<D>& a, const TWave<D>& b) const
46 { return (a.sqNorm < b.sqNorm); }
47
48 };
49
57 template <int D>
58 struct TWaveDftComp {
59
63 bool operator() (const TWave<D>& a, const TWave<D>& b) const
64 { return (a.indicesDft < b.indicesDft); }
65
66 };
67
75 template <int D>
76 struct TWaveBzComp {
77
81 bool operator() (const TWave<D>& a, const TWave<D>& b) const
82 { return (a.indicesBz > b.indicesBz); }
83
84 };
85
86} // namespace Pscf::Prdc
87} // namespace Pscf
88#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
PSCF package top-level namespace.
Definition param_pc.dox:1
Utility classes for scientific computation.
Comparator for TWave objects, based on TWave::indicesBz.
Definition TWave.h:76
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.indicesBz > b.indicesBz.
Definition TWave.h:81
Comparator for TWave objects, based on TWave::indicesDft.
Definition TWave.h:58
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.indicesDft < b.indicesDft.
Definition TWave.h:63
Comparator for TWave objects, based on TWave::sqNorm.
Definition TWave.h:40
bool operator()(const TWave< D > &a, const TWave< D > &b) const
Function (a, b) returns true iff a.sqNorm < b.sqNorm.
Definition TWave.h:45
Simple wave struct for use within Basis construction.
Definition TWave.h:25