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