| Line 53... |
Line 53... |
PetscValidHeaderSpecific(y,VEC_CLASSID,3);
|
PetscValidHeaderSpecific(y,VEC_CLASSID,3);
|
if (x == y) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_ARG_IDN,"x and y must be different vectors");
|
if (x == y) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_ARG_IDN,"x and y must be different vectors");
|
|
|
if (!st->setupcalled) { ierr = STSetUp(st); CHKERRQ(ierr); }
|
if (!st->setupcalled) { ierr = STSetUp(st); CHKERRQ(ierr); }
|
|
|
|
if (!st->ops->apply) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_SUP,"ST does not have apply");
|
ierr = PetscLogEventBegin(ST_Apply,st,x,y,0);CHKERRQ(ierr);
|
ierr = PetscLogEventBegin(ST_Apply,st,x,y,0);CHKERRQ(ierr);
|
st->applys++;
|
st->applys++;
|
if (st->D) { /* with balancing */
|
if (st->D) { /* with balancing */
|
ierr = VecPointwiseDivide(st->wb,x,st->D);CHKERRQ(ierr);
|
ierr = VecPointwiseDivide(st->wb,x,st->D);CHKERRQ(ierr);
|
ierr = (*st->ops->apply)(st,st->wb,y);CHKERRQ(ierr);
|
ierr = (*st->ops->apply)(st,st->wb,y);CHKERRQ(ierr);
|
| Line 143... |
Line 144... |
PetscValidHeaderSpecific(y,VEC_CLASSID,3);
|
PetscValidHeaderSpecific(y,VEC_CLASSID,3);
|
if (x == y) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_ARG_IDN,"x and y must be different vectors");
|
if (x == y) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_ARG_IDN,"x and y must be different vectors");
|
|
|
if (!st->setupcalled) { ierr = STSetUp(st); CHKERRQ(ierr); }
|
if (!st->setupcalled) { ierr = STSetUp(st); CHKERRQ(ierr); }
|
|
|
|
if (!st->ops->applytrans) SETERRQ(((PetscObject)st)->comm,PETSC_ERR_SUP,"ST does not have applytrans");
|
ierr = PetscLogEventBegin(ST_ApplyTranspose,st,x,y,0);CHKERRQ(ierr);
|
ierr = PetscLogEventBegin(ST_ApplyTranspose,st,x,y,0);CHKERRQ(ierr);
|
st->applys++;
|
st->applys++;
|
if (st->D) { /* with balancing */
|
if (st->D) { /* with balancing */
|
ierr = VecPointwiseMult(st->wb,x,st->D);CHKERRQ(ierr);
|
ierr = VecPointwiseMult(st->wb,x,st->D);CHKERRQ(ierr);
|
ierr = (*st->ops->applytrans)(st,st->wb,y);CHKERRQ(ierr);
|
ierr = (*st->ops->applytrans)(st,st->wb,y);CHKERRQ(ierr);
|