16dd63270SBarry Smithinterface 202c639afSMartin Diehl subroutine PetscFortranPrintToFileUnit(unit, str, ierr) 3fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 46dd63270SBarry Smith import tPetscViewer 56dd63270SBarry Smith integer unit 66dd63270SBarry Smith character(len=*), intent(in) :: str 76dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 802c639afSMartin Diehl end subroutine 902c639afSMartin Diehl subroutine PetscViewerASCIIOpenWithFileUnit(comm, unit, lab, ierr) 10fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 11*b06eb4cdSBarry Smith use petscmpi 126dd63270SBarry Smith import tPetscViewer 13*b06eb4cdSBarry Smith MPIU_Comm, intent(in) :: comm 146dd63270SBarry Smith integer, intent(in) :: unit 156dd63270SBarry Smith PetscViewer, intent(out) :: lab 166dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 1702c639afSMartin Diehl end subroutine 1802c639afSMartin Diehl subroutine PetscViewerASCIISetFileUnit(lab, unit, ierr) 19fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 206dd63270SBarry Smith import tPetscViewer 216dd63270SBarry Smith PetscViewer, intent(in) :: lab 226dd63270SBarry Smith integer, intent(in) :: unit 236dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 2402c639afSMartin Diehl end subroutine 256dd63270SBarry Smithend interface 266dd63270SBarry Smith 2702c639afSMartin Diehlinterface PetscViewerBinaryWrite 2802c639afSMartin Diehl subroutine PetscViewerBinaryWriteInt(v, a, cnt, tmp, ierr) 29fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 306dd63270SBarry Smith import tPetscViewer 316dd63270SBarry Smith PetscViewer v 326dd63270SBarry Smith PetscInt a(*) 336dd63270SBarry Smith PetscInt cnt 346dd63270SBarry Smith PetscBool tmp 356dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 3602c639afSMartin Diehl end subroutine 376dd63270SBarry Smith 3802c639afSMartin Diehl subroutine PetscViewerBinaryWriteScalar(v, a, cnt, tmp, ierr) 39fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 406dd63270SBarry Smith import tPetscViewer 416dd63270SBarry Smith PetscViewer v 426dd63270SBarry Smith PetscScalar a(*) 436dd63270SBarry Smith PetscInt cnt 446dd63270SBarry Smith PetscBool tmp 456dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 4602c639afSMartin Diehl end subroutine 476dd63270SBarry Smith 486dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 4902c639afSMartin Diehl subroutine PetscViewerBinaryWriteReal(v, a, cnt, tmp, ierr) 50fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 516dd63270SBarry Smith import tPetscViewer 526dd63270SBarry Smith PetscViewer v 536dd63270SBarry Smith PetscReal a(*) 546dd63270SBarry Smith PetscInt cnt 556dd63270SBarry Smith PetscBool tmp 566dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 5702c639afSMartin Diehl end subroutine 586dd63270SBarry Smith#endif 5902c639afSMartin Diehlend interface PetscViewerBinaryWrite 606dd63270SBarry Smith 6102c639afSMartin Diehlinterface PetscViewerBinaryRead 6202c639afSMartin Diehl subroutine PetscViewerBinaryReadInt(v, a, cnt, ierr) 63fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 646dd63270SBarry Smith import tPetscViewer 656dd63270SBarry Smith PetscViewer v 666dd63270SBarry Smith PetscInt a(*) 676dd63270SBarry Smith PetscInt cnt 686dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 6902c639afSMartin Diehl end subroutine 706dd63270SBarry Smith 7102c639afSMartin Diehl subroutine PetscViewerBinaryReadScalar(v, a, cnt, ierr) 72fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 736dd63270SBarry Smith import tPetscViewer 746dd63270SBarry Smith PetscViewer v 756dd63270SBarry Smith PetscScalar a(*) 766dd63270SBarry Smith PetscInt cnt 776dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 7802c639afSMartin Diehl end subroutine 796dd63270SBarry Smith 806dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 8102c639afSMartin Diehl subroutine PetscViewerBinaryReadReal(v, a, cnt, ierr) 82fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 836dd63270SBarry Smith import tPetscViewer 846dd63270SBarry Smith PetscViewer v 856dd63270SBarry Smith PetscReal a(*) 866dd63270SBarry Smith PetscInt cnt 876dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 8802c639afSMartin Diehl end subroutine 896dd63270SBarry Smith#endif 9002c639afSMartin Diehlend interface PetscViewerBinaryRead 916dd63270SBarry Smith 92a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute 93a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeInt(viewer, parent, name, value, ierr) 94fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 95a968899dSTapashree Pradhan import tPetscViewer 96a968899dSTapashree Pradhan PetscViewer :: viewer 97a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 98a968899dSTapashree Pradhan PetscInt, intent(in) :: value 99a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 100a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeInt 101a968899dSTapashree Pradhan 102a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeScalar(viewer, parent, name, value, ierr) 103fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 104a968899dSTapashree Pradhan import tPetscViewer 105a968899dSTapashree Pradhan PetscViewer :: viewer 106a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 107a968899dSTapashree Pradhan PetscScalar, intent(in) :: value 108a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 109a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeScalar 110a968899dSTapashree Pradhan 111a968899dSTapashree Pradhan#if defined(PETSC_USE_COMPLEX) 112a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeReal(viewer, parent, name, value, ierr) 113fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 114a968899dSTapashree Pradhan import tPetscViewer 115a968899dSTapashree Pradhan PetscViewer :: viewer 116a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 117a968899dSTapashree Pradhan PetscReal, intent(in) :: value 118a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 119a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeReal 120a968899dSTapashree Pradhan#endif 121a968899dSTapashree Pradhan 122a968899dSTapashree Pradhanend interface PetscViewerHDF5WriteAttribute 123