PSCF v1.1
|
2D crystal unit cell. More...
#include <UnitCell.h>
Public Types | |
enum | LatticeSystem |
Enumeration of 2D lattice system types. More... | |
Public Member Functions | |
UnitCell () | |
Constructor. More... | |
UnitCell< 2 > & | operator= (const UnitCell< 2 > &other) |
Assignment operator. More... | |
void | set (UnitCell< 2 >::LatticeSystem lattice) |
Set the lattice system, but not unit cell parameters. More... | |
void | set (UnitCell< 2 >::LatticeSystem lattice, FSArray< double, 6 > const ¶meters) |
Set the unit cell state (lattice system and parameters). More... | |
LatticeSystem | lattice () const |
Return lattice system enumeration value. More... | |
![]() | |
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... | |
Friends | |
template<int D> | |
std::istream & | operator>> (std::istream &, UnitCell< D > &) |
istream input extractor for a UnitCell<D>. More... | |
template<int D> | |
std::ostream & | operator<< (std::ostream &, UnitCell< D > const &) |
ostream output inserter for a UnitCell<D>. More... | |
template<class Archive , int D> | |
void | serialize (Archive &, UnitCell< D > &, const unsigned int) |
Serialize to/from an archive. More... | |
template<int D> | |
void | readUnitCellHeader (std::istream &, UnitCell< D > &) |
Read UnitCell<D> from a field file header (fortran PSCF format). More... | |
template<int D> | |
void | writeUnitCellHeader (std::ostream &, UnitCell< D > const &) |
Write UnitCell<D> to a field file header (fortran PSCF format). More... | |
Additional Inherited Members | |
![]() | |
void | setLattice () |
Compute all private data, given latticeSystem and parameters. More... | |
![]() | |
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... | |
2D crystal unit cell.
Definition at line 274 of file UnitCell.h.
enum Pscf::UnitCell< 2 >::LatticeSystem |
Enumeration of 2D lattice system types.
Definition at line 281 of file UnitCell.h.
Pscf::UnitCell< 2 >::UnitCell | ( | ) |
Constructor.
Definition at line 19 of file UnitCell2.cpp.
UnitCell< 2 > & Pscf::UnitCell< 2 >::operator= | ( | const UnitCell< 2 > & | other | ) |
Assignment operator.
other | UnitCell<2> object to be cloned. |
Definition at line 215 of file UnitCell2.cpp.
References Pscf::UnitCellBase< D >::nParameter_, Pscf::UnitCellBase< D >::parameters_, and UTIL_CHECK.
void Pscf::UnitCell< 2 >::set | ( | UnitCell< 2 >::LatticeSystem | lattice | ) |
Set the lattice system, but not unit cell parameters.
Upon return, values of lattice and nParameter are set.
lattice | lattice system enumeration value |
Definition at line 231 of file UnitCell2.cpp.
void Pscf::UnitCell< 2 >::set | ( | UnitCell< 2 >::LatticeSystem | lattice, |
FSArray< double, 6 > const & | parameters | ||
) |
Set the unit cell state (lattice system and parameters).
lattice | lattice system enumeration value |
parameters | array of unit cell parameters |
Definition at line 241 of file UnitCell2.cpp.
|
inline |
Return lattice system enumeration value.
This value is initialized to Null during construction.
Definition at line 319 of file UnitCell.h.
|
friend |
istream input extractor for a UnitCell<D>.
in | input stream |
cell | UnitCell<D> to be read |
Definition at line 22 of file UnitCell.tpp.
|
friend |
ostream output inserter for a UnitCell<D>.
out | output stream |
cell | UnitCell<D> to be written |
Definition at line 36 of file UnitCell.tpp.
|
friend |
Serialize to/from an archive.
ar | input or output archive |
cell | UnitCell<D> object to be serialized |
version | archive version id |
Definition at line 50 of file UnitCell.tpp.
|
friend |
Read UnitCell<D> from a field file header (fortran PSCF format).
If the unit cell has a non-null lattice system on entry, the value read from file must match this existing value, or this function throws an exception. If the lattice system is null on entry, the lattice system value is read from file. In either case, unit cell parameters (dimensions and angles) are updated using values read from file.
in | input stream |
cell | UnitCell<D> to be read |
Definition at line 61 of file UnitCell.tpp.
|
friend |
Write UnitCell<D> to a field file header (fortran PSCF format).
out | output stream |
cell | UnitCell<D> to be written |
Definition at line 91 of file UnitCell.tpp.