Simpatico  v1.10
LatticeSystem.h
1 #ifndef UTIL_LATTICE_SYSTEM_H
2 #define UTIL_LATTICE_SYSTEM_H
3 
4 /*
5 * Util Package - C++ Utilities for Scientific Computation
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/archives/serialize.h>
12 #ifdef UTIL_MPI
13 #include <util/mpi/MpiTraits.h>
14 #endif
15 
16 #include <iostream>
17 
18 namespace Util
19 {
20 
29  enum LatticeSystem {Cubic, Tetragonal, Orthorhombic,
30  Monoclinic, Triclinic, Rhombohedral, Hexagonal};
31 
32 
40  std::istream& operator >> (std::istream& in, LatticeSystem& lattice);
41 
49  std::ostream& operator << (std::ostream& out, LatticeSystem lattice);
50 
58  template <class Archive>
59  void serialize(Archive& ar, LatticeSystem& lattice, const unsigned int version)
60  { serializeEnum(ar, lattice, version); }
61 
62  #ifdef UTIL_MPI
63 
66  template <>
68  {
69  public:
70  static MPI::Datatype type;
71  static bool hasType;
72  };
73  #endif
74 
75 }
76 #endif
static MPI::Datatype type
MPI Datatype.
Definition: LatticeSystem.h:70
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.
Definition: Pair.h:57
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
Definition: Pair.h:44
Utility classes for scientific computation.
Definition: accumulators.mod:1
Default MpiTraits class.
Definition: MpiTraits.h:39
void serializeEnum(Archive &ar, T &data, const unsigned int version=0)
Serialize an enumeration value.
Definition: serialize.h:42
static bool hasType
Is the MPI type initialized?
Definition: LatticeSystem.h:71
LatticeSystem
Enumeration of the 7 possible Bravais lattice systems.
Definition: LatticeSystem.h:29