xref: /petsc/src/sys/ftn-mod/petscviewer.h90 (revision 02c639afa00e507649aa5bac9084590bf17c181c)
16dd63270SBarry Smithinterface
2*02c639afSMartin 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
8*02c639afSMartin Diehl  end subroutine
9*02c639afSMartin Diehl  subroutine PetscViewerASCIIOpenWithFileUnit(comm, unit, lab, ierr)
10fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
116dd63270SBarry Smith    import tPetscViewer
126dd63270SBarry Smith    MPI_Comm, intent(in) :: comm
136dd63270SBarry Smith    integer, intent(in) :: unit
146dd63270SBarry Smith    PetscViewer, intent(out) :: lab
156dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
16*02c639afSMartin Diehl  end subroutine
17*02c639afSMartin Diehl  subroutine PetscViewerASCIISetFileUnit(lab, unit, ierr)
18fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
196dd63270SBarry Smith    import tPetscViewer
206dd63270SBarry Smith    PetscViewer, intent(in) :: lab
216dd63270SBarry Smith    integer, intent(in) :: unit
226dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
23*02c639afSMartin Diehl  end subroutine
246dd63270SBarry Smithend interface
256dd63270SBarry Smith
26*02c639afSMartin Diehlinterface PetscViewerBinaryWrite
27*02c639afSMartin Diehl  subroutine PetscViewerBinaryWriteInt(v, a, cnt, tmp, ierr)
28fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
296dd63270SBarry Smith    import tPetscViewer
306dd63270SBarry Smith    PetscViewer v
316dd63270SBarry Smith    PetscInt a(*)
326dd63270SBarry Smith    PetscInt cnt
336dd63270SBarry Smith    PetscBool tmp
346dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
35*02c639afSMartin Diehl  end subroutine
366dd63270SBarry Smith
37*02c639afSMartin Diehl  subroutine PetscViewerBinaryWriteScalar(v, a, cnt, tmp, ierr)
38fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
396dd63270SBarry Smith    import tPetscViewer
406dd63270SBarry Smith    PetscViewer v
416dd63270SBarry Smith    PetscScalar a(*)
426dd63270SBarry Smith    PetscInt cnt
436dd63270SBarry Smith    PetscBool tmp
446dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
45*02c639afSMartin Diehl  end subroutine
466dd63270SBarry Smith
476dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX)
48*02c639afSMartin Diehl  subroutine PetscViewerBinaryWriteReal(v, a, cnt, tmp, ierr)
49fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
506dd63270SBarry Smith    import tPetscViewer
516dd63270SBarry Smith    PetscViewer v
526dd63270SBarry Smith    PetscReal a(*)
536dd63270SBarry Smith    PetscInt cnt
546dd63270SBarry Smith    PetscBool tmp
556dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
56*02c639afSMartin Diehl  end subroutine
576dd63270SBarry Smith#endif
58*02c639afSMartin Diehlend interface PetscViewerBinaryWrite
596dd63270SBarry Smith
60*02c639afSMartin Diehlinterface PetscViewerBinaryRead
61*02c639afSMartin Diehl  subroutine PetscViewerBinaryReadInt(v, a, cnt, ierr)
62fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
636dd63270SBarry Smith    import tPetscViewer
646dd63270SBarry Smith    PetscViewer v
656dd63270SBarry Smith    PetscInt a(*)
666dd63270SBarry Smith    PetscInt cnt
676dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
68*02c639afSMartin Diehl  end subroutine
696dd63270SBarry Smith
70*02c639afSMartin Diehl  subroutine PetscViewerBinaryReadScalar(v, a, cnt, ierr)
71fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
726dd63270SBarry Smith    import tPetscViewer
736dd63270SBarry Smith    PetscViewer v
746dd63270SBarry Smith    PetscScalar a(*)
756dd63270SBarry Smith    PetscInt cnt
766dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
77*02c639afSMartin Diehl  end subroutine
786dd63270SBarry Smith
796dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX)
80*02c639afSMartin Diehl  subroutine PetscViewerBinaryReadReal(v, a, cnt, ierr)
81fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
826dd63270SBarry Smith    import tPetscViewer
836dd63270SBarry Smith    PetscViewer v
846dd63270SBarry Smith    PetscReal a(*)
856dd63270SBarry Smith    PetscInt cnt
866dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
87*02c639afSMartin Diehl  end subroutine
886dd63270SBarry Smith#endif
89*02c639afSMartin Diehlend interface PetscViewerBinaryRead
906dd63270SBarry Smith
91a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute
92a968899dSTapashree Pradhan  subroutine PetscViewerHDF5WriteAttributeInt(viewer, parent, name, value, ierr)
93fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
94a968899dSTapashree Pradhan    import tPetscViewer
95a968899dSTapashree Pradhan    PetscViewer :: viewer
96a968899dSTapashree Pradhan    character(len=*), intent(in) :: parent, name
97a968899dSTapashree Pradhan    PetscInt, intent(in) :: value
98a968899dSTapashree Pradhan    PetscErrorCode, intent(out):: ierr
99a968899dSTapashree Pradhan  end subroutine PetscViewerHDF5WriteAttributeInt
100a968899dSTapashree Pradhan
101a968899dSTapashree Pradhan  subroutine PetscViewerHDF5WriteAttributeScalar(viewer, parent, name, value, ierr)
102fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
103a968899dSTapashree Pradhan    import tPetscViewer
104a968899dSTapashree Pradhan    PetscViewer :: viewer
105a968899dSTapashree Pradhan    character(len=*), intent(in) :: parent, name
106a968899dSTapashree Pradhan    PetscScalar, intent(in) :: value
107a968899dSTapashree Pradhan    PetscErrorCode, intent(out):: ierr
108a968899dSTapashree Pradhan  end subroutine PetscViewerHDF5WriteAttributeScalar
109a968899dSTapashree Pradhan
110a968899dSTapashree Pradhan#if defined(PETSC_USE_COMPLEX)
111a968899dSTapashree Pradhan  subroutine PetscViewerHDF5WriteAttributeReal(viewer, parent, name, value, ierr)
112fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
113a968899dSTapashree Pradhan    import tPetscViewer
114a968899dSTapashree Pradhan    PetscViewer :: viewer
115a968899dSTapashree Pradhan    character(len=*), intent(in) :: parent, name
116a968899dSTapashree Pradhan    PetscReal, intent(in) :: value
117a968899dSTapashree Pradhan    PetscErrorCode, intent(out):: ierr
118a968899dSTapashree Pradhan  end subroutine PetscViewerHDF5WriteAttributeReal
119a968899dSTapashree Pradhan#endif
120a968899dSTapashree Pradhan
121a968899dSTapashree Pradhanend interface PetscViewerHDF5WriteAttribute
122