1#ifndef PRDC_UNIT_CELL_H
2#define PRDC_UNIT_CELL_H
11#include "UnitCellBase.h"
12#include <util/format/Dbl.h>
93 template <
class Archive,
int D>
95 serialize(Archive& ar,
UnitCell<D>& cell,
const unsigned int version);
167 double volume()
const;
174 LatticeSystem lattice_;
177 void setNParameter();
193 template <
class Archive,
int D>
194 friend void serialize(Archive& ,
UnitCell<D>& ,
const unsigned int);
233 template <
class Archive>
236 const unsigned int version)
312 double volume()
const;
317 LatticeSystem lattice_;
320 void setNParameter();
336 template <
class Archive,
int D>
337 friend void serialize(Archive& ,
UnitCell<D>& ,
const unsigned int );
375 template <
class Archive>
378 const unsigned int version)
401 Triclinic, Rhombohedral, Hexagonal, Null};
457 double volume()
const;
461 LatticeSystem lattice_;
464 void setNParameter();
480 template <
class Archive,
int D>
481 friend void serialize(Archive& ,
UnitCell<D>& ,
const unsigned int);
518 template <
class Archive,
int D>
520 const unsigned int version)
536 template <
class Archive>
539 const unsigned int version)
563 out << cell.lattice_;
570 #ifndef PRDC_UNIT_CELL_TPP
577 extern std::ostream&
operator << (std::ostream& out,
579 extern std::ostream&
operator << (std::ostream& out,
581 extern std::ostream&
operator << (std::ostream& out,
584 extern std::istream&
operator >> (std::istream& in,
586 extern std::istream&
operator >> (std::istream& in,
588 extern std::istream&
operator >> (std::istream& in,
Base class template for a crystallographic unit cell.
bool isInitialized() const
Has this unit cell been initialized?
UnitCellBase()
Constructor.
FSArray< double, 6 > parameters() const
Get the parameters of this unit cell.
FArray< double, 6 > parameters_
Parameters used to describe the unit cell.
void setLattice()
Compute all protected data, given latticeSystem and parameters.
int nParameter_
Number of parameters required to specify unit cell.
friend void serialize(Archive &, UnitCell< D > &, const unsigned int)
Serialize to/from an archive.
LatticeSystem lattice() const
Return lattice system enumeration value.
LatticeSystem
Enumeration of 1D lattice system types.
LatticeSystem
Enumeration of 2D lattice system types.
LatticeSystem lattice() const
Return lattice system enumeration value.
LatticeSystem
Enumeration of the 7 possible 3D Bravais lattice systems.
LatticeSystem lattice() const
Return lattice system enumeration value.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Wrapper for a double precision number, for formatted ostream output.
A fixed capacity (static) contiguous array with a variable logical size.
void readUnitCellHeader(std::istream &in, UnitCell< D > &cell)
Read UnitCell<D> from a field file header (fortran PSCF format).
void writeUnitCellHeader(std::ostream &out, UnitCell< D > const &cell)
Write UnitCell<D> to a field file header (fortran PSCF format).
void serializeEnum(Archive &ar, T &data, const unsigned int version=0)
Serialize an enumeration value.
Periodic fields and crystallography.
PSCF package top-level namespace.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.