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
TBTK::PropertyExtractor::ArnoldiIterator::calculateLDOS
virtual Property::LDOS calculateLDOS(Index pattern, Index ranges)
TBTK::PropertyExtractor::PropertyExtractor::Information
Definition: PropertyExtractor.h:424
TBTK::Property::DOS
Property container for density of states (DOS).
Definition: DOS.h:48
TBTK::PropertyExtractor::ArnoldiIterator::getEigenValue
double getEigenValue(int state)
Definition: ArnoldiIterator.h:147
EigenValues.h
Property container for eigen values.
TBTK::Property::SpinPolarizedLDOS
Property container for spin-polarized local density of states (spin-polarized LDOS).
Definition: SpinPolarizedLDOS.h:46
TBTK::PropertyExtractor::ArnoldiIterator::calculateWaveFunctions
Property::WaveFunctions calculateWaveFunctions(std::vector< Index > patterns, std::vector< Subindex > states)
TBTK::PropertyExtractor::ArnoldiIterator::getEigenValues
Property::EigenValues getEigenValues()
TBTK::Solver::ArnoldiIterator
Solves a Model using Arnoldi iteration.
Definition: ArnoldiIterator.h:60
TBTK::Property::LDOS
Property container for the local density of states (LDOS).
Definition: LDOS.h:48
TBTK::Solver::ArnoldiIterator::getAmplitude
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:315
TBTK::PropertyExtractor::ArnoldiIterator::ArnoldiIterator
ArnoldiIterator(Solver::ArnoldiIterator &solver)
WaveFunctions.h
Property container for wave functions.
PropertyExtractor.h
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
TBTK::PropertyExtractor::ArnoldiIterator::calculateDOS
virtual Property::DOS calculateDOS()
TBTK::PropertyExtractor::ArnoldiIterator::calculateSpinPolarizedLDOS
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
LDOS.h
Property container for local density of states (LDOS).
SpinPolarizedLDOS.h
Property container for spin-polarized local density of states (spin-polarized LDOS).
TBTK::PropertyExtractor::ArnoldiIterator::getAmplitude
const std::complex< double > getAmplitude(int state, const Index &index)
Definition: ArnoldiIterator.h:151
DOS.h
Property container for density of states (DOS).
TBTK::Solver::ArnoldiIterator::getEigenValue
const double getEigenValue(int state) const
Definition: ArnoldiIterator.h:311
GreensFunction.h
Property container for the Green's function.
TBTK::Property::Property
Abstract Property class.
Definition: Property.h:36
TBTK::PropertyExtractor::ArnoldiIterator
Extracts physical properties from the Solver::ArnoldiIterator.
Definition: ArnoldiIterator.h:53
TBTK::PropertyExtractor::PropertyExtractor
Base class for PropertyExtractors.
Definition: PropertyExtractor.h:64
TBTK::Solver::Solver
Base class for Solvers.
Definition: Solver.h:42
TBTK::Index
Physical index.
Definition: Index.h:44
TBTK::Property::EigenValues
Property container for eigen values.
Definition: EigenValues.h:46
TBTK::Property::WaveFunctions
Property container for wave function.
Definition: WaveFunctions.h:45