PSCF v1.4.0
sortWaves.h
1#ifndef PRDC_SORT_WAVES_H
2#define PRDC_SORT_WAVES_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/Sort.h>
12#include <pscf/math/IntVec.h>
13#include <util/containers/GArray.h>
14#include <vector>
15
16// Forward declarations
17namespace Pscf {
18 namespace Prdc {
19 template <int D> class UnitCell;
20 }
21}
22
23namespace Pscf {
24namespace Prdc {
25
26 using namespace Prdc;
27
61 template <int D>
62 void sortWaves(UnitCell<D> const & cell,
63 IntVec<D> const & meshDimensions,
64 std::vector< Sort::Item<double> >& items,
65 GArray< Sort::Bunch >& bunches,
66 double epsilon,
67 bool isRealField = true);
68
69 // Explicit instantiation declarations
70 extern template
71 void sortWaves<1>(UnitCell<1> const &, IntVec<1> const &,
72 std::vector< Sort::Item<double> >& ,
73 GArray< Sort::Bunch >& , double, bool);
74
75 extern template
76 void sortWaves<2>(UnitCell<2> const &, IntVec<2> const &,
77 std::vector< Sort::Item<double> >& ,
78 GArray< Sort::Bunch >& , double, bool);
79
80 extern template
81 void sortWaves<3>(UnitCell<3> const &, IntVec<3> const &,
82 std::vector< Sort::Item<double> >& ,
83 GArray< Sort::Bunch >& , double, bool);
84
85}
86}
87#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
Base template for UnitCell<D> classes, D=1, 2 or 3.
Definition UnitCell.h:56
An automatically growable array, analogous to a std::vector.
Definition GArray.h:34
void sortWaves(UnitCell< D > const &cell, IntVec< D > const &meshDimensions, std::vector< Sort::Item< double > > &items, GArray< Sort::Bunch > &bunches, double epsilon, bool isRealField)
Sorted waves and identify bunches of equal magnitude.
Definition sortWaves.cpp:27
Periodic fields and crystallography.
Definition complex.cpp:11
PSCF package top-level namespace.