Greens-code
A modular quantum transport code
abstract_potential.hpp
Go to the documentation of this file.
1 #ifndef ABSTRACT_POT_HEADER
2 #define ABSTRACT_POT_HEADER
3 
4 #include "input_file.hpp"
5 #include <complex>
6 #include <vector>
7 
8 typedef std::complex<double> complex;
9 
15 ;
39 class Potential: public loadable_Object{
40 public:
41  typedef STD_TR1::shared_ptr<Potential> ref;
42 
43  virtual ~Potential() throw(){};
44 
46  void prepare_pot(const geometry_const_Iterator& p) {prepare_pot_(p);};
48  complex get_pot(int iy);
49 
50 private:
51 
52  STD_TR1::shared_ptr<std::vector<double> > modfactor;
53  int nmod;
54 
55  void init();
56 
57  virtual void init_pot_() = 0;
58  virtual void prepare_pot_(const geometry_const_Iterator& p) = 0;
59  virtual complex get_pot_(int iy) const = 0;
60 };
61 
62 #endif
63 
complex get_pot(int iy)
Return value of the potential at index iy on current slice.
Definition: abstract_potential.cpp:36
Definition: iterators.hpp:13
An abstract base class defining potentials, use with ExtPot_Hamiltonian.
Definition: abstract_potential.hpp:38
An abstract base class supporting xml_file_reading of input parameters.
Definition: input_file.hpp:79
void prepare_pot(const geometry_const_Iterator &p)
Perform time-consuming calculations once for each slice.
Definition: abstract_potential.hpp:45