|
gimme-alpha 0.1
|
00001 /* 00002 ** wavefunction.h 00003 ** 00004 ** Stuff to deal with generalized wavefunctions. 00005 Copyright (C) 2009 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 ** Made by Johnny Q. Hacker 00020 ** Login <solarion@borkborkbork> 00021 ** 00022 ** Started on Thu Mar 26 11:46:38 2009 Johnny Q. Hacker 00023 ** Last update Thu Mar 26 11:46:38 2009 Johnny Q. Hacker 00024 */ 00025 00026 #ifndef ___WAVEFUNCTION_H__ 00027 #define ___WAVEFUNCTION_H__ 00028 00029 #include <libmodeling/bands.h> 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 00036 struct mstar_wavefunction_point_1d { 00037 double x; 00038 double re; 00039 double im; 00040 }; 00041 00042 struct mstar_wavefunction_1d { 00043 int N; 00044 struct mstar_wavefunction_point_1d *points; 00045 }; 00046 00047 /** 00048 *Gets a wavefunction that's been normalized to *integrate* to 1. 00049 \param wf a LAPACK-normalized wavefunction, that is, a wavefunction which *sums* to 1 (i.e. each point has been multiplied by the square root of the grid spacing) 00050 */ 00051 struct mstar_wavefunction_1d* mstar_wavefunction_1d_from_LAPACK_normlized(const struct mstar_wavefunction_1d* wf); 00052 00053 /*! 00054 *\brief generate an effective mass wavefunc that's just a gaussian 00055 *\param N number of points in the wavefunc 00056 *\param minx minium x to evaluate at 00057 *\param maxx maximum x to evaluate at 00058 *\param sigma sigma to be used in evaluating the Gaußian 00059 *\return 1D effective mass Gaußian wavefunction 00060 */ 00061 struct mstar_wavefunction_1d* mstar_wavefunction_1d_new_gaussian(int N, double minx, double maxx, double sigma); 00062 00063 /*! 00064 *\brief allocate an effective mass wavefunction 00065 *\param N number of points in the wavefunc 00066 *\return an empty wavefunction with N points 00067 */ 00068 struct mstar_wavefunction_1d* mstar_wavefunction_1d_new(int N); 00069 /*! 00070 *\brief de-allocate an effective mass wavefunction 00071 *\param wf the wavefunction to be freed 00072 */ 00073 void mstar_wavefunction_1d_free(struct mstar_wavefunction_1d* wf); 00074 00075 /*Repacks into 3 arrays: x, re, and im, for postprocessing, e.g. GSL*/ 00076 void mstar_wavefunction_1d_repack(const struct mstar_wavefunction_1d* wf, double **x, double **re, double **im, short int convert_lapack_to_density_normalization); 00077 00078 #ifdef __cplusplus 00079 } 00080 #endif 00081 00082 00083 #endif