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>;
470 friend class Basis<D>;
657 std::string groupName);
676 void outputWaves(std::ostream& out,
bool outputAll =
false)
const;
684 void outputStars(std::ostream& out,
bool outputAll =
false)
const;
713 Wave
const &
wave(
int id)
const;
722 Star
const &
star(
int id)
const;
851 {
return *meshPtr_; }
856 UnitCell<D>
const & unitCell()
const
857 {
return *unitCellPtr_; }
869 {
return nBasisWave_; }
878 {
return waves_[id]; }
883 {
return stars_[id]; }
888 {
return stars_[starIds_[id]]; }
893 meshPtr_->shift(vector);
894 int rank = mesh().rank(vector);
895 return waveIds_[rank];
900 {
return isInitialized_; }
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 > waveMin
Integer indices indicesMin 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 > indicesMin
Integer indices of wave, in first Brillouin zone.
int inverseId
Index of the wave that is the inverse of this wavevector.
IntVec< D > indicesStd
Integer indices of wave, on a discrete Fourier transform mesh.
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.