QNANO
Distribute_EV.h
1 #ifndef QNANO_NEW_DISTRIBUTE_EV_DEFINED_H
2 #define QNANO_NEW_DISTRIBUTE_EV_DEFINED_H
3 
4 #include "orbitals/Select_Orbitals_List.h"
5 #include "tools/Reader.h"
6 #include "tools/List_Class.h"
7 #include "MPI/Distribute_Block_MPI.h"
8 
20 
21 public:
22  size_t max_nr_orbs_per_atom;
23 
24  //outer index: nr of eigenstate, inner index: data block on node (max_nr_orbs_per_atom*get_local_blocksize)
25  std::vector<std::vector<std::complex<double> > >data;
26  std::vector<std::complex<double> > &operator[](int i){return data[i];}
27  const std::vector<std::complex<double> > &operator[](int i)const{return data[i];}
28 
32  std::vector<int> which_orb;
33 
34 
36  bool orbitals_are_set_up()const{ return which_orb.size()>0; }
38  void setup_orbitals(const std::string &materialdir, const std::string &positionfile);
40  void read(const std::string &materialdir, const std::string &positionfile, const std::string &filename_pattern, int nr);
42  void setup(Parameter_Map &param_map);
43 
44 
45 
46  //Constructors
47  Distribute_EV_List() : max_nr_orbs_per_atom(1){}
48  Distribute_EV_List(const std::string &materialdir, const std::string &positionfile, const std::string &filename_pattern, int nr){
49  max_nr_orbs_per_atom=1;
50  read(materialdir, positionfile, filename_pattern, nr);
51  }
52  Distribute_EV_List(Parameter_Map &param_map) : max_nr_orbs_per_atom(1){
53  setup(param_map);
54  }
55 
56 };
57 
58 #endif
Definition: Parameter_Map.h:12
std::vector< int > which_orb
index in orblist (size: nr local atoms=get_local_blocksize())
Definition: Distribute_EV.h:32
Definition: Distribute_Block_MPI.h:8
void read(const std::string &materialdir, const std::string &positionfile, const std::string &filename_pattern, int nr)
read: orbitals + content
Definition: Distribute_EV.cc:59
void setup(Parameter_Map &param_map)
call read with parameters in param_map
Definition: Distribute_EV.cc:4
Select_Orbitals_List orblist
list possible number of orbitals on the elements used
Definition: Distribute_EV.h:30
void setup_orbitals(const std::string &materialdir, const std::string &positionfile)
setup: which atom as which orbitals? (info contained in positionfile)
Definition: Distribute_EV.cc:12
bool orbitals_are_set_up() const
check if orbitals are set up
Definition: Distribute_EV.h:36
Definition: Distribute_EV.h:19
Definition: Select_Orbitals_List.h:10