k-dot-p 0.1

physical_constants.h++

Go to the documentation of this file.
00001 /*
00002  *Contains physical constants and derived constants
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 __PHYSICAL_CONSTANTS_HXX___
00023 #define __PHYSICAL_CONSTANTS_HXX___
00024 
00025 #include <libkdotp/gcc_hints.h>
00026 
00027 namespace kdp {
00028   namespace constants {
00029 
00030 /*hbar, in eV s*/
00031 extern double hbar;
00032 /*mass of electron in eV*/
00033 extern double m0;
00034 /*Charge of the elecron in C*/
00035 extern double q_e;
00036 /*Magnitude of the charge of the electron in C*/
00037 extern double e;
00038 /*Speed of light in m/s*/
00039 extern double c;
00040 /*vacuum dielectric constant F/m*/
00041 extern double epsilon0;
00042 
00043 extern double ev_in_hartree;
00044 extern double hartree_in_ev;
00045 extern double bohr_in_meters;
00046 extern double bohr_in_nmeters;
00047 
00048 ___const double ev_to_hartree(double ev);
00049 
00050 ___const double hartree_to_ev(double hartree);
00051 
00052 ___const double bohr_to_m(double bohr);
00053 
00054 ___const double m_to_bohr(double m);
00055 
00056 ___const double bohr_to_nm(double bohr);
00057 
00058 ___const double nm_to_bohr(double nm);
00059 
00060   }
00061 }
00062 
00063 
00064 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines