16dd63270SBarry Smithinterface 26dd63270SBarry Smith Subroutine PetscFortranPrintToFileUnit(unit,str,ierr) 36dd63270SBarry Smith import tPetscViewer 46dd63270SBarry Smith integer unit 56dd63270SBarry Smith character(len=*), intent(in) :: str 66dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 76dd63270SBarry Smith End Subroutine 86dd63270SBarry Smith Subroutine PetscViewerASCIIOpenWithFileUnit(comm,unit,lab,ierr) 96dd63270SBarry Smith import tPetscViewer 106dd63270SBarry Smith MPI_Comm, intent(in) :: comm 116dd63270SBarry Smith integer, intent(in) :: unit 126dd63270SBarry Smith PetscViewer, intent(out) :: lab 136dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 146dd63270SBarry Smith End Subroutine 156dd63270SBarry Smith Subroutine PetscViewerASCIISetFileUnit(lab,unit,ierr) 166dd63270SBarry Smith import tPetscViewer 176dd63270SBarry Smith PetscViewer, intent(in) :: lab 186dd63270SBarry Smith integer, intent(in) :: unit 196dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 206dd63270SBarry Smith End Subroutine 216dd63270SBarry Smithend interface 226dd63270SBarry Smith 236dd63270SBarry SmithInterface PetscViewerBinaryWrite 246dd63270SBarry Smith Subroutine PetscViewerBinaryWriteInt(v,a,cnt,tmp,ierr) 256dd63270SBarry Smith import tPetscViewer 266dd63270SBarry Smith PetscViewer v 276dd63270SBarry Smith PetscInt a(*) 286dd63270SBarry Smith PetscInt cnt 296dd63270SBarry Smith PetscBool tmp 306dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 316dd63270SBarry Smith End Subroutine 326dd63270SBarry Smith 336dd63270SBarry Smith Subroutine PetscViewerBinaryWriteScalar(v,a,cnt,tmp,ierr) 346dd63270SBarry Smith import tPetscViewer 356dd63270SBarry Smith PetscViewer v 366dd63270SBarry Smith PetscScalar a(*) 376dd63270SBarry Smith PetscInt cnt 386dd63270SBarry Smith PetscBool tmp 396dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 406dd63270SBarry Smith End Subroutine 416dd63270SBarry Smith 426dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 436dd63270SBarry Smith Subroutine PetscViewerBinaryWriteReal(v,a,cnt,tmp,ierr) 446dd63270SBarry Smith import tPetscViewer 456dd63270SBarry Smith PetscViewer v 466dd63270SBarry Smith PetscReal a(*) 476dd63270SBarry Smith PetscInt cnt 486dd63270SBarry Smith PetscBool tmp 496dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 506dd63270SBarry Smith End Subroutine 516dd63270SBarry Smith#endif 52*a968899dSTapashree PradhanEnd Interface PetscViewerBinaryWrite 536dd63270SBarry Smith 54*a968899dSTapashree PradhanInterface PetscViewerBinaryRead 556dd63270SBarry Smith Subroutine PetscViewerBinaryReadInt(v,a,cnt,ierr) 566dd63270SBarry Smith import tPetscViewer 576dd63270SBarry Smith PetscViewer v 586dd63270SBarry Smith PetscInt a(*) 596dd63270SBarry Smith PetscInt cnt 606dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 616dd63270SBarry Smith End Subroutine 626dd63270SBarry Smith 636dd63270SBarry Smith Subroutine PetscViewerBinaryReadScalar(v,a,cnt,ierr) 646dd63270SBarry Smith import tPetscViewer 656dd63270SBarry Smith PetscViewer v 666dd63270SBarry Smith PetscScalar a(*) 676dd63270SBarry Smith PetscInt cnt 686dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 696dd63270SBarry Smith End Subroutine 706dd63270SBarry Smith 716dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX) 726dd63270SBarry Smith Subroutine PetscViewerBinaryReadReal(v,a,cnt,ierr) 736dd63270SBarry Smith import tPetscViewer 746dd63270SBarry Smith PetscViewer v 756dd63270SBarry Smith PetscReal a(*) 766dd63270SBarry Smith PetscInt cnt 776dd63270SBarry Smith PetscErrorCode, intent(out):: ierr 786dd63270SBarry Smith End Subroutine 796dd63270SBarry Smith#endif 80*a968899dSTapashree PradhanEnd Interface PetscViewerBinaryRead 816dd63270SBarry Smith 82*a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute 83*a968899dSTapashree Pradhansubroutine PetscViewerHDF5WriteAttributeInt(viewer,parent,name,value,ierr) 84*a968899dSTapashree Pradhan import tPetscViewer 85*a968899dSTapashree Pradhan PetscViewer :: viewer 86*a968899dSTapashree Pradhan character(len=*), intent(in) :: parent,name 87*a968899dSTapashree Pradhan PetscInt, intent(in) :: value 88*a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 89*a968899dSTapashree Pradhanend subroutine PetscViewerHDF5WriteAttributeInt 90*a968899dSTapashree Pradhan 91*a968899dSTapashree Pradhansubroutine PetscViewerHDF5WriteAttributeScalar(viewer,parent,name,value,ierr) 92*a968899dSTapashree Pradhan import tPetscViewer 93*a968899dSTapashree Pradhan PetscViewer :: viewer 94*a968899dSTapashree Pradhan character(len=*), intent(in) :: parent,name 95*a968899dSTapashree Pradhan PetscScalar, intent(in) :: value 96*a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 97*a968899dSTapashree Pradhanend subroutine PetscViewerHDF5WriteAttributeScalar 98*a968899dSTapashree Pradhan 99*a968899dSTapashree Pradhan#if defined(PETSC_USE_COMPLEX) 100*a968899dSTapashree Pradhansubroutine PetscViewerHDF5WriteAttributeReal(viewer,parent,name,value,ierr) 101*a968899dSTapashree Pradhan import tPetscViewer 102*a968899dSTapashree Pradhan PetscViewer :: viewer 103*a968899dSTapashree Pradhan character(len=*), intent(in) :: parent,name 104*a968899dSTapashree Pradhan PetscReal, intent(in) :: value 105*a968899dSTapashree Pradhan PetscErrorCode, intent(out):: ierr 106*a968899dSTapashree Pradhanend subroutine PetscViewerHDF5WriteAttributeReal 107*a968899dSTapashree Pradhan#endif 108*a968899dSTapashree Pradhan 109*a968899dSTapashree Pradhanend interface PetscViewerHDF5WriteAttribute 110