10#include <pscf/math/IntVec.h>
11#include <pscf/mesh/Mesh.h>
12#include <pscf/crystal/UnitCell.h>
13#include <util/containers/DArray.h>
14#include <util/containers/GArray.h>
15#include <util/signal/Signal.h>
19 template <
typename T>
class Signal;
20 template <>
class Signal<void>;
482 friend class Basis<D>;
677 std::string groupName);
696 void outputWaves(std::ostream& out,
bool outputAll =
false)
const;
704 void outputStars(std::ostream& out,
bool outputAll =
false)
const;
733 Wave
const &
wave(
int id)
const;
742 Star
const &
star(
int id)
const;
883 {
return *meshPtr_; }
889 template <
int D>
inline
893 template <
int D>
inline
895 {
return nBasisWave_; }
897 template <
int D>
inline
901 template <
int D>
inline
903 {
return waves_[id]; }
905 template <
int D>
inline
907 {
return stars_[id]; }
909 template <
int D>
inline
911 {
return stars_[starIds_[id]]; }
913 template <
int D>
inline
916 meshPtr_->shift(vector);
917 int rank = mesh().rank(vector);
918 return waveIds_[rank];
921 template <
int D>
inline
923 {
return unitCell_; }
925 template <
int D>
inline
927 {
return isInitialized_; }
A list of wavevectors that are related by space-group symmetries.
int size
Number of wavevectors in this star.
int invertFlag
Index for inversion symmetry of star.
int endId
Wave index of the first wavevector of the next star.
int basisId
Index of basis function associated with this star.
int beginId
Wave index of the first wavevector in this 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?
IntVec< D > waveMin
Minimal indices of the root wave of this star.
Wavevector used to construct a basis function.
IntVec< D > indicesStd
Integer indices of wave, in standard form.
bool implicit
Is this wave represented implicitly in DFT of real field?
std::complex< double > coeff
Coefficient of wave within the associated star basis function.
int inverseId
Index of the wave that is the inverse of this wavevector.
int starId
Index of the star that contains this wavevector.
IntVec< D > indicesMin
Integer indices of wave, for minimal image.
Symmetry-adapted Fourier basis for pseudo-spectral SCFT.
bool isInitialized() const
Returns true iff this basis is fully initialized.
int nBasis() const
Total number of nonzero symmetry-adapted basis functions.
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.
int nBasisWave() const
Total number of wavevectors in uncancelled stars.
int nWave() const
Total number of wavevectors.
void outputStars(std::ostream &out, bool outputAll=false) const
Print a list of all stars to an output stream.
void makeBasis(Mesh< D > const &mesh, UnitCell< D > const &unitCell, SpaceGroup< D > const &group)
Construct basis for a specific mesh and space group.
UnitCell< D > const & unitCell() const
Get the unit cell from which this basis was constructed.
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.
Signal< void > & signal()
Get a Signal that is triggered by basis initialization.
Wave const & wave(int id) const
Get a specific Wave, access by integer index.
Star const & basisFunction(int id) const
Get an uncancelled Star, accessed by basis function index.
void outputWaves(std::ostream &out, bool outputAll=false) const
Print a list of all waves to an output stream.
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.
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.
PSCF package top-level namespace.
Utility classes for scientific computation.