PSCF v1.1
|
Container for wavevector data. More...
#include <WaveList.h>
Public Member Functions | |
WaveList () | |
Constructor. More... | |
~WaveList () | |
Destructor. More... | |
void | allocate (Mesh< D > const &mesh, UnitCell< D > const &unitCell) |
Allocate memory for all arrays. More... | |
void | computeMinimumImages (Mesh< D > const &mesh, UnitCell< D > const &unitCell) |
Compute minimum images of wavevectors. More... | |
void | computeKSq (UnitCell< D > const &unitCell) |
Compute square norm |k|^2 for all wavevectors. More... | |
void | computedKSq (UnitCell< D > const &unitCell) |
Compute derivatives of |k|^2 w/ respect to unit cell parameters. More... | |
const IntVec< D > & | minImage (int i) const |
Get the minimum image vector for a specified wavevector. More... | |
cudaReal * | kSq () const |
Get a pointer to the kSq array on device. More... | |
cudaReal * | dkSq () const |
Get a pointer to the dkSq array on device. More... | |
int | kSize () const |
Get size of k-grid (number of wavewavectors). More... | |
Container for wavevector data.
Definition at line 31 of file WaveList.h.
Pscf::Pspg::WaveList< D >::WaveList |
Constructor.
Definition at line 79 of file WaveList.tpp.
Pscf::Pspg::WaveList< D >::~WaveList |
Destructor.
Definition at line 103 of file WaveList.tpp.
void Pscf::Pspg::WaveList< D >::allocate | ( | Mesh< D > const & | mesh, |
UnitCell< D > const & | unitCell | ||
) |
Allocate memory for all arrays.
Call in readParameters.
mesh | spatial discretization mesh (input) |
unitCell | crystallographic unit cell (input) |
Definition at line 117 of file WaveList.tpp.
References Pscf::Mesh< D >::dimension(), Pscf::Mesh< D >::dimensions(), Pscf::UnitCellBase< D >::nParameter(), Pscf::Mesh< D >::size(), and UTIL_CHECK.
void Pscf::Pspg::WaveList< D >::computeMinimumImages | ( | Mesh< D > const & | mesh, |
UnitCell< D > const & | unitCell | ||
) |
Compute minimum images of wavevectors.
This is only done once, at beginning, using mesh and the initial unit cell. This can also be called in the readParameters function.
mesh | spatial discretization Mesh<D> object |
unitCell | crystallographic UnitCell<D> object |
Definition at line 172 of file WaveList.tpp.
References Pscf::MeshIterator< D >::atEnd(), Pscf::MeshIterator< D >::begin(), Pscf::Mesh< D >::dimension(), Pscf::Mesh< D >::dimensions(), Pscf::UnitCellBase< D >::isInitialized(), Pscf::UnitCellBase< D >::ksq(), Pscf::UnitCellBase< D >::nParameter(), Pscf::MeshIterator< D >::position(), Pscf::MeshIterator< D >::rank(), Pscf::Mesh< D >::rank(), Pscf::Mesh< D >::shift(), Pscf::Mesh< D >::size(), and UTIL_CHECK.
void Pscf::Pspg::WaveList< D >::computeKSq | ( | UnitCell< D > const & | unitCell | ) |
Compute square norm |k|^2 for all wavevectors.
Called once per iteration with unit cell relaxation. Implementation can copy geometric data (rBasis, kBasis, etc.) into local data structures and implement the actual calculation of kSq or dKSq for each wavevector on the GPU.
unitCell | crystallographic UnitCell<D> |
Definition at line 280 of file WaveList.tpp.
void Pscf::Pspg::WaveList< D >::computedKSq | ( | UnitCell< D > const & | unitCell | ) |
Compute derivatives of |k|^2 w/ respect to unit cell parameters.
Called once per iteration with unit cell relaxation.
unitCell | crystallographic UnitCell<D> |
Definition at line 285 of file WaveList.tpp.
References Pscf::UnitCellBase< D >::dkkBasis(), Pscf::UnitCellBase< D >::isInitialized(), Pscf::UnitCellBase< D >::nParameter(), Pscf::Pspg::ThreadGrid::setThreadsLogical(), and UTIL_CHECK.
|
inline |
Get the minimum image vector for a specified wavevector.
i | index for wavevector |
Definition at line 151 of file WaveList.h.
|
inline |
Get a pointer to the kSq array on device.
Definition at line 155 of file WaveList.h.
|
inline |
Get a pointer to the dkSq array on device.
Definition at line 159 of file WaveList.h.
Referenced by Pscf::Pspg::Block< D >::computeStress().
|
inline |
Get size of k-grid (number of wavewavectors).
Definition at line 163 of file WaveList.h.