Low level interface with PETSC, which serve as the back-end in GridapPETSc.

The types and functions defined here are almost 1-to-1 to the corresponding C counterparts. In particular, the types defined can be directly used to call C PETSc routines via ccall. When a C function expects a pointer, use a Ref to the corresponding Julia alias. E.g., if an argument is PetscBool * in the C code, pass an object with type Ref{PetscBool} from the Julia code. Using this rule, PETSC.PetscInitialized can be called as

flag = Ref{PetscBool}()
@check_error_code PetscInitialized(flag)
if flag[] == PETSC_TRUE
  println("Petsc is initialized!")