TBTK
ParallelepipedArrayState.h
Go to the documentation of this file.
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 
23 #ifndef COM_DAFER45_TBTK_PARALLELEPIPED_ARRAY_STATE
24 #define COM_DAFER45_TBTK_PARALLELEPIPED_ARRAY_STATE
25 
26 #include "TBTK/ArrayState.h"
27 #include "TBTK/Field.h"
29 
30 namespace TBTK{
31 
32 class ParallelepipedArrayState : public ArrayState, public Field<std::complex<double>, double>{
33 public:
36  std::initializer_list<std::initializer_list<double>> basisVectors,
37  std::initializer_list<unsigned int> numMeshPoints
38  );
39 
41  virtual ~ParallelepipedArrayState();
42 
44  virtual ParallelepipedArrayState* clone() const;
45 
47  virtual std::complex<double> getOverlap(const AbstractState &bra) const;
48 
50  virtual std::complex<double> getMatrixElement(
51  const AbstractState &bra,
53  ) const;
54 
56  void setAmplitude(
57  std::complex<double> amplitude,
58  std::initializer_list<double> coordinate
59  );
60 
62  const std::complex<double>& getAmplitude(
63  std::initializer_list<double> coordinate
64  ) const;
65 
67  const std::complex<double>& getAmplitude(
68  const std::vector<double> &coordinate
69  ) const;
70 
72  virtual std::complex<double> operator()(std::initializer_list<double> argument) const;
73 
75  virtual const std::vector<double>& getCoordinates() const;
76 
78  virtual double getExtent() const;
79 private:
82  ParallelepipedCell parallelepiped;
83 };
84 
85 }; //End of namespace TBTK
86 
87 #endif
ParallelepipedArrayState(std::initializer_list< std::initializer_list< double >> basisVectors, std::initializer_list< unsigned int > numMeshPoints)
virtual std::complex< double > getOverlap(const AbstractState &bra) const
State class with array based overlap evaluation.
virtual std::complex< double > operator()(std::initializer_list< double > argument) const
Definition: AbstractOperator.h:30
virtual std::complex< double > getMatrixElement(const AbstractState &bra, const AbstractOperator &o=DefaultOperator()) const
Definition: ParallelepipedCell.h:36
Definition: AbstractState.h:37
Definition: Field.h:34
void setAmplitude(std::complex< double > amplitude, std::initializer_list< double > coordinate)
Definition: ModelFactory.h:35
virtual const std::vector< double > & getCoordinates() const
Definition: ArrayState.h:35
Abstract base class for fields.
virtual double getExtent() const
const std::complex< double > & getAmplitude(std::initializer_list< double > coordinate) const
Definition: ParallelepipedArrayState.h:32
Definition: DefaultOperator.h:30
virtual ParallelepipedArrayState * clone() const
Parallelepiped cell.