[petsc-users] Replacing values in a Vec
Barry Smith
bsmith at mcs.anl.gov
Fri Jun 29 20:17:20 CDT 2012
Just use VecGetArray() then loop over that, checking each entry to see if it matches a "certain value" if so put in the other value.
Barry
On Jun 29, 2012, at 7:46 PM, Colin McAuliffe wrote:
> Hello,
>
> I would like to replace all the entries of a Vec which have a certain value with a different value. Is there a command for this?
>
> Thanks
> Colin
>
>
>
>
> --
> Colin McAuliffe
> PhD Candidate
> Columbia University
> Department of Civil Engineering and Engineering Mechanics
More information about the petsc-users
mailing list