PSCF v1.4.0
BWave.h
1#ifndef PRDC_BWAVE_H
2#define PRDC_BWAVE_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 <pscf/math/IntVec.h>
12
13namespace Pscf {
14namespace Prdc {
15
16 using namespace Util;
17
23 template <int D>
24 struct BWave
25 {
26 double sqNorm;
27 double phase;
28 IntVec<D> indicesStd;
29 IntVec<D> indicesMin;
30 };
31
39 template <int D>
41
45 bool operator() (const BWave<D>& a, const BWave<D>& b) const
46 { return (a.sqNorm < b.sqNorm); }
47
48 };
49
57 template <int D>
58 struct BWaveStdComp {
59
63 bool operator() (const BWave<D>& a, const BWave<D>& b) const
64 { return (a.indicesStd < b.indicesStd); }
65
66 };
67
75 template <int D>
76 struct BWaveMinComp {
77
81 bool operator() (const BWave<D>& a, const BWave<D>& b) const
82 { return (a.indicesMin > b.indicesMin); }
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
Periodic fields and crystallography.
Definition complex.cpp:11
PSCF package top-level namespace.
Comparator for BWave objects, based on BWave::indicesMin.
Definition BWave.h:76
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.indicesMin > b.indicesMin.
Definition BWave.h:81
Comparator for BWave objects, based on BWave::sqNorm.
Definition BWave.h:40
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.sqNorm < b.sqNorm.
Definition BWave.h:45
Comparator for BWave objects, based on BWave::indicesStd.
Definition BWave.h:58
bool operator()(const BWave< D > &a, const BWave< D > &b) const
Function (a, b) returns true iff a.indicesStd < b.indicesStd.
Definition BWave.h:63
Wave struct designed for use within Basis construction.
Definition BWave.h:25