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 93d1372b2SMartin Diehl 100da4d79bSMartin Diehl subroutine PetscViewerASCIIOpenWithFileUnit(comm, unit, viewer, 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 160da4d79bSMartin Diehl PetscViewer, intent(out) :: viewer 176dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 1802c639afSMartin Diehl end subroutine 193d1372b2SMartin Diehl 200da4d79bSMartin Diehl subroutine PetscViewerASCIISetFileUnit(viewer, unit, ierr) 21fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 226dd63270SBarry Smith import tPetscViewer 230da4d79bSMartin Diehl PetscViewer, intent(in) :: viewer 246dd63270SBarry Smith integer, intent(in) :: unit 256dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 2602c639afSMartin Diehl end subroutine 27*3f7bdce8SBarry Smith 28*3f7bdce8SBarry Smith subroutine PetscViewerASCIISynchronizedPrintf(viewer, msg, ierr) 29*3f7bdce8SBarry Smith use, intrinsic :: ISO_C_binding 30*3f7bdce8SBarry Smith import tPetscViewer 31*3f7bdce8SBarry Smith PetscViewer, intent(in) :: viewer 32*3f7bdce8SBarry Smith character(len=*) :: msg 33*3f7bdce8SBarry Smith PetscErrorCode, intent(out) :: ierr 34*3f7bdce8SBarry Smith end subroutine 35*3f7bdce8SBarry Smith 36*3f7bdce8SBarry Smith subroutine PetscViewerASCIIPrintf(viewer, msg, ierr) 37*3f7bdce8SBarry Smith use, intrinsic :: ISO_C_binding 38*3f7bdce8SBarry Smith import tPetscViewer 39*3f7bdce8SBarry Smith PetscViewer, intent(in) :: viewer 40*3f7bdce8SBarry Smith character(len=*) :: msg 41*3f7bdce8SBarry Smith PetscErrorCode, intent(out) :: ierr 42*3f7bdce8SBarry Smith end subroutine 43*3f7bdce8SBarry Smith 446dd63270SBarry Smithend interface 456dd63270SBarry Smith 463d1372b2SMartin Diehl#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES) 473d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscFortranPrintToFileUnit 483d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIIOpenWithFileUnit 493d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIISetFileUnit 50*3f7bdce8SBarry Smith!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIISynchronizedPrintf 51*3f7bdce8SBarry Smith!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIIPrintf 523d1372b2SMartin Diehl#endif 533d1372b2SMartin Diehl 5402c639afSMartin Diehlinterface PetscViewerBinaryWrite 550da4d79bSMartin Diehl subroutine PetscViewerBinaryWriteInt(viewer, data, count, ierr) 56fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 576dd63270SBarry Smith import tPetscViewer 580da4d79bSMartin Diehl PetscViewer viewer 590da4d79bSMartin Diehl PetscInt data(*) 600da4d79bSMartin Diehl PetscInt count 616dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 6202c639afSMartin Diehl end subroutine 630da4d79bSMartin Diehl subroutine PetscViewerBinaryWriteScalar(viewer, data, count, ierr) 64fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 656dd63270SBarry Smith import tPetscViewer 660da4d79bSMartin Diehl PetscViewer viewer 670da4d79bSMartin Diehl PetscScalar data(*) 680da4d79bSMartin Diehl PetscInt count 696dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 7002c639afSMartin Diehl end subroutine 716dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 720da4d79bSMartin Diehl subroutine PetscViewerBinaryWriteReal(viewer, data, count, ierr) 73fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 746dd63270SBarry Smith import tPetscViewer 750da4d79bSMartin Diehl PetscViewer viewer 760da4d79bSMartin Diehl PetscReal data(*) 770da4d79bSMartin Diehl PetscInt count 786dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 7902c639afSMartin Diehl end subroutine 806dd63270SBarry Smith#endif 8102c639afSMartin Diehlend interface PetscViewerBinaryWrite 826dd63270SBarry Smith 8302c639afSMartin Diehlinterface PetscViewerBinaryRead 840da4d79bSMartin Diehl subroutine PetscViewerBinaryReadInt(viewer, data, count, ierr) 85fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 866dd63270SBarry Smith import tPetscViewer 870da4d79bSMartin Diehl PetscViewer viewer 880da4d79bSMartin Diehl PetscInt data(*) 890da4d79bSMartin Diehl PetscInt count 906dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 9102c639afSMartin Diehl end subroutine 920da4d79bSMartin Diehl subroutine PetscViewerBinaryReadScalar(viewer, data, count, ierr) 93fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 946dd63270SBarry Smith import tPetscViewer 950da4d79bSMartin Diehl PetscViewer viewer 960da4d79bSMartin Diehl PetscScalar data(*) 970da4d79bSMartin Diehl PetscInt count 986dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 9902c639afSMartin Diehl end subroutine 1006dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 1010da4d79bSMartin Diehl subroutine PetscViewerBinaryReadReal(viewer, data, count, ierr) 102fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 1036dd63270SBarry Smith import tPetscViewer 1040da4d79bSMartin Diehl PetscViewer viewer 1050da4d79bSMartin Diehl PetscReal data(*) 1060da4d79bSMartin Diehl PetscInt count 1076dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 10802c639afSMartin Diehl end subroutine 1096dd63270SBarry Smith#endif 11002c639afSMartin Diehlend interface PetscViewerBinaryRead 1116dd63270SBarry Smith 112a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute 113a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeInt(viewer, parent, name, value, ierr) 114fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 115a968899dSTapashree Pradhan import tPetscViewer 116a968899dSTapashree Pradhan PetscViewer :: viewer 117a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 118a968899dSTapashree Pradhan PetscInt, intent(in) :: value 119a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 120a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeInt 121a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeScalar(viewer, parent, name, value, ierr) 122fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 123a968899dSTapashree Pradhan import tPetscViewer 124a968899dSTapashree Pradhan PetscViewer :: viewer 125a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 126a968899dSTapashree Pradhan PetscScalar, intent(in) :: value 127a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 128a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeScalar 129a968899dSTapashree Pradhan#if defined(PETSC_USE_COMPLEX) 130a968899dSTapashree Pradhan subroutine PetscViewerHDF5WriteAttributeReal(viewer, parent, name, value, ierr) 131fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 132a968899dSTapashree Pradhan import tPetscViewer 133a968899dSTapashree Pradhan PetscViewer :: viewer 134a968899dSTapashree Pradhan character(len=*), intent(in) :: parent, name 135a968899dSTapashree Pradhan PetscReal, intent(in) :: value 136a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 137a968899dSTapashree Pradhan end subroutine PetscViewerHDF5WriteAttributeReal 138a968899dSTapashree Pradhan#endif 139a968899dSTapashree Pradhanend interface PetscViewerHDF5WriteAttribute 140