Huq:
#  define PETSC_MACHINE_EPSILON         2.2204460492503131e-16
See /petsc/include/petscmath.h
Hong

Hello PETSc developers,

I went through the ex23.c of ksp section attached herewith but I don't 
understand the following part:
***********************************************
tol=1000.*PETSC_MACHINE_EPSILON
************************************************
and,
************************************************
ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr);
 ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr);
 ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr);
 if (norm > tol) {
 ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations %D\n",  
(double)norm,its);CHKERRQ(ierr);
  }
************************************************
I don't understand what is "tol" here and "*PETSC_MACHINE_EPSILON"?
The if condition is also not clear to me.

Thanks.
Sincerely,
Huq
--

Fazlul Huq
Graduate Research Assistant
Department of Nuclear, Plasma & Radiological Engineering (NPRE)
University of Illinois at Urbana-Champaign (UIUC)
E-mail: [email protected]<mailto:[email protected]>

Reply via email to