Subversion Repositories slepc-dev

Rev

Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1672 Rev 1940
Line 175... Line 175...
 
 
  if (st->ksp) {  
  if (st->ksp) {  
    ierr = KSPGetPC(st->ksp,&pc);CHKERRQ(ierr);
    ierr = KSPGetPC(st->ksp,&pc);CHKERRQ(ierr);
    ierr = PCGetType(pc,&pctype);CHKERRQ(ierr);
    ierr = PCGetType(pc,&pctype);CHKERRQ(ierr);
    if (!pctype) {
    if (!pctype) {
      if (st->shift_matrix == STMATMODE_SHELL) {
      if (st->shift_matrix == ST_MATMODE_SHELL) {
        /* in shell mode use GMRES with Jacobi as the default */
        /* in shell mode use GMRES with Jacobi as the default */
        ierr = KSPSetType(st->ksp,KSPGMRES);CHKERRQ(ierr);
        ierr = KSPSetType(st->ksp,KSPGMRES);CHKERRQ(ierr);
        ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr);
        ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr);
      } else {
      } else {
        /* use direct solver as default */
        /* use direct solver as default */
Line 247... Line 247...
 
 
   Collective on ST
   Collective on ST
 
 
   Input Parameters:
   Input Parameters:
+  st - the spectral transformation context
+  st - the spectral transformation context
-  mode - the mode flag, one of STMATMODE_COPY,
-  mode - the mode flag, one of ST_MATMODE_COPY,
          STMATMODE_INPLACE or STMATMODE_SHELL
          ST_MATMODE_INPLACE or ST_MATMODE_SHELL
 
 
   Options Database Key:
   Options Database Key:
.  -st_matmode <mode> - Indicates the mode flag, where <mode> is one of
.  -st_matmode <mode> - Indicates the mode flag, where <mode> is one of
          'copy', 'inplace' or 'shell' (see explanation below).
          'copy', 'inplace' or 'shell' (see explanation below).
 
 
   Notes:
   Notes:
   By default (STMATMODE_COPY), a copy of matrix A is made and then
   By default (ST_MATMODE_COPY), a copy of matrix A is made and then
   this copy is shifted explicitly, e.g. A <- (A - s B).
   this copy is shifted explicitly, e.g. A <- (A - s B).
 
 
   With STMATMODE_INPLACE, the original matrix A is shifted at
   With ST_MATMODE_INPLACE, the original matrix A is shifted at
   STSetUp() and unshifted at the end of the computations. With respect to
   STSetUp() and unshifted at the end of the computations. With respect to
   the previous one, this mode avoids a copy of matrix A. However, a
   the previous one, this mode avoids a copy of matrix A. However, a
   backdraw is that the recovered matrix might be slightly different
   backdraw is that the recovered matrix might be slightly different
   from the original one (due to roundoff).
   from the original one (due to roundoff).
 
 
   With STMATMODE_SHELL, the solver works with an implicit shell
   With ST_MATMODE_SHELL, the solver works with an implicit shell
   matrix that represents the shifted matrix. This mode is the most efficient
   matrix that represents the shifted matrix. This mode is the most efficient
   in creating the shifted matrix but it places serious limitations to the
   in creating the shifted matrix but it places serious limitations to the
   linear solves performed in each iteration of the eigensolver (typically,
   linear solves performed in each iteration of the eigensolver (typically,
   only interative solvers with Jacobi preconditioning can be used).
   only interative solvers with Jacobi preconditioning can be used).