[petsc-users] Typecasting PetscReal and PetscScalar before	doing arithmetic?
    Jed Brown 
    jed at 59A2.org
       
    Mon Mar 28 12:14:45 CDT 2011
    
    
  
On Mon, Mar 28, 2011 at 19:04, Gaurish Telang <gaurish108 at gmail.com> wrote:
> I have some variables in a program some of which are of type PetscReal and
> some of the type PetscScalar. Is it safe doing arithmetic with these
> variables without doing any explicit type casting?
Yes, but the result will have type PetscScalar unless you use
PetscRealPart() or similar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110328/daa1a5b1/attachment.htm>
    
    
More information about the petsc-users
mailing list