Date: 2013-07-02T14:39:24+00:00

Actual source code: ex14.c
petsc-3.4.2 2013-07-02

      2: static char help[] = "Tests PetscOptionsGetScalar() for complex numbers\n";

      4: #include <petscsys.h>

      8: int main(int argc,char **argv)
      9: {
     10:   int         ierr;
     11:   PetscScalar a;

     13:   PetscInitialize(&argc,&argv,(char*)0,help);
     14:   PetscOptionsGetScalar(NULL,"-a",&a,NULL);
     15:   PetscPrintf(PETSC_COMM_SELF,"Scalar a = %G + %Gi\n",PetscRealPart(a),PetscImaginaryPart(a));
     16:   PetscFinalize();
     17:   return 0;
     18: }