complex support

bruno.zerbo at gmail.com bruno.zerbo at gmail.com
Mon Sep 29 04:56:44 CDT 2008


Hi, 
I use PetscScalar to specify a complex and PetscReal for a double,
1) is it wrong?
2) is there a constant equal to the imaginary unit? Because I create one 
myself.
Thanks 
Bruno


Il Friday 26 September 2008 19:30:24 Matthew Knepley ha scritto:
> Currently, no. C is not amenable to this kind of programming.
>
>   Matt
>
> On Fri, Sep 26, 2008 at 12:08 PM, Manav Bhatia <bhatiamanav at gmail.com> 
wrote:
> > Hi,
> >
> >  I am writing a code where I will need both double and complex support
> > for separate calculations. I can certainly build a complex petsc library
> > and keep the imaginary value as zero to get to double, but that would not
> > be very efficient.
> >
> >  If there a way to do mixed programming with the same petsc library
> > without paying this penalty?
> >
> > Thanks,
> > Manav





More information about the petsc-users mailing list