<div dir="ltr"><div>Thank Satish.</div><div>PetscFortranComplex works.</div><div>I just want to distinguish between real and complex variables in my Fotran code, so I prefer to use PetscFortranComplex when a variables is complex.</div><div>I began to learn petsc just several weeks ago.</div><div>Another unusual thing I noticed is that petsc keywords are case-sensitive in Fotran codes, which breaks the convention that Fortran is case-insensitive.</div><div>Correct me if I am wrong.<br></div><div><br></div><div>Youjun<br></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Aug 4, 2018 at 3:24 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For some reason it is PetscFortranComplex [on fortran side]<br>
<br>
I'm not sure I understand your logic for using PetscComplex and not PetscScalar.<br>
<br>
We recommend using PetscScalar. You can choose not to follow our<br>
recommendation.<br>
<br>
But we don't say 'PetscScalar' is the wrong thing for users [as you<br>
appear to infer]<br>
<br>
Satish<br>
<br>
On Sat, 4 Aug 2018, Youjun Hu wrote:<br>
<br>
> I just tried to change PetscScalar to the specific datatype PetscComplex in<br>
> my Fortran code, but the compiler raised the following error:<br>
> PetscComplex   my_coeff<br>
> Error: Unclassifiable statement at (1)<br>
> <br>
> It seems that the compiler does not know this datatype.<br>
> <br>
> My Petsc was configured with ./configure   --with-scalar-type=complex<br>
> --with-precision=double<br>
> <br>
> Before the modification, the code was complied successfully.<br>
> Could someone help?<br>
> <br>
> Thanks,<br>
> Youjun<br>
> <br>
> <br>
<br>
</blockquote></div></div>