TBTK
Need a break? Support the development by playing Polarity Puzzles
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 
54 public:
59 
62 
64  double getEigenValue(int state);
65 
70  const std::complex<double> getAmplitude(int state, const Index &index);
71 
74  std::vector<Index> patterns,
75  std::vector<Subindex> states
76  );
77 
79 /* Property::GreensFunction* calculateGreensFunction(
80  Index to,
81  Index from,
82  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
83  );*/
84 
86  virtual Property::DOS calculateDOS();
87 
90  Index pattern,
91  Index ranges
92  );
93 
96  std::vector<Index> patterns
97  );
98 
101  Index pattern,
102  Index ranges
103  );
104 
107  std::vector<Index> patterns
108  );
109 private:
112  static void calculateWaveFunctionsCallback(
113  PropertyExtractor *cb_this,
114  Property::Property &property,
115  const Index &index,
116  int offset,
117  Information &information
118  );
119 
122  static void calculateLDOSCallback(
123  PropertyExtractor *cb_this,
124  Property::Property &property,
125  const Index &index,
126  int offset,
127  Information &information
128  );
129 
132  static void calculateSpinPolarizedLDOSCallback(
133  PropertyExtractor *cb_this,
134  Property::Property &property,
135  const Index &index,
136  int offset,
137  Information &information
138  );
139 
141  Solver::ArnoldiIterator *aSolver;
142 
144  virtual const Solver::Solver& getSolver() const;
145 };
146 
147 inline double ArnoldiIterator::getEigenValue(int state){
148  return aSolver->getEigenValue(state);
149 }
150 
151 inline const std::complex<double> ArnoldiIterator::getAmplitude(
152  int state,
153  const Index &index
154 ){
155  return aSolver->getAmplitude(state, index);
156 }
157 
158 inline const Solver::Solver& ArnoldiIterator::getSolver() const{
159  return *aSolver;
160 }
161 
162 }; //End of namespace PropertyExtractor
163 }; //End of namespace TBTK
164 
165 #endif
Base class for Solvers.
Definition: Solver.h:42
Property container for the local density of states (LDOS).
Definition: LDOS.h:48
Property container for eigen values.
Definition: EigenValues.h:46
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:315
Property container for eigen values.
Property container for local density of states (LDOS).
virtual Property::LDOS calculateLDOS(Index pattern, Index ranges)
Property::WaveFunctions calculateWaveFunctions(std::vector< Index > patterns, std::vector< Subindex > states)
Extracts physical properties from the Solver::ArnoldiIterator.
Definition: ArnoldiIterator.h:53
Property::EigenValues getEigenValues()
Solves a Model using Arnoldi iteration.
Definition: ArnoldiIterator.h:60
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
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.
Abstract Property class.
Definition: Property.h:36
Physical index.
Definition: Index.h:44
Base class for PropertyExtractors.
Definition: PropertyExtractor.h:64
Definition: Boolean.h:32
Property container for wave function.
Definition: WaveFunctions.h:45
Property container for spin-polarized local density of states (spin-polarized LDOS).
Definition: SpinPolarizedLDOS.h:46
Property container for density of states (DOS).
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:151
Property container for density of states (DOS).
Definition: DOS.h:48
Property container for wave functions.
const double getEigenValue(int state) const
Definition: ArnoldiIterator.h:311
double getEigenValue(int state)
Definition: ArnoldiIterator.h:147