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:
48 
50  virtual ~ArnoldiIterator();
51 
54 
56  double getEigenValue(int state);
57 
62  const std::complex<double> getAmplitude(int state, const Index &index);
63 
66  std::initializer_list<Index> patterns,
67  std::initializer_list<int> states
68  );
69 
71 /* Property::GreensFunction* calculateGreensFunction(
72  Index to,
73  Index from,
74  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
75  );*/
76 
78  virtual Property::DOS calculateDOS();
79 
82  Index pattern,
83  Index ranges
84  );
85 
88  std::initializer_list<Index> patterns
89  );
90 
93  Index pattern,
94  Index ranges
95  );
96 
99  std::initializer_list<Index> patterns
100  );
101 private:
104  static void calculateWaveFunctionsCallback(
105  PropertyExtractor *cb_this,
106  void *waveFunctions,
107  const Index &index,
108  int offset
109  );
110 
113  static void calculateLDOSCallback(
114  PropertyExtractor *cb_this,
115  void *ldos,
116  const Index &index,
117  int offset
118  );
119 
122  static void calculateSpinPolarizedLDOSCallback(
123  PropertyExtractor *cb_this,
124  void *sp_ldos,
125  const Index &index,
126  int offset
127  );
128 
130  Solver::ArnoldiIterator *aSolver;
131 };
132 
133 inline double ArnoldiIterator::getEigenValue(int state){
134  return aSolver->getEigenValue(state);
135 }
136 
137 inline const std::complex<double> ArnoldiIterator::getAmplitude(
138  int state,
139  const Index &index
140 ){
141  return aSolver->getAmplitude(state, index);
142 }
143 
144 }; //End of namespace PropertyExtractor
145 }; //End of namespace TBTK
146 
147 #endif
Property container for local density of states (LDOS).
Definition: LDOS.h:33
Property container for eigen values..
Definition: EigenValues.h:32
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:247
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.
Property::WaveFunctions calculateWaveFunctions(std::initializer_list< Index > patterns, std::initializer_list< int > states)
virtual Property::DOS calculateDOS()
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
Property container for spin-polarized local density of states (spin-polarized LDOS).
Property container for Green&#39;s function.
ArnoldiIterator(Solver::ArnoldiIterator &aSolver)
Flexible physical index.
Definition: Index.h:70
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:137
Property container for density of states (DOS).
Definition: DOS.h:32
Property container for wave functions.
double getEigenValue(int state)
Definition: ArnoldiIterator.h:133
const double getEigenValue(int state) const
Definition: ArnoldiIterator.h:243