k-dot-p 0.1

hamiltonians.h++

Go to the documentation of this file.
00001 /*
00002  *Central switching point for Hamiltonians.
00003  *
00004 
00005     Copyright (C) 2010 Joseph Pingenot
00006 
00007     This program is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU Affero General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Affero General Public License for more details.
00016 
00017     You should have received a copy of the GNU Affero General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 
00020 */
00021 
00022 #ifndef __HAMILTONIANS_HXX__
00023 #define __HAMILTONIANS_HXX__
00024 
00025 #include <libmodelxx/generic_structure.h++>
00026 
00027 namespace kdotp {
00028   namespace libkdotp {
00029     namespace hamiltonian {
00030 
00031       enum gerror_domains {
00032   HAMILTONIAN_CARTESIAN_EFFECTIVE_MASS_GERROR_DOMAIN,
00033   HAMILTONIAN_CARTESIAN_8BAND_GERROR_DOMAIN
00034       };
00035 
00036       /*This is the list of all models that are supported.
00037        *The different models incorporate strain etc. differently.
00038        */
00039       enum model {
00040   KDOTP_EFFECTIVE_MASS,
00041   KDOTP_8BAND
00042       };
00043 
00044       enum boundary_condition {
00045   HARDWALL,
00046   PERIODIC
00047       };
00048 
00049       class hamiltonian {
00050       public:
00051   void *specific_hamiltonian;
00052   struct libmodelxx::structure::generic_structure *s;
00053   enum model model;
00054 
00055   /**Sets up the Hamiltonian
00056    *\param struct the structure to be turned into a Hamiltonian
00057    *\param model 
00058    */
00059   hamiltonian(struct libmodelxx::structure::generic_structure *struc, enum model model_, boundary_condition bc, bool second_neighbor);
00060 
00061   double* get_eigenvectors_double(double eVmin, double eVmax, double** evals, int *n_eigs, GError **err) const {
00062     return get_eigenvectors('V', eVmin, eVmax, 0, 0, evals, n_eigs, err);
00063   }
00064   double* get_eigenvectors_int(int imin, int imax, double** evals, int *n_eigs, GError **err) const {
00065     return get_eigenvectors('I', 0, 0, imin, imax, evals, n_eigs, err);
00066   }
00067 
00068   double* get_eigenvectors(char VoI, double eVmin, double eVmax, int imin, int imax, double**evals, int *n_eigs, GError **err) const;
00069 
00070 
00071       private:
00072   hamiltonian() {}
00073       };
00074 
00075     }
00076   }
00077 }
00078 
00079 
00080 
00081 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines