complex support
bruno.zerbo at gmail.com
bruno.zerbo at gmail.com
Mon Sep 29 05:35:51 CDT 2008
Now I understand, thank you
Bruno
Il Monday 29 September 2008 12:23:48 Jed Brown ha scritto:
> On Mon 2008-09-29 11:56, bruno.zerbo at gmail.com wrote:
> > Hi,
> > I use PetscScalar to specify a complex and PetscReal for a double,
> > 1) is it wrong?
>
> Matrices and vectors have entries of type PetscScalar (which is complex
> if compiled --with-scalar-type=complex). When solving a complex
> problem, there will be certain values (e.g. coordinates and parameters)
> which are always real. This is the main purpose of PetscReal. You
> can't make vectors of type PetscReal.
>
> > 2) is there a constant equal to the imaginary unit?
>
> PETSC_i
>
> Jed
More information about the petsc-users
mailing list