TBTK
ParallelepipedCell.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_PARALLELEPIPED_CELL
24 #define COM_DAFER45_TBTK_PARALLELEPIPED_CELL
25 
26 #include "TBTK/Index.h"
27 #include "TBTK/SpacePartition.h"
28 #include "TBTK/Vector3d.h"
29 
30 #include <initializer_list>
31 #include <vector>
32 
33 namespace TBTK{
34 
37 public:
40  std::initializer_list<std::initializer_list<double>> basisVectors,
41  MeshType meshType
42  );
43 
46  const std::vector<std::vector<double>> &basisVectors,
47  MeshType meshType
48  );
49 
51  virtual ~ParallelepipedCell();
52 
54  virtual Index getMajorCellIndex(
55  const std::vector<double> &coordinate
56  ) const;
57 
59  virtual Index getMinorCellIndex(
60  const std::vector<double> &coordinate,
61  const std::vector<unsigned int> &numMeshPoints
62  ) const;
63 
65  virtual std::vector<std::vector<double>> getMajorMesh(
66  const std::vector<unsigned int> &numMeshPoints
67  ) const;
68 
70  virtual std::vector<std::vector<double>> getMinorMesh(
71  const std::vector<unsigned int> &numMeshPoints
72  ) const;
73 
75  virtual std::vector<double> getMinorMeshPoint(
76  const std::vector<unsigned int> &meshPoint,
77  const std::vector<unsigned int> &numMeshPoints
78  ) const;
79 private:
85  std::vector<Vector3d> reciprocalNormals;
86 };
87 
88 }; //End namespace TBTK
89 
90 #endif
Flexible physical index.
Three-dimensional vector with components of double type.
Base class for space partitions.
Definition: SpacePartition.h:36
virtual std::vector< std::vector< double > > getMajorMesh(const std::vector< unsigned int > &numMeshPoints) const
virtual std::vector< std::vector< double > > getMinorMesh(const std::vector< unsigned int > &numMeshPoints) const
Definition: ParallelepipedCell.h:36
MeshType
Definition: SpacePartition.h:46
virtual std::vector< double > getMinorMeshPoint(const std::vector< unsigned int > &meshPoint, const std::vector< unsigned int > &numMeshPoints) const
virtual Index getMajorCellIndex(const std::vector< double > &coordinate) const
virtual Index getMinorCellIndex(const std::vector< double > &coordinate, const std::vector< unsigned int > &numMeshPoints) const
Flexible physical index.
Definition: Index.h:69
Definition: ModelFactory.h:35
ParallelepipedCell(std::initializer_list< std::initializer_list< double >> basisVectors, MeshType meshType)