[petsc-users] logical operation for Vec

Yujie recrusader at gmail.com
Mon May 10 20:31:25 CDT 2010


Dear PETSc Developers,

I am wondering whether there is a function for Vec.

Assuming

Vec v;

double d_test;

This function can compare each values (v(i)) of v with d_test and
return the logical values contained in Vec v_logi (such as
if(v(i)>d_test)
  v_logi(i)=0;
else
  v_logi(i)=1;  )

Thanks a lot.

Regards,
Yujie


More information about the petsc-users mailing list