TBTK
ReciprocalLattice.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 
24 #ifndef COM_DAFER45_TBTK_RECIPROCAL_LATTICE
25 #define COM_DAFER45_TBTK_RECIPROCAL_LATTICE
26 
27 #include "TBTK/Model.h"
28 #include "TBTK/StateTreeNode.h"
29 #include "TBTK/UnitCell.h"
30 
31 #include <initializer_list>
32 #include <vector>
33 
34 namespace TBTK{
35 
68 public:
70  ReciprocalLattice(UnitCell *unitCell/*, std::initializer_list<int> size*/);
71 
74 
76  Model* generateModel(std::initializer_list<double> momentum) const;
77 
79  Model* generateModel(std::vector<double> momentum) const;
80 
83  const std::vector<std::vector<double>> &momentums,
84  const std::vector<Index> &blockIndices
85  ) const;
86 
88  const std::vector<std::vector<double>>& getReciprocalLatticeVectors() const;
89 
91  unsigned int getNumBands() const;
92 private:
94  UnitCell *unitCell;
95 
100  StateSet *realSpaceEnvironment;
101 
103  StateTreeNode *realSpaceEnvironmentStateTree;
104 
109  StateSet *realSpaceReferenceCell;
110 
112  std::vector<std::vector<double>> reciprocalLatticeVectors;
113 
116  static constexpr double ROUNDOFF_MARGIN_MULTIPLIER = 1.01;
117 
119  void setupReciprocalLatticeVectors(const UnitCell *unitCell);
120 
122  void setupRealSpaceEnvironment(const UnitCell *unitCell);
123 };
124 
125 inline const std::vector<std::vector<double>>& ReciprocalLattice::getReciprocalLatticeVectors() const{
126  return reciprocalLatticeVectors;
127 }
128 
129 inline unsigned int ReciprocalLattice::getNumBands() const{
130  return unitCell->getNumStates();
131 }
132 
133 }; //End of namespace TBTK
134 
135 #endif
Tree structure for quick access of multiple States.
Definition: StateTreeNode.h:38
Unit cell that act as container of States.
const std::vector< std::vector< double > > & getReciprocalLatticeVectors() const
Definition: ReciprocalLattice.h:125
Definition: ReciprocalLattice.h:67
Container of Model related information.
Model * generateModel(std::initializer_list< double > momentum) const
unsigned int getNumBands() const
Definition: ReciprocalLattice.h:129
Definition: UnitCell.h:30
ReciprocalLattice(UnitCell *unitCell)
Definition: ModelFactory.h:35
Definition: StateSet.h:30
Container of Model related information.
Definition: Model.h:52
unsigned int getNumStates() const
Definition: StateSet.h:67