TBTK
ModelFactory.h
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_MODEL_FACTORY
24 #define COM_DAFER45_TBTK_MODEL_FACTORY
25 
26 #include "TBTK/Geometry.h"
27 #include "TBTK/Model.h"
28 #include "TBTK/StateSet.h"
29 #include "TBTK/StateTreeNode.h"
30 #include "TBTK/UnitCell.h"
31 
32 #include <complex>
33 #include <initializer_list>
34 
35 namespace TBTK{
36 
38 public:
49  static Model* createSquareLattice(
50  std::initializer_list<int> size,
51  std::initializer_list<bool> periodic,
52  std::complex<double> t
53  );
54 
67  std::initializer_list<int> size,
68  std::initializer_list<bool> periodic,
69  std::complex<double> t
70  );
71 
73  static Model* createModel(
74  const StateSet &stateSet,
76  );
77 
79  static Model* createModel(
80  const StateSet &stateSet,
81  const StateTreeNode &stateTreeNode,
83  );
84 
100  static Model* createModel(
101  const UnitCell &unitCell,
102  std::initializer_list<int> size,
103  std::initializer_list<bool> periodic,
104  const bool *includedCells = NULL,
105  const AbstractOperator &o = DefaultOperator()
106  );
107 
109  static void addSquareGeometry(
110  Model *model,
111  std::initializer_list<int> size
112  );
113 
115  static void addHexagonalGeometry(
116  Model *model,
117  std::initializer_list<int> size
118  );
119 
121  static Model* merge(
122  std::initializer_list<Model*> models
123  );
124 private:
126  static void createSquareLattice1D(
127  Model *model,
128  std::initializer_list<int> size,
129  std::initializer_list<bool> periodic,
130  std::complex<double> t
131  );
132 
134  static void createSquareLattice2D(
135  Model *model,
136  std::initializer_list<int> size,
137  std::initializer_list<bool> periodic,
138  std::complex<double> t
139  );
140 
142  static void createSquareLattice3D(
143  Model *model,
144  std::initializer_list<int> size,
145  std::initializer_list<bool> periodic,
146  std::complex<double> t
147  );
148 
150  static Model* createModel1D(
151  const UnitCell &unitCell,
152  std::initializer_list<int> size,
153  std::initializer_list<bool> periodic,
154  const bool *includedCells,
155  const AbstractOperator &o
156  );
157 
159  static Model* createModel2D(
160  const UnitCell &unitCell,
161  std::initializer_list<int> size,
162  std::initializer_list<bool> periodic,
163  const bool *includedCells,
164  const AbstractOperator &o
165  );
166 
168  static Model* createModel3D(
169  const UnitCell &unitCell,
170  std::initializer_list<int> size,
171  std::initializer_list<bool> periodic,
172  const bool *includedCells,
173  const AbstractOperator &o
174  );
175 
177  static void addSquareGeometry1D(
178  Model *model,
179  std::initializer_list<int> size
180  );
181 
183  static void addSquareGeometry2D(
184  Model *model,
185  std::initializer_list<int> size
186  );
187 
189  static void addSquareGeometry3D(
190  Model *model,
191  std::initializer_list<int> size
192  );
193 };
194 
195 }; //End of namespace TBTK
196 
197 #endif
Tree structure for quick access of multiple States.
Definition: StateTreeNode.h:38
Unit cell that act as container of States.
Container of Model related information.
static void addHexagonalGeometry(Model *model, std::initializer_list< int > size)
static Model * merge(std::initializer_list< Model * > models)
Definition: AbstractOperator.h:30
Container for States.
Definition: UnitCell.h:30
Definition: ModelFactory.h:35
static void addSquareGeometry(Model *model, std::initializer_list< int > size)
static Model * createHexagonalLattice(std::initializer_list< int > size, std::initializer_list< bool > periodic, std::complex< double > t)
Definition: DefaultOperator.h:30
static Model * createModel(const StateSet &stateSet, const AbstractOperator &o=DefaultOperator())
Definition: StateSet.h:30
Container of Model related information.
Definition: Model.h:52
static Model * createSquareLattice(std::initializer_list< int > size, std::initializer_list< bool > periodic, std::complex< double > t)
Contains geometric inforamtion about a Model.
Definition: ModelFactory.h:37