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 25, 2006 */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
19 /*****************************************************************************/
27 class DDM_Solver_L1AC
: virtual public BSolver
30 vector
<int> zofs
; // the offset value of each zone in solution vector
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
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){};
46 void form_linear_system_ac1(PetscScalar
, PetscScalar
*, Mat
*, Vec
*, Mat
*);