10#include <pscf/math/IntVec.h>
11#include <pscf/mesh/Mesh.h>
12#include <util/containers/DArray.h>
13#include <util/containers/GArray.h>
14#include <util/signal/Signal.h>
18 template <
typename T>
class Signal;
19 template <>
class Signal<void>;
469 friend class Basis<D>;
656 std::string groupName);
675 void outputWaves(std::ostream& out,
bool outputAll =
false)
const;
683 void outputStars(std::ostream& out,
bool outputAll =
false)
const;
712 Wave
const &
wave(
int id)
const;
721 Star
const &
star(
int id)
const;
850 {
return *meshPtr_; }
855 UnitCell<D>
const & unitCell()
const
856 {
return *unitCellPtr_; }
868 {
return nBasisWave_; }
877 {
return waves_[id]; }
882 {
return stars_[id]; }
887 {
return stars_[starIds_[id]]; }
892 meshPtr_->shift(vector);
893 int rank = mesh().rank(vector);
894 return waveIds_[rank];
899 {
return isInitialized_; }
901 #ifndef PRDC_BASIS_TPP
An IntVec<D, T> is a D-component vector of elements of integer type T.
Description of a regular grid of points in a periodic domain.
A list of wavevectors that are related by space-group symmetries.
int basisId
Index of basis function associated with this star.
IntVec< D > waveBz
Integer indices indicesBz of a characteristic wave of this star.
int invertFlag
Index for inversion symmetry of star.
int size
Number of wavevectors in this star.
int endId
Wave index of first wavevector of the next star.
int beginId
Wave index of first wavevector in star.
int starId
Index of this star in ordered array of all stars.
bool cancel
Is this star cancelled, i.e., associated with a zero function?
Wavevector used to construct a basis function.
std::complex< double > coeff
Coefficient of wave within the associated star basis function.
int starId
Index of the star that contains this wavevector.
IntVec< D > indicesDft
Integer indices of wave, on a discrete Fourier transform mesh.
int inverseId
Index of the wave that is the inverse of this wavevector.
IntVec< D > indicesBz
Integer indices of wave, in first Brillouin zone.
bool implicit
Is this wave represented implicitly in DFT of real field?
Symmetry-adapted Fourier basis for pseudo-spectral SCFT.
Wave const & wave(int id) const
Get a specific Wave, access by integer index.
int nBasis() const
Total number of nonzero symmetry-adapted basis functions.
int waveId(IntVec< D > vector) const
Get the integer index of a wave, as required by wave(int id).
int nStar() const
Total number of stars.
bool isInitialized() const
Returns true iff this basis is fully initialized.
void makeBasis(Mesh< D > const &mesh, UnitCell< D > const &unitCell, SpaceGroup< D > const &group)
Construct basis for a specific mesh and space group.
Signal< void > & signal()
Get a Signal that is triggered by basis initialization.
void outputWaves(std::ostream &out, bool outputAll=false) const
Print a list of all waves to an output stream.
int nWave() const
Total number of wavevectors.
int nBasisWave() const
Total number of wavevectors in uncancelled stars.
Star const & star(int id) const
Get a Star, accessed by integer star index.
bool isValid() const
Returns true if this basis is valid, false otherwise.
void outputStars(std::ostream &out, bool outputAll=false) const
Print a list of all stars to an output stream.
Star const & basisFunction(int id) const
Get an uncancelled Star, accessed by basis function index.
Crystallographic space group.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Dynamically allocatable contiguous array template.
An automatically growable array, analogous to a std::vector.
Notifier (or subject) in the Observer design pattern.
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.