[petsc-dev] vec/vec/examples/tests/ex37.c "Nest vector functionality. has bugs

Barry Smith bsmith at mcs.anl.gov
Sun Feb 20 13:52:22 CST 2011


  ierr = VecDestroy(a);CHKERRQ(ierr);   ierr = VecDestroy(b);CHKERRQ(ierr);

  ierr = VecAssemblyBegin(X);CHKERRQ(ierr);
  ierr = VecAssemblyEnd(X);CHKERRQ(ierr);

  ierr = VecMax( b, &index, &val );CHKERRQ(ierr);
  PetscPrintf( PETSC_COMM_WORLD, "(max-b) = %f : index = %d \n", val, index );

  b is destroyed and then used later.

   Barry




More information about the petsc-dev mailing list