TBTK
Need a break? Support the development by playing Polarity Puzzles
ParallelepipedArrayState.h
1 /* Copyright 2017 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 
17 
24 #ifndef COM_DAFER45_TBTK_PARALLELEPIPED_ARRAY_STATE
25 #define COM_DAFER45_TBTK_PARALLELEPIPED_ARRAY_STATE
26 
27 #include "TBTK/ArrayState.h"
28 #include "TBTK/Field.h"
29 #include "TBTK/ParallelepipedCell.h"
30 
31 namespace TBTK{
32 
33 class ParallelepipedArrayState : public ArrayState, public Field<std::complex<double>, double>{
34 public:
36  ParallelepipedArrayState(
37  const std::vector<std::vector<double>> &basisVectors,
38  std::initializer_list<unsigned int> numMeshPoints
39  );
40 
42  virtual ~ParallelepipedArrayState();
43 
45  virtual ParallelepipedArrayState* clone() const;
46 
48  virtual std::complex<double> getOverlap(const AbstractState &bra) const;
49 
51  virtual std::complex<double> getMatrixElement(
52  const AbstractState &bra,
53  const AbstractOperator &o = DefaultOperator()
54  ) const;
55 
57  void setAmplitude(
58  std::complex<double> amplitude,
59  std::initializer_list<double> coordinate
60  );
61 
63  const std::complex<double>& getAmplitude(
64  std::initializer_list<double> coordinate
65  ) const;
66 
68  const std::complex<double>& getAmplitude(
69  const std::vector<double> &coordinate
70  ) const;
71 
73  virtual std::complex<double> operator()(std::initializer_list<double> argument) const;
74 
76  virtual const std::vector<double>& getCoordinates() const;
77 
79  virtual double getExtent() const;
80 private:
83  ParallelepipedCell parallelepiped;
84 };
85 
86 }; //End of namespace TBTK
87 
88 #endif
89 
Definition: Boolean.h:32