Commits

Jed Brown committed 1fc21ac Merge with conflicts

Merge branch 'maint'

Conflicts:
src/vec/vec/interface/rvector.c

  • Participants
  • Parent commits d4211eb, 3bda13e

Comments (0)

Files changed (2)

src/ksp/ksp/interface/itfunc.c

     PetscReal norm;
     if (ksp->dscale && !ksp->dscalefix) SETERRQ(PetscObjectComm((PetscObject)ksp),PETSC_ERR_ARG_WRONGSTATE,"Cannot compute final scale with -ksp_diagonal_scale except also with -ksp_diagonal_scale_fix");
     ierr = PCGetOperators(ksp->pc,&A,0,0);CHKERRQ(ierr);
-    ierr = VecDuplicate(ksp->vec_sol,&t);CHKERRQ(ierr);
+    ierr = VecDuplicate(ksp->vec_rhs,&t);CHKERRQ(ierr);
     ierr = KSP_MatMult(ksp,A,ksp->vec_sol,t);CHKERRQ(ierr);
     ierr = VecAYPX(t, -1.0, ksp->vec_rhs);CHKERRQ(ierr);
     ierr = VecNorm(t,NORM_2,&norm);CHKERRQ(ierr);

src/vec/vec/interface/rvector.c

   ierr = PetscLogEventBarrierBegin(VEC_DotBarrier,x,y,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
   ierr = (*x->ops->dot)(x,y,val);CHKERRQ(ierr);
   ierr = PetscLogEventBarrierEnd(VEC_DotBarrier,x,y,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
-  if (PetscIsInfOrNanScalar(*val)) SETERRQ(PetscObjectComm((PetscObject)x),PETSC_ERR_FP,"Infinite or not-a-number generated in dot product");
   PetscFunctionReturn(0);
 }
 
   ierr = PetscLogEventBarrierBegin(VEC_NormBarrier,x,0,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
   ierr = (*x->ops->norm)(x,type,val);CHKERRQ(ierr);
   ierr = PetscLogEventBarrierEnd(VEC_NormBarrier,x,0,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
-  if (PetscIsInfOrNanScalar(*val)) SETERRQ(PetscObjectComm((PetscObject)x),PETSC_ERR_FP,"Infinite or not-a-number generated in norm");
 
   if (type!=NORM_1_AND_2) {
     ierr = PetscObjectComposedDataSetReal((PetscObject)x,NormIds[type],*val);CHKERRQ(ierr);
 PetscErrorCode  VecMDot(Vec x,PetscInt nv,const Vec y[],PetscScalar val[])
 {
   PetscErrorCode ierr;
-  PetscInt       i;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(x,VEC_CLASSID,1);
   ierr = PetscLogEventBarrierBegin(VEC_MDotBarrier,x,*y,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
   ierr = (*x->ops->mdot)(x,nv,y,val);CHKERRQ(ierr);
   ierr = PetscLogEventBarrierEnd(VEC_MDotBarrier,x,*y,0,0,PetscObjectComm((PetscObject)x));CHKERRQ(ierr);
-  for (i=0; i<nv; i++) {
-    if (PetscIsInfOrNanScalar(val[i])) SETERRQ1(PetscObjectComm((PetscObject)x),PETSC_ERR_FP,"Infinite or not-a-number generated in mdot, entry %D",i);
-  }
   PetscFunctionReturn(0);
 }