PSCF v1.5.0
BWave.h
1#ifndef PSCF_BWAVE_H
2#define PSCF_BWAVE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/math/IntVec.h>
12
13namespace Pscf {
14
15 using namespace Util;
16
22 template <int D>
23 struct BWave
24 {
25 double sqNorm;
26 double phase;
27 IntVec<D> indicesStd;
28 IntVec<D> indicesMin;
29 };
30
38 template <int D>
40
44 bool operator() (const BWave<D>& a, const BWave<D>& b) const
45 { return (a.sqNorm < b.sqNorm); }
46
47 };
48
56 template <int D>
57 struct BWaveStdComp {
58
62 bool operator() (const BWave<D>& a, const BWave<D>& b) const
63 { return (a.indicesStd < b.indicesStd); }
64
65 };
66
74 template <int D>
75 struct BWaveMinComp {
76
80 bool operator() (const BWave<D>& a, const BWave<D>& b) const
81 { return (a.indicesMin > b.indicesMin); }
82
83 };
84
85} // namespace Pscf
86#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.
Comparator for BWave objects, based on BWave::indicesMin.
Definition BWave.h:75
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.indicesMin > b.indicesMin.
Definition BWave.h:80
Comparator for BWave objects, based on BWave::sqNorm.
Definition BWave.h:39
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.sqNorm < b.sqNorm.
Definition BWave.h:44
Comparator for BWave objects, based on BWave::indicesStd.
Definition BWave.h:57
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.indicesStd < b.indicesStd.
Definition BWave.h:62
Wave struct designed for use within Basis construction.
Definition BWave.h:24