10#include <pscf/math/IntVec.h>
11#include <pscf/mesh/Mesh.h>
12#include <util/containers/DArray.h>
13#include <util/containers/GArray.h>
17 template <
int D>
class UnitCell;
18 template <
int D>
class SpaceGroup;
426 friend class Basis<D>;
605 std::string groupName);
613 void outputWaves(std::ostream& out,
bool outputAll =
false)
const;
621 void outputStars(std::ostream& out,
bool outputAll =
false)
const;
660 Wave
const &
wave(
int id)
const;
669 Star
const &
star(
int id)
const;
783 {
return *meshPtr_; }
788 UnitCell<D>
const & unitCell()
const
789 {
return *unitCellPtr_; }
801 {
return nBasisWave_; }
810 {
return waves_[id]; }
815 {
return stars_[id]; }
820 {
return stars_[starIds_[id]]; }
825 meshPtr_->shift(vector);
826 int rank = mesh().rank(vector);
827 return waveIds_[rank];
832 {
return isInitialized_; }
834 #ifndef PSCF_BASIS_TPP
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.
IntVec< D > waveBz
Integer indices indexBz of a characteristic wave of this star.
int endId
Wave index of last wavevector in star.
int basisId
Index of basis function associated with this 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.
IntVec< D > indicesBz
Integer indices of wave, in first Brillouin zone.
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 starId
Index of the star that contains this wavevector.
IntVec< D > indicesDft
Integer indices of wave, on a discrete Fourier transform mesh.
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 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.
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.
Basis()
Default constructor.
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.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.