initial checkin, based on GSS 0.46 CVS
[gss-tcad.git] / src / include / ddm_nt1ac.h
blob5c649a723ff93dfbbfaa4ab7648568f4c8475e1b
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: Oct 25, 2006 */
14 /* */
15 /* Gong Ding */
16 /* gdiso@ustc.edu */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
18 /* */
19 /*****************************************************************************/
21 #ifndef _ddm_nt1ac_h_
22 #define _ddm_nt1ac_h_
23 #include "petscts.h"
24 #include "bsolver.h"
27 class DDM_Solver_L1AC : virtual public BSolver
29 private:
30 vector<int> zofs; // the offset value of each zone in solution vector
31 public:
32 int N; // the size of real jac matrix
33 KSP ksp; // linear solver context
34 PC pc; // preconditioner context
35 PetscScalar *x; // DC solution;
36 Vec v,r; // AC solution vector and right vector
37 Mat J,JTmp; // Jacobian matrix
38 public:
39 int init_solver(SolveDefine &s) ;
40 int do_solve(SolveDefine &s);
41 int solve_ac(SolveDefine &s);
42 void compute_electrode_current(PetscScalar);
43 int destroy_solver(SolveDefine &s);
44 DDM_Solver_L1AC():N(0){};
45 void Get_Jacobian();
46 void form_linear_system_ac1(PetscScalar, PetscScalar *, Mat *, Vec *, Mat *);
50 #endif