| Line 35... |
Line 35... |
ierr = MatMultTranspose(st->B,st->w,y);CHKERRQ(ierr);
|
ierr = MatMultTranspose(st->B,st->w,y);CHKERRQ(ierr);
|
}
|
}
|
else {
|
else {
|
/* standard eigenproblem: y = (A - sI)^-T x */
|
/* standard eigenproblem: y = (A - sI)^-T x */
|
ierr = STAssociatedKSPSolveTranspose(st,x,y);CHKERRQ(ierr);
|
ierr = STAssociatedKSPSolveTranspose(st,x,y);CHKERRQ(ierr);
|
}
|
|
PetscFunctionReturn(0);
|
|
}
|
|
|
|
#undef __FUNCT__
|
|
#define __FUNCT__ "STApplyNoB_Sinvert"
|
|
PetscErrorCode STApplyNoB_Sinvert(ST st,Vec x,Vec y)
|
|
{
|
|
PetscErrorCode ierr;
|
|
|
|
PetscFunctionBegin;
|
|
ierr = STAssociatedKSPSolve(st,x,y);CHKERRQ(ierr);
|
|
PetscFunctionReturn(0);
|
|
}
|
|
|
|
#undef __FUNCT__
|
|
#define __FUNCT__ "STApplyB_Sinvert"
|
|
PetscErrorCode STApplyB_Sinvert(ST st,Vec x,Vec y)
|
|
{
|
|
PetscErrorCode ierr;
|
|
|
|
PetscFunctionBegin;
|
|
if( st->B ) {
|
|
ierr = MatMult( st->B, x, y ); CHKERRQ(ierr);
|
|
}
|
|
else {
|
|
ierr = VecCopy( x, y ); CHKERRQ(ierr);
|
|
}
|
}
|
PetscFunctionReturn(0);
|
PetscFunctionReturn(0);
|
}
|
}
|
|
|
#undef __FUNCT__
|
#undef __FUNCT__
|
| Line 213... |
Line 186... |
{
|
{
|
PetscFunctionBegin;
|
PetscFunctionBegin;
|
st->data = 0;
|
st->data = 0;
|
|
|
st->ops->apply = STApply_Sinvert;
|
st->ops->apply = STApply_Sinvert;
|
st->ops->applyB = STApplyB_Sinvert;
|
st->ops->applyB = STApplyB_Default;
|
st->ops->applynoB = STApplyNoB_Sinvert;
|
|
st->ops->applytrans = STApplyTranspose_Sinvert;
|
st->ops->applytrans = STApplyTranspose_Sinvert;
|
st->ops->postsolve = STPostSolve_Sinvert;
|
st->ops->postsolve = STPostSolve_Sinvert;
|
st->ops->backtr = STBackTransform_Sinvert;
|
st->ops->backtr = STBackTransform_Sinvert;
|
st->ops->setup = STSetUp_Sinvert;
|
st->ops->setup = STSetUp_Sinvert;
|
st->ops->setshift = STSetShift_Sinvert;
|
st->ops->setshift = STSetShift_Sinvert;
|