TBTK
ArnoldiIterator.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_PROPERTY_EXTRACTOR_ARNOLDI_ITERATOR
24 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_ARNOLDI_ITERATOR
25 
26 #include "TBTK/Solver/ArnoldiIterator.h"
27 #include "TBTK/Property/DOS.h"
30 #include "TBTK/Property/LDOS.h"
34 
35 #include <complex>
36 //#include <initializer_list>
37 
38 namespace TBTK{
39 namespace PropertyExtractor{
40 
45 public:
50 
52 // virtual ~ArnoldiIterator();
53 
56 
58  double getEigenValue(int state);
59 
64  const std::complex<double> getAmplitude(int state, const Index &index);
65 
68 // std::initializer_list<Index> patterns,
69  std::vector<Index> patterns,
70 // std::initializer_list<int> states
71  std::vector<int> states
72  );
73 
75 /* Property::GreensFunction* calculateGreensFunction(
76  Index to,
77  Index from,
78  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
79  );*/
80 
82  virtual Property::DOS calculateDOS();
83 
86  Index pattern,
87  Index ranges
88  );
89 
92 // std::initializer_list<Index> patterns
93  std::vector<Index> patterns
94  );
95 
98  Index pattern,
99  Index ranges
100  );
101 
104 // std::initializer_list<Index> patterns
105  std::vector<Index> patterns
106  );
107 private:
110  static void calculateWaveFunctionsCallback(
111  PropertyExtractor *cb_this,
112  void *waveFunctions,
113  const Index &index,
114  int offset
115  );
116 
119  static void calculateLDOSCallback(
120  PropertyExtractor *cb_this,
121  void *ldos,
122  const Index &index,
123  int offset
124  );
125 
128  static void calculateSpinPolarizedLDOSCallback(
129  PropertyExtractor *cb_this,
130  void *sp_ldos,
131  const Index &index,
132  int offset
133  );
134 
136  Solver::ArnoldiIterator *aSolver;
137 };
138 
139 inline double ArnoldiIterator::getEigenValue(int state){
140  return aSolver->getEigenValue(state);
141 }
142 
143 inline const std::complex<double> ArnoldiIterator::getAmplitude(
144  int state,
145  const Index &index
146 ){
147  return aSolver->getAmplitude(state, index);
148 }
149 
150 }; //End of namespace PropertyExtractor
151 }; //End of namespace TBTK
152 
153 #endif
Property container for local density of states (LDOS).
Definition: LDOS.h:33
Property container for eigen values..
Definition: EigenValues.h:32
Property::WaveFunctions calculateWaveFunctions(std::vector< Index > patterns, std::vector< int > states)
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:296
Property container for eigen values.
Property container for local density of states (LDOS).
virtual Property::LDOS calculateLDOS(Index pattern, Index ranges)
Definition: ArnoldiIterator.h:44
Property::EigenValues getEigenValues()
Solves a Model using Arnoldi iteration.
Definition: ArnoldiIterator.h:40
Base class PropertyExtractors.
virtual Property::DOS calculateDOS()
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
Property container for spin-polarized local density of states (spin-polarized LDOS).
ArnoldiIterator(Solver::ArnoldiIterator &solver)
Property container for the Green&#39;s function.
Flexible physical index.
Definition: Index.h:69
Definition: PropertyExtractor.h:44
Definition: ModelFactory.h:35
Property container for wave function.
Definition: WaveFunctions.h:34
Property container for spin-polarized local density of states (spin-polarized LDOS).
Definition: SpinPolarizedLDOS.h:37
Property container for density of states (DOS).
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:143
Property container for density of states (DOS).
Definition: DOS.h:32
Property container for wave functions.
double getEigenValue(int state)
Definition: ArnoldiIterator.h:139
const double getEigenValue(int state) const
Definition: ArnoldiIterator.h:292