|
gimme-alpha 0.1
|
00001 /* 00002 ** nanostructures.h 00003 ** 00004 ** Made by Johnny Q. Hacker 00005 ** Login <solarion@borkborkbork> 00006 ** 00007 00008 Copyright (C) 2009 Joseph Pingenot 00009 00010 This program is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Affero General Public License as published by 00012 the Free Software Foundation, either version 3 of the License, or 00013 (at your option) any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Affero General Public License for more details. 00019 00020 You should have received a copy of the GNU Affero General Public License 00021 along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 00023 ** Started on Tue Mar 17 14:37:28 2009 Johnny Q. Hacker 00024 ** Last update Tue Mar 17 14:37:28 2009 Johnny Q. Hacker 00025 */ 00026 00027 #ifndef NANOSTRUCTURES_H_ 00028 # define NANOSTRUCTURES_H_ 00029 00030 #include <glib.h> 00031 #include "matdb.h" 00032 00033 enum doping_type { 00034 NONE, 00035 CONST, 00036 LAST_TYPE 00037 }; 00038 00039 enum nanostructure_type { 00040 NS_D1 00041 }; 00042 00043 struct doping_region_1d { 00044 enum doping_type dt; 00045 double start; 00046 double end; 00047 void *datum; 00048 }; 00049 00050 struct region_1d { 00051 double start; 00052 double end; 00053 }; 00054 00055 struct nanostructure { 00056 enum nanostructure_type type; 00057 void* storage; 00058 }; 00059 00060 struct nanostructure_1d { 00061 /*Holds a list of the regions*/ 00062 GList *regions; 00063 /*Holds a list of the doping regions.*/ 00064 GList *doping_regions; 00065 }; 00066 00067 /*\param dim number of dimensions of the structure 00068 */ 00069 struct nanostructure* nanostructure_new(enum nanostructure_type type); 00070 void structure_free(struct nanostructure* s); 00071 00072 struct doping_region_1d* doping_region_1d_new(enum doping_type dt); 00073 struct region_1d* region_1d_new(); 00074 00075 #endif /* !NANOSTRUCTURES_H_ */