Subversion Repositories slepc-dev

Rev

Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1350 Rev 1351
Line 61... Line 61...
  const char     *which;
  const char     *which;
  PetscInt       nn;
  PetscInt       nn;
  int            n, iparam[11], ipntr[14], ido, info;
  int            n, iparam[11], ipntr[14], ido, info;
  PetscScalar    sigmar, *pV, *resid;
  PetscScalar    sigmar, *pV, *resid;
  Vec            x, y, w = eps->work[0];
  Vec            x, y, w = eps->work[0];
  Mat            A;
  Mat            A,B;
  PetscTruth     isSinv, isShift, rvec;
  PetscTruth     isSinv, isShift, rvec;
  MPI_Fint       fcomm;
  MPI_Fint       fcomm;
  IPBilinearForm form;
  IPBilinearForm form;
#if !defined(PETSC_USE_COMPLEX)
#if !defined(PETSC_USE_COMPLEX)
  PetscScalar    sigmai = 0.0;
  PetscScalar    sigmai = 0.0;
Line 99... Line 99...
        6   [ 5  'G' ]    [ 4  'G' ]
        6   [ 5  'G' ]    [ 4  'G' ]
   */
   */
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSINV,&isSinv);CHKERRQ(ierr);
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSINV,&isSinv);CHKERRQ(ierr);
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSHIFT,&isShift);CHKERRQ(ierr);
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSHIFT,&isShift);CHKERRQ(ierr);
  ierr = STGetShift(eps->OP,&sigmar);CHKERRQ(ierr);
  ierr = STGetShift(eps->OP,&sigmar);CHKERRQ(ierr);
  ierr = IPGetBilinearForm(eps->ip,PETSC_NULL,&form);CHKERRQ(ierr);
  ierr = IPGetBilinearForm(eps->ip,&B,&form);CHKERRQ(ierr);
  ierr = STGetOperators(eps->OP,&A,PETSC_NULL);CHKERRQ(ierr);
  ierr = STGetOperators(eps->OP,&A,PETSC_NULL);CHKERRQ(ierr);
 
 
  if (isSinv) {
  if (isSinv) {
    /* shift-and-invert mode */
    /* shift-and-invert mode */
    iparam[6] = 3;
    iparam[6] = 3;
    if (form == IPINNER_HERMITIAN) bmat[0] = 'G';
    if (B && form == IPINNER_HERMITIAN) bmat[0] = 'G';
    else bmat[0] = 'I';
    else bmat[0] = 'I';
  } else if (isShift && form == IPINNER_HERMITIAN) {
  } else if (isShift && B && form == IPINNER_HERMITIAN) {
    /* generalized shift mode with B positive definite */
    /* generalized shift mode with B positive definite */
    iparam[6] = 2;
    iparam[6] = 2;
    bmat[0] = 'G';
    bmat[0] = 'G';
  } else {
  } else {
    /* regular mode */
    /* regular mode */