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 9*3d1372b2SMartin Diehl 1002c639afSMartin Diehl subroutine PetscViewerASCIIOpenWithFileUnit(comm, unit, lab, ierr) 11fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 12b06eb4cdSBarry Smith use petscmpi 136dd63270SBarry Smith import tPetscViewer 14b06eb4cdSBarry Smith MPIU_Comm, intent(in) :: comm 156dd63270SBarry Smith integer, intent(in) :: unit 166dd63270SBarry Smith PetscViewer, intent(out) :: lab 176dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 1802c639afSMartin Diehl end subroutine 19*3d1372b2SMartin Diehl 2002c639afSMartin Diehl subroutine PetscViewerASCIISetFileUnit(lab, unit, ierr) 21fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 226dd63270SBarry Smith import tPetscViewer 236dd63270SBarry Smith PetscViewer, intent(in) :: lab 246dd63270SBarry Smith integer, intent(in) :: unit 256dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 2602c639afSMartin Diehl end subroutine 276dd63270SBarry Smithend interface 286dd63270SBarry Smith 29*3d1372b2SMartin Diehl#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES) 30*3d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscFortranPrintToFileUnit 31*3d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIIOpenWithFileUnit 32*3d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIISetFileUnit 33*3d1372b2SMartin Diehl#endif 34*3d1372b2SMartin Diehl 3502c639afSMartin Diehlinterface PetscViewerBinaryWrite 3602c639afSMartin Diehl subroutine PetscViewerBinaryWriteInt(v, a, cnt, tmp, ierr) 37fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 386dd63270SBarry Smith import tPetscViewer 396dd63270SBarry Smith PetscViewer v 406dd63270SBarry Smith PetscInt a(*) 416dd63270SBarry Smith PetscInt cnt 426dd63270SBarry Smith PetscBool tmp 436dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 4402c639afSMartin Diehl end subroutine 4502c639afSMartin Diehl subroutine PetscViewerBinaryWriteScalar(v, a, cnt, tmp, ierr) 46fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 476dd63270SBarry Smith import tPetscViewer 486dd63270SBarry Smith PetscViewer v 496dd63270SBarry Smith PetscScalar a(*) 506dd63270SBarry Smith PetscInt cnt 516dd63270SBarry Smith PetscBool tmp 526dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 5302c639afSMartin Diehl end subroutine 546dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 5502c639afSMartin Diehl subroutine PetscViewerBinaryWriteReal(v, a, cnt, tmp, ierr) 56fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 576dd63270SBarry Smith import tPetscViewer 586dd63270SBarry Smith PetscViewer v 596dd63270SBarry Smith PetscReal a(*) 606dd63270SBarry Smith PetscInt cnt 616dd63270SBarry Smith PetscBool tmp 626dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 6302c639afSMartin Diehl end subroutine 646dd63270SBarry Smith#endif 6502c639afSMartin Diehlend interface PetscViewerBinaryWrite 666dd63270SBarry Smith 6702c639afSMartin Diehlinterface PetscViewerBinaryRead 6802c639afSMartin Diehl subroutine PetscViewerBinaryReadInt(v, a, cnt, ierr) 69fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 706dd63270SBarry Smith import tPetscViewer 716dd63270SBarry Smith PetscViewer v 726dd63270SBarry Smith PetscInt a(*) 736dd63270SBarry Smith PetscInt cnt 746dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 7502c639afSMartin Diehl end subroutine 7602c639afSMartin Diehl subroutine PetscViewerBinaryReadScalar(v, a, cnt, ierr) 77fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 786dd63270SBarry Smith import tPetscViewer 796dd63270SBarry Smith PetscViewer v 806dd63270SBarry Smith PetscScalar a(*) 816dd63270SBarry Smith PetscInt cnt 826dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 8302c639afSMartin Diehl end subroutine 846dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 8502c639afSMartin Diehl subroutine PetscViewerBinaryReadReal(v, a, cnt, ierr) 86fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 876dd63270SBarry Smith import tPetscViewer 886dd63270SBarry Smith PetscViewer v 896dd63270SBarry Smith PetscReal a(*) 906dd63270SBarry Smith PetscInt cnt 916dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 9202c639afSMartin Diehl end subroutine 936dd63270SBarry Smith#endif 9402c639afSMartin Diehlend interface PetscViewerBinaryRead 956dd63270SBarry Smith 96a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute 97a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeInt(viewer, parent, name, value, ierr) 98fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 99a968899dSTapashree Pradhan import tPetscViewer 100a968899dSTapashree Pradhan PetscViewer :: viewer 101a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 102a968899dSTapashree Pradhan PetscInt, intent(in) :: value 103a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 104a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeInt 105a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeScalar(viewer, parent, name, value, ierr) 106fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 107a968899dSTapashree Pradhan import tPetscViewer 108a968899dSTapashree Pradhan PetscViewer :: viewer 109a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 110a968899dSTapashree Pradhan PetscScalar, intent(in) :: value 111a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 112a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeScalar 113a968899dSTapashree Pradhan#if defined(PETSC_USE_COMPLEX) 114a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeReal(viewer, parent, name, value, ierr) 115fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 116a968899dSTapashree Pradhan import tPetscViewer 117a968899dSTapashree Pradhan PetscViewer :: viewer 118a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 119a968899dSTapashree Pradhan PetscReal, intent(in) :: value 120a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 121a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeReal 122a968899dSTapashree Pradhan#endif 123a968899dSTapashree Pradhanend interface PetscViewerHDF5WriteAttribute 124