1 /*****************************************************************************/
2 /* 8888888 88888888 88888888 */
5 /* 8 88888888 88888888 */
8 /* 888888 888888888 888888888 */
10 /* A Two-Dimensional General Purpose Semiconductor Simulator. */
13 /* Last update: Oct 15, 2007 */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
19 /*****************************************************************************/
22 #include "petsctime.h"
27 int main(int argc
, char ** args
)
29 PetscInitialize(&argc
,&args
,PETSC_NULL
,PETSC_NULL
);
31 PetscLogDouble v1
,v2
,elapsed_time
;
34 cout
<<"****************************************************************************"<<endl
;
35 cout
<<"* 8888888 88888888 88888888 *"<<endl
;
36 cout
<<"* 8 8 8 *"<<endl
;
37 cout
<<"* 8 8 8 *"<<endl
;
38 cout
<<"* 8 88888888 88888888 *"<<endl
;
39 cout
<<"* 8 8888 8 8 *"<<endl
;
40 cout
<<"* 8 8 8 8 *"<<endl
;
41 cout
<<"* 888888 888888888 888888888 *"<<endl
;
43 cout
<<"* A Two-Dimensional General-purpose Semiconductor Simulator. *"<<endl
;
45 if(sizeof(PetscScalar
)==sizeof(double))
46 cout
<<"* This is GSS version 0.46.08 with double precision. *"<<endl
;
47 if(sizeof(PetscScalar
)==sizeof(long double))
48 cout
<<"* This is GSS version 0.46.08 with long double precision. *"<<endl
;
49 cout
<<"* Copyright (C) 2005-2008 by Gong Ding and Zhang XiangHua. *"<<endl
;
50 cout
<<"* Please send ANY comments, corrections or suggestions to gdiso@ustc.edu. *"<<endl
;
51 cout
<<"****************************************************************************"<<endl
<<endl
;
55 cout
<<"usage: gss card_file [petsc_options]"<<endl
;
56 cout
<<"For more information, please refer to GSS User's Guide."<<endl
<<endl
;
60 CmdBuf
*cmdbuf
= new CmdBuf
;
61 if(cmdbuf
->parse_file(args
[1]))
67 char *logfile
= new char[strlen(args
[1])+16];
68 sprintf(logfile
,"%s.log",args
[1]);
69 gss_log
.GSS_LOG_BEGIN(logfile
);
71 SolveControl
*solver
= new SolveControl
;
72 if(solver
->static_config(cmdbuf
)) exit(0);
73 if(solver
->run_control(cmdbuf
->cmd_list
)) exit(0);
79 gss_log
.GSS_LOG_END();
82 elapsed_time
= v2
- v1
;
83 cout
<<"GSS finished. Total time is "<<elapsed_time
<<" seconds. Good bye!"<<endl
;