Update ChangeLog
[gss-tcad.git] / src / include / solverdef.h
blobd58bf6a1d0ab613939680dc35a3d839d20d31320
1 /*****************************************************************************/
2 /* 8888888 88888888 88888888 */
3 /* 8 8 8 */
4 /* 8 8 8 */
5 /* 8 88888888 88888888 */
6 /* 8 8888 8 8 */
7 /* 8 8 8 8 */
8 /* 888888 888888888 888888888 */
9 /* */
10 /* A Two-Dimensional General Purpose Semiconductor Simulator. */
11 /* */
12 /* GSS 0.4x */
13 /* Last update: Jan 19, 2006 */
14 /* */
15 /* Gong Ding */
16 /* gdiso@ustc.edu */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
18 /* */
19 /*****************************************************************************/
21 #ifndef _solverdef_h_
22 #define _solverdef_h_
23 #include "typedef.h"
24 #include <stdio.h>
25 #include <vector>
26 #include <string>
27 using namespace std;
29 //define cgns file type
30 const int MODEL = 101;
31 const int CORE = 102;
33 //define carrier type
34 const int N_Type = 201;
35 const int P_Type = 202;
36 const int PN_Both = 203;
37 const int PN_None = 204;
39 //define solver type
40 const int POISSON = 300;
42 const int DDML1 = 310;
43 const int DDML1E = 311;
44 const int DDML1AC = 312;
45 const int DDML1MIX= 313;
46 const int QDDML1E = 315;
48 const int DDML2 = 320;
49 const int DDML2E = 321;
50 const int DDML2MIX= 322;
52 const int EBML3E = 331;
54 const int EMFEM = 391;
56 //define scheme
57 const int DDM_Gummel = 501;
58 const int DDM_Newton = 502;
60 //define solve type
61 const int EQUILIBRIUM = 601;
62 const int STEADYSTATE = 602;
63 const int DCSWEEP = 603;
64 const int DCSWEEP_VSCAN = 604;
65 const int DCSWEEP_ISCAN = 605;
66 const int TRANSIENT = 606;
67 const int ACSWEEP = 607;
68 const int TRACE = 608;
70 //define parameter index
71 const int MeshObject = 700;
72 const int ElecDensity = 701;
73 const int HoleDensity = 702;
74 const int EFieldX = 703;
75 const int EFieldY = 704;
76 const int EField = 705;
77 const int Potential = 706;
78 const int Phi_Intrinsic = 707;
79 const int PhiN = 708;
80 const int PhiP = 709;
81 const int ValenceBand = 710;
82 const int ConductionBand = 711;
83 const int QuantumEc = 712;
84 const int QuantumEv = 713;
85 const int Doping = 720;
86 const int DopingNa = 721;
87 const int DopingNd = 722;
89 const int Temperature = 730;
90 const int ElecTemp = 731;
91 const int HoleTemp = 732;
93 const int OpticalEx = 750;//```
94 const int OpticalEy = 751;
95 const int OpticalEz = 752;
96 const int OpticalHx = 753;
97 const int OpticalHy = 754;
98 const int OpticalHz = 755;
99 const int OpticalG = 756;
101 //define order for ODE solver
102 const int BDF1 = 1;
103 const int BDF2 = 2;
105 const int Linear = 851;
106 const int SignedLog = 852;
108 //define Newton's method
109 const int Basic = 915;
110 const int LineSearch = 917;
111 const int TrustRegion = 910;
113 //define Newton damping
114 const int DampingNo = 930;
115 const int DampingBankRose = 931;
116 const int DampingPotential = 932;
118 //define Impact Ionization Type
119 const int EdotJ = 0;
120 const int GradQf = 1;
121 const int EVector = 2;
122 const int ESide = 3;
123 const int SoftII = 4;
124 const int HardII = 5;
125 const int TempII = 6;
127 class SolveDefine
129 public:
130 int Solver; //DDM model level 1,2...
131 int Scheme; //solver scheme: DDM_Newton, DDM_Gummel...
132 int Type; //solver type: transient , steadystate...
133 int NS; //nonlinear solver scheme: basic, line search, trust region...
134 int Damping; //Newton damping
135 string LS; //linear solver scheme: LU, BCGS, GMRES ...
136 int MaxIteration; //Max Iteration number
137 int port; //the net port used for mix simulation
138 int BDF_Type; //transient solver: ODE formula
139 // semiconductor region advanced model specification
140 bool HighFieldMobility;
141 bool BandBandTunneling;
142 bool ImpactIonization;
143 bool Fermi;
144 bool IncompleteIonization;
145 bool QuantumMechanical;
146 bool EJModel;
147 double QNFactor;
148 double QPFactor;
149 int IIType;
150 // nonlinear solver convergence criteria
151 int maxit;
152 double relative_toler;
153 double toler_relax;
154 double possion_abs_toler;
155 double elec_continuty_abs_toler;
156 double hole_continuty_abs_toler;
157 double heat_equation_abs_toler;
158 double elec_energy_abs_toler;
159 double hole_energy_abs_toler;
160 double elec_quantum_abs_toler;
161 double hole_quantum_abs_toler;
162 double electrode_abs_toler;
164 // parameters for DC, TRAN, TRACE etc.
165 int Electrode_VScan;
166 vector<string> Electrode_VScan_Name;
167 int Electrode_IScan;
168 string Electrode_IScan_Name;
169 int Electrode_ACScan;
170 string Electrode_ACScan_Name;
171 vector<int> Electrode_Record;
172 vector<int> Electrode_Record_Index;
173 vector<string> Electrode_Record_Name;
174 string IVFile;
175 bool IVFileAppend;
176 double VStart,VStep,VStepMax,VStop;
177 double IStart,IStep,IStop;
178 double TStart,TStep,TStop;
179 bool AutoStep;
180 bool Predict;
181 double VAC;
182 double FStart,FMultiple,FStop;
183 SolveDefine()
185 Solver = DDML1;
186 Scheme = DDM_Newton;
187 NS = LineSearch;
188 Damping = DampingNo;
189 LS = "gmres";
190 Fermi=false;
191 IncompleteIonization=false;
192 ImpactIonization = false;
193 EJModel = false;
194 BandBandTunneling = false;
195 BDF_Type = BDF1;
196 AutoStep=true;
197 Predict=true;
201 class PMISDefine
203 public:
204 vector<string> Region;
205 vector<string> Material;
206 vector<string> Mobility;
207 vector<string> IIModel;
208 vector<string> OpticalModel;
211 typedef struct
213 int TimeDependent;
214 int BDF_Type;
215 int BDF2_restart;
216 PetscScalar clock;
217 PetscScalar dt;
218 PetscScalar dt_last;
219 PetscScalar dt_last_last;
221 ODE_Formula;
223 typedef struct
225 int Variable;
226 int Measure;
227 double Dispersion;
228 double DivisionRatio;
229 char tri_cmd[32];
231 RefineDefine;
233 typedef struct
235 bool core;
236 bool ascii;
237 bool vtk;
238 char CoreFile[32];
239 char AscFile[32];
240 char VTKFile[32];
242 ExportDefine;
244 typedef struct
246 int file_type;
247 char CoreFile[32];
248 char ModelFile[32];
250 ImportDefine;
252 typedef struct
254 char Electrode[32];
255 int bc_index;
256 int electrode_type;
257 vector<string> vsrc_name;
258 vector<int> vsrc_index;
259 vector<string> isrc_name;
260 vector<int> isrc_index;
262 AttachDefine;
264 typedef struct
266 int MeshOnly; // draw mesh only (2D)
267 int Variable; // which Variable to plot
268 string VariableName; // the name of the variable to plot.
269 int Resolution; // x window resolution
270 int Measure; // log or linear plot
271 int GeneratePS; // generate postscript file
272 int GenerateTIFF; // generate TIFF file
273 string PSFileName;
274 string TIFFFileName;
275 int NoMesh; // do not plot the mesh
276 int ConSurf;
277 int NoSurf;
278 int Style; // STYLE_BW | STYLE_WIREFRAME | STYLE_COLOR | (default) | STYLE_GRAYLEVEL
279 int ztick; // # of z axis ticks
280 int Persp; // Perspective distance
282 int Con; // contour plot
283 int NumCon; // # of contours
285 double az; // azimuthal angle
286 double el; // elevation angle
288 PlotDefine;
291 class ProbeDefine
293 public:
294 string Region;
295 string Segment;
296 int zone_index;
297 int bc_index;
298 string ProbeFile;
299 FILE* pFile;
300 bool Append;
301 bool flag;
302 int Variable; // which Variable to probe
303 string VariableName; // the name of the variable to probe.
305 ProbeDefine()
307 pFile=NULL;
308 flag=false;
312 #endif