1#ifndef PRDC_UNIT_CELL_BASE_H
2#define PRDC_UNIT_CELL_BASE_H
11#include <pscf/math/RealVec.h>
12#include <pscf/math/IntVec.h>
13#include <util/containers/FArray.h>
14#include <util/containers/FMatrix.h>
15#include <util/containers/FSArray.h>
19 template <
typename T>
class Signal;
20 template <>
class Signal<void>;
272 void initializeToZero();
281 virtual void setBasis() = 0;
286 void computeDerivatives();
374 #ifndef PRDC_UNIT_CELL_BASE_TPP
An IntVec<D, T> is a D-component vector of elements of integer type T.
Base class template for a crystallographic unit cell.
bool isInitialized() const
Has this unit cell been initialized?
bool isInitialized_
Has this unit cell been fully initialized?
~UnitCellBase()
Destructor.
const RealVec< D > & rBasis(int i) const
Get Bravais basis vector i, denoted by a_i.
void setParameters(FSArray< double, 6 > const ¶meters)
Set all the parameters of unit cell.
void setSignal(Signal< void > &signal)
Associating an externally defined signal with this unit cell.
UnitCellBase()
Constructor.
const RealVec< D > & kBasis(int i) const
Get reciprocal basis vector i, denoted by b_i.
double drrBasis(int k, int i, int j) const
Get derivative of dot product ai.aj with respect to parameter k.
FArray< RealVec< D >, D > rBasis_
Array of Bravais lattice basis vectors.
FArray< FMatrix< double, D, D >, 6 > drBasis_
Array of derivatives of rBasis.
double dkkBasis(int k, int i, int j) const
Get derivative of dot product bi.bj with respect to parameter k.
FArray< RealVec< D >, D > kBasis_
Array of reciprocal lattice basis vectors.
Signal< void > & signal()
FSArray< double, 6 > parameters() const
Get the parameters of this unit cell.
double drBasis(int k, int i, int j) const
Get component j of derivative of rBasis vector a_i w/respect to k.
FArray< double, 6 > parameters_
Parameters used to describe the unit cell.
virtual double ksq(IntVec< D > const &k) const
Compute square magnitude of reciprocal lattice vector.
FArray< FMatrix< double, D, D >, 6 > dkBasis_
Array of derivatives of kBasis.
FArray< FMatrix< double, D, D >, 6 > drrBasis_
Array of derivatives of a_i.a_j.
bool hasSignal() const
Does this object have an associated Signal<void>?
double dkBasis(int k, int i, int j) const
Get component j of derivative of kBasis vector b_i w/respect to k.
void setLattice()
Compute all protected data, given latticeSystem and parameters.
virtual double dksq(IntVec< D > const &vec, int n) const
Compute derivative of square wavevector w/respect to cell parameter.
int nParameter_
Number of parameters required to specify unit cell.
double parameter(int i) const
Get a single parameter of this unit cell.
FArray< FMatrix< double, D, D >, 6 > dkkBasis_
Array of derivatives of b_i.b_j.
int nParameter() const
Get the number of parameters in the unit cell.
A RealVec<D, T> is D-component vector with elements of floating type T.
A fixed size (static) contiguous array template.
A fixed capacity (static) contiguous array with a variable logical size.
Notifier (or subject) in the Observer design pattern.
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.