TBTK
BravaisLattice.h
Go to the documentation of this file.
1 /* Copyright 2016 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_BRAVAIS_LATTICE
24 #define COM_DAFER45_TBTK_BRAVAIS_LATTICE
25 
26 #include <vector>
27 
28 namespace TBTK{
29 namespace Lattice{
30 
32 public:
35 
38 
40  inline int getNumLatticeVectors() const;
41 
43  inline int getNumAdditionalSites() const;
44 
46  const std::vector<double>& getLatticeVector(int n) const;
47 
49  const std::vector<double>& getAdditionalSite(int n) const;
50 
52  const std::vector<std::vector<double>>& getLatticeVectors() const;
53 
55  const std::vector<std::vector<double>>& getAdditionalSites() const;
56 
59  virtual void makePrimitive();
60 protected:
62  void setLatticeVectors(const std::vector<std::vector<double>> &latticeVectors);
63 
65  void setAdditionalSites(const std::vector<std::vector<double>> &additionalSites);
66 private:
68  std::vector<std::vector<double>> latticeVectors;
69 
71  std::vector<std::vector<double>> additionalSites;
72 };
73 
75  return latticeVectors.size();
76 }
77 
79  return additionalSites.size();
80 }
81 
82 inline const std::vector<double>& BravaisLattice::getLatticeVector(int n) const{
83  return latticeVectors.at(n);
84 }
85 
86 inline const std::vector<double>& BravaisLattice::getAdditionalSite(int n) const{
87  return additionalSites.at(n);
88 }
89 
90 inline const std::vector<std::vector<double>>& BravaisLattice::getLatticeVectors() const{
91  return latticeVectors;
92 }
93 
94 inline const std::vector<std::vector<double>>& BravaisLattice::getAdditionalSites() const{
95  return additionalSites;
96 }
97 
98 }; //End of namespace Lattice
99 }; //End of namespace TBTK
100 
101 #endif
const std::vector< double > & getLatticeVector(int n) const
Definition: BravaisLattice.h:82
Definition: BravaisLattice.h:31
void setAdditionalSites(const std::vector< std::vector< double >> &additionalSites)
Definition: ModelFactory.h:35
int getNumLatticeVectors() const
Definition: BravaisLattice.h:74
int getNumAdditionalSites() const
Definition: BravaisLattice.h:78
const std::vector< std::vector< double > > & getLatticeVectors() const
Definition: BravaisLattice.h:90
void setLatticeVectors(const std::vector< std::vector< double >> &latticeVectors)
const std::vector< std::vector< double > > & getAdditionalSites() const
Definition: BravaisLattice.h:94
const std::vector< double > & getAdditionalSite(int n) const
Definition: BravaisLattice.h:86