how to set values of petsc matrix into double precision?

Matthew Knepley knepley at
Tue Jun 9 16:40:10 CDT 2009

On Tue, Jun 9, 2009 at 4:27 PM, xiaoyin ji <sapphire.jxy at> wrote:

> Hi,
> Now I came up with this new problem, I could not find the way to let
> petsc mat store double precision values. I used double precision value
> in MatSetValue() but the MatView showed the stored data to be single
> precision. I've also tried to recompile petsc as:

I think you are misinterpreting MatView().


> ./config/ --with-precision=double
> which didnot work for me.
> Thanks very much.
> Xiaoyin Ji
> ----------------------------------------------
> Xiaoyin Ji
> Graduate Student
> Department of Materials Science and Engineering
> North Carolina State University

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list