| Line 109... |
Line 109... |
#endif
|
#endif
|
b->max_size_auxV = PetscMax(b->max_size_auxV, b->max_size_X*4); /* u,v,kr,
|
b->max_size_auxV = PetscMax(b->max_size_auxV, b->max_size_X*4); /* u,v,kr,
|
auxV */
|
auxV */
|
b->max_size_auxS = PetscMax(b->max_size_auxS,
|
b->max_size_auxS = PetscMax(b->max_size_auxS,
|
b->max_size_X*3 + /* theta, thetai */
|
b->max_size_X*3 + /* theta, thetai */
|
|
(DVD_IS(d->sEP, DVD_EP_HERMITIAN)?0:1)*(
|
2*b->max_size_V*b->max_size_V + /* pX, pY */
|
2*b->max_size_V*b->max_size_V + /* pX, pY */
|
11*b->max_size_V+4*b->max_size_V*b->max_size_V
|
11*b->max_size_V+4*b->max_size_V*b->max_size_V)
|
/* dvd_improvex_get_eigenvectors */
|
/* dvd_improvex_get_eigenvectors */
|
);
|
);
|
|
|
/* Setup the preconditioner */
|
/* Setup the preconditioner */
|
if (ksp) {
|
if (ksp) {
|
| Line 281... |
Line 282... |
n = PetscMin(PetscMin(data->size_X, max_size_D), r_e-r_s);
|
n = PetscMin(PetscMin(data->size_X, max_size_D), r_e-r_s);
|
if (n == 0) SETERRQ(PETSC_COMM_SELF,1, "n == 0!\n");
|
if (n == 0) SETERRQ(PETSC_COMM_SELF,1, "n == 0!\n");
|
if (data->size_X < r_e-r_s) SETERRQ(PETSC_COMM_SELF,1, "size_X < r_e-r_s!\n");
|
if (data->size_X < r_e-r_s) SETERRQ(PETSC_COMM_SELF,1, "size_X < r_e-r_s!\n");
|
|
|
/* Compute the eigenvectors of the selected pairs */
|
/* Compute the eigenvectors of the selected pairs */
|
pX = auxS; auxS+= d->size_H*d->size_H;
|
if (DVD_IS(d->sEP, DVD_EP_HERMITIAN)) {
|
pY = auxS; auxS+= d->size_H*d->size_H;
|
pX = pY = d->pX;
|
ierr = dvd_improvex_get_eigenvectors(d, pX, pY, d->size_H, auxS,
|
} else {
|
d->size_auxS-(auxS-d->auxS));
|
pX = auxS; auxS+= d->size_H*d->size_H;
|
CHKERRQ(ierr);
|
pY = auxS; auxS+= d->size_H*d->size_H;
|
|
ierr = dvd_improvex_get_eigenvectors(d, pX, pY, d->size_H, auxS,
|
|
d->size_auxS-(auxS-d->auxS));
|
|
CHKERRQ(ierr);
|
|
}
|
|
|
for(i=0, s=0; i<n; i+=s) {
|
for(i=0, s=0; i<n; i+=s) {
|
/* If the selected eigenvalue is complex, but the arithmetic is real... */
|
/* If the selected eigenvalue is complex, but the arithmetic is real... */
|
#if !defined(PETSC_USE_COMPLEX)
|
#if !defined(PETSC_USE_COMPLEX)
|
if (PetscAbsScalar(d->eigi[i] != 0.0)) {
|
if (PetscAbsScalar(d->eigi[i] != 0.0)) {
|