Hello All,

I am looking through the example problems given in PETSc. In the very first
example, ex1 of vector section, I don't understand the following part,
especially the term "PETSC_SMALL". What does this mean?
Here, in the second line we already assign zero to v. What is the meaning
of "if" condition then?

ierr = VecScale(x,two);CHKERRQ(ierr);
  ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr);
  v    = norm-2.0*PetscSqrtReal((PetscReal)n); if (v > -PETSC_SMALL && v <
PETSC_SMALL) v = 0.0;
  ierr = PetscPrintf(PETSC_COMM_WORLD,"VecScale
%g\n",(double)v);CHKERRQ(ierr);


All the best.
Sincerely,
Huq
-- 

Fazlul Huq
Graduate Research Assistant
Department of Nuclear, Plasma & Radiological Engineering (NPRE)
University of Illinois at Urbana-Champaign (UIUC)
E-mail: huq2...@gmail.com

Reply via email to