PSCF v1.1
|
Base class template for a crystallographic unit cell. More...
#include <UnitCellBase.h>
Public Member Functions | |
UnitCellBase () | |
Constructor. More... | |
~UnitCellBase () | |
Destructor. More... | |
void | setParameters (FSArray< double, 6 > const ¶meters) |
Set all the parameters of unit cell. More... | |
virtual double | ksq (IntVec< D > const &k) const |
Compute square magnitude of reciprocal lattice vector. More... | |
virtual double | dksq (IntVec< D > const &vec, int n) const |
Compute derivative of square wavevector w/respect to cell parameter. More... | |
int | nParameter () const |
Get the number of parameters in the unit cell. More... | |
FSArray< double, 6 > | parameters () const |
Get the parameters of this unit cell. More... | |
double | parameter (int i) const |
Get a single parameter of this unit cell. More... | |
const RealVec< D > & | rBasis (int i) const |
Get Bravais basis vector i, denoted by a_i. More... | |
const RealVec< D > & | kBasis (int i) const |
Get reciprocal basis vector i, denoted by b_i. More... | |
double | drBasis (int k, int i, int j) const |
Get component j of derivative of rBasis vector a_i w/respect to k. More... | |
double | dkBasis (int k, int i, int j) const |
Get component j of derivative of kBasis vector b_i w/respect to k. More... | |
double | drrBasis (int k, int i, int j) const |
Get derivative of dot product ai.aj with respect to parameter k. More... | |
double | dkkBasis (int k, int i, int j) const |
Get derivative of dot product bi.bj with respect to parameter k. More... | |
bool | isInitialized () const |
Has this unit cell been initialized? More... | |
Protected Member Functions | |
void | setLattice () |
Compute all private data, given latticeSystem and parameters. More... | |
Protected Attributes | |
FArray< RealVec< D >, D > | rBasis_ |
Array of Bravais lattice basis vectors. More... | |
FArray< RealVec< D >, D > | kBasis_ |
Array of reciprocal lattice basis vectors. More... | |
FArray< FMatrix< double, D, D >, 6 > | drBasis_ |
Array of derivatives of rBasis. More... | |
FArray< FMatrix< double, D, D >, 6 > | dkBasis_ |
Array of derivatives of kBasis. More... | |
FArray< FMatrix< double, D, D >, 6 > | drrBasis_ |
Array of derivatives of a_i.a_j. More... | |
FArray< FMatrix< double, D, D >, 6 > | dkkBasis_ |
Array of derivatives of b_i.b_j. More... | |
FArray< double, 6 > | parameters_ |
Parameters used to describe the unit cell. More... | |
int | nParameter_ |
Number of parameters required to specify unit cell. More... | |
bool | isInitialized_ |
Has this unit cell been fully initialized? More... | |
Base class template for a crystallographic unit cell.
Definition at line 29 of file UnitCellBase.h.
Pscf::UnitCellBase< D >::UnitCellBase |
Constructor.
Definition at line 322 of file UnitCellBase.h.
Pscf::UnitCellBase< D >::~UnitCellBase |
Destructor.
Definition at line 331 of file UnitCellBase.h.
void Pscf::UnitCellBase< D >::setParameters | ( | FSArray< double, 6 > const & | parameters | ) |
Set all the parameters of unit cell.
The lattice system must already be set to a non-null value.
parameters | array of unit cell parameters |
Definition at line 338 of file UnitCellBase.h.
References Util::FSArray< Data, Capacity >::size(), and UTIL_CHECK.
|
virtual |
Compute square magnitude of reciprocal lattice vector.
k | vector of components of a reciprocal lattice vector |
Definition at line 352 of file UnitCellBase.h.
References Pscf::Vec< D, T >::multiply().
Referenced by Pscf::Pspg::WaveList< D >::computeMinimumImages().
|
virtual |
Compute derivative of square wavevector w/respect to cell parameter.
This function computes and returns a derivative with respect to unit cell parameter number n of the square of a reciprocal lattice vector with integer coefficients given by the elements of vec.
vec | vector of components of a reciprocal lattice vector |
n | index of a unit cell parameter |
Definition at line 371 of file UnitCellBase.h.
|
inline |
Get the number of parameters in the unit cell.
Definition at line 243 of file UnitCellBase.h.
Referenced by Pscf::Pspg::WaveList< D >::allocate(), Pscf::Pspg::WaveList< D >::computedKSq(), Pscf::Pspg::WaveList< D >::computeMinimumImages(), Pscf::Pspc::FieldIo< D >::readFieldHeader(), Pscf::Pspg::FieldIo< D >::readFieldHeader(), Pscf::Pspg::Block< D >::setupUnitCell(), Pscf::Pspg::Mixture< D >::setupUnitCell(), and Pscf::Pspg::Polymer< D >::setupUnitCell().
|
inline |
Get the parameters of this unit cell.
Definition at line 251 of file UnitCellBase.h.
References Util::FSArray< Data, Capacity >::append().
|
inline |
Get a single parameter of this unit cell.
i | array index of the desired parameter |
Definition at line 265 of file UnitCellBase.h.
|
inline |
Get Bravais basis vector i, denoted by a_i.
i | array index of the desired Bravais basis vector |
Definition at line 273 of file UnitCellBase.h.
|
inline |
Get reciprocal basis vector i, denoted by b_i.
i | array index of the desired reciprocal basis vector |
Definition at line 281 of file UnitCellBase.h.
|
inline |
Get component j of derivative of rBasis vector a_i w/respect to k.
k | index of cell parameter |
i | index of the desired basis vector a_i |
j | index of a Cartesian component of a_i |
Definition at line 289 of file UnitCellBase.h.
|
inline |
Get component j of derivative of kBasis vector b_i w/respect to k.
k | index of cell parameter |
i | array index of the desired reciprocal basis vector b_i |
j | index of a Cartesian component of b_i |
Definition at line 297 of file UnitCellBase.h.
|
inline |
Get derivative of dot product ai.aj with respect to parameter k.
k | index of cell parameter |
i | array index of 1st Bravais basis vector a_i |
j | array index of 2nd Bravais basis vector a_i |
Definition at line 313 of file UnitCellBase.h.
|
inline |
Get derivative of dot product bi.bj with respect to parameter k.
k | index of cell parameter |
i | array index of 1st reciprocal basis vector b_i |
j | array index of 2nd reciprocal basis vector b_i |
Definition at line 305 of file UnitCellBase.h.
Referenced by Pscf::Pspg::WaveList< D >::computedKSq().
|
inline |
Has this unit cell been initialized?
Definition at line 141 of file UnitCellBase.h.
References Pscf::UnitCellBase< D >::isInitialized_.
Referenced by Pscf::Pspg::WaveList< D >::computedKSq(), Pscf::Pspg::WaveList< D >::computeMinimumImages(), Pscf::Pspc::FieldIo< D >::readFieldHeader(), and Pscf::Pspg::FieldIo< D >::readFieldHeader().
|
protected |
Compute all private data, given latticeSystem and parameters.
Calls initializeToZero, setBasis, computeDerivatives internally.
Definition at line 460 of file UnitCellBase.h.
|
protected |
Array of Bravais lattice basis vectors.
Definition at line 149 of file UnitCellBase.h.
|
protected |
Array of reciprocal lattice basis vectors.
Definition at line 154 of file UnitCellBase.h.
|
protected |
Array of derivatives of rBasis.
Element drBasis_[k](i,j) is the derivative with respect to parameter k of component j of Bravais basis vector i.
Definition at line 162 of file UnitCellBase.h.
|
protected |
Array of derivatives of kBasis.
Element dkBasis_[k](i,j) is the derivative with respect to parameter k of component j of reciprocal basis vector i.
Definition at line 170 of file UnitCellBase.h.
|
protected |
Array of derivatives of a_i.a_j.
Element drrBasis_[k](i,j) is the derivative with respect to parameter k of the dot product (a_i.a_j) of Bravais lattice basis vectors a_i and a_j.
Definition at line 179 of file UnitCellBase.h.
|
protected |
Array of derivatives of b_i.b_j.
Element dkkBasis_[k](i,j) is the derivative with respect to parameter k of the dot product (b_i.b_j) of reciprocal lattice basis vectors b_i and b_j.
Definition at line 188 of file UnitCellBase.h.
|
protected |
Parameters used to describe the unit cell.
Definition at line 193 of file UnitCellBase.h.
Referenced by Pscf::UnitCell< 1 >::operator=(), Pscf::UnitCell< 2 >::operator=(), and Pscf::UnitCell< 3 >::operator=().
|
protected |
Number of parameters required to specify unit cell.
Definition at line 198 of file UnitCellBase.h.
Referenced by Pscf::UnitCell< 1 >::operator=(), Pscf::UnitCell< 2 >::operator=(), and Pscf::UnitCell< 3 >::operator=().
|
protected |
Has this unit cell been fully initialized?
Definition at line 203 of file UnitCellBase.h.
Referenced by Pscf::UnitCellBase< D >::isInitialized().