xref: /petsc/src/sys/ftn-mod/petscviewer.h90 (revision 0da4d79be8ca4b371773b94100cfa6921df903e2)
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
10*0da4d79bSMartin 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
16*0da4d79bSMartin Diehl    PetscViewer, intent(out) :: viewer
176dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
1802c639afSMartin Diehl  end subroutine
193d1372b2SMartin Diehl
20*0da4d79bSMartin Diehl  subroutine PetscViewerASCIISetFileUnit(viewer, unit, ierr)
21fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
226dd63270SBarry Smith    import tPetscViewer
23*0da4d79bSMartin Diehl    PetscViewer, intent(in) :: viewer
246dd63270SBarry Smith    integer, intent(in) :: unit
256dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
2602c639afSMartin Diehl  end subroutine
276dd63270SBarry Smithend interface
286dd63270SBarry Smith
293d1372b2SMartin Diehl#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
303d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscFortranPrintToFileUnit
313d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIIOpenWithFileUnit
323d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::PetscViewerASCIISetFileUnit
333d1372b2SMartin Diehl#endif
343d1372b2SMartin Diehl
3502c639afSMartin Diehlinterface PetscViewerBinaryWrite
36*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryWriteInt(viewer, data, count, ierr)
37fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
386dd63270SBarry Smith    import tPetscViewer
39*0da4d79bSMartin Diehl    PetscViewer viewer
40*0da4d79bSMartin Diehl    PetscInt data(*)
41*0da4d79bSMartin Diehl    PetscInt count
426dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
4302c639afSMartin Diehl  end subroutine
44*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryWriteScalar(viewer, data, count, ierr)
45fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
466dd63270SBarry Smith    import tPetscViewer
47*0da4d79bSMartin Diehl    PetscViewer viewer
48*0da4d79bSMartin Diehl    PetscScalar data(*)
49*0da4d79bSMartin Diehl    PetscInt count
506dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
5102c639afSMartin Diehl  end subroutine
526dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX)
53*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryWriteReal(viewer, data, count, ierr)
54fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
556dd63270SBarry Smith    import tPetscViewer
56*0da4d79bSMartin Diehl    PetscViewer viewer
57*0da4d79bSMartin Diehl    PetscReal data(*)
58*0da4d79bSMartin Diehl    PetscInt count
596dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
6002c639afSMartin Diehl  end subroutine
616dd63270SBarry Smith#endif
6202c639afSMartin Diehlend interface PetscViewerBinaryWrite
636dd63270SBarry Smith
6402c639afSMartin Diehlinterface PetscViewerBinaryRead
65*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryReadInt(viewer, data, count, ierr)
66fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
676dd63270SBarry Smith    import tPetscViewer
68*0da4d79bSMartin Diehl    PetscViewer viewer
69*0da4d79bSMartin Diehl    PetscInt data(*)
70*0da4d79bSMartin Diehl    PetscInt count
716dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
7202c639afSMartin Diehl  end subroutine
73*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryReadScalar(viewer, data, count, ierr)
74fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
756dd63270SBarry Smith    import tPetscViewer
76*0da4d79bSMartin Diehl    PetscViewer viewer
77*0da4d79bSMartin Diehl    PetscScalar data(*)
78*0da4d79bSMartin Diehl    PetscInt count
796dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
8002c639afSMartin Diehl  end subroutine
816dd63270SBarry Smith#if defined(PETSC_USE_COMPLEX)
82*0da4d79bSMartin Diehl  subroutine PetscViewerBinaryReadReal(viewer, data, count, ierr)
83fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
846dd63270SBarry Smith    import tPetscViewer
85*0da4d79bSMartin Diehl    PetscViewer viewer
86*0da4d79bSMartin Diehl    PetscReal data(*)
87*0da4d79bSMartin Diehl    PetscInt count
886dd63270SBarry Smith    PetscErrorCode, intent(out):: ierr
8902c639afSMartin Diehl  end subroutine
906dd63270SBarry Smith#endif
9102c639afSMartin Diehlend interface PetscViewerBinaryRead
926dd63270SBarry Smith
93a968899dSTapashree Pradhaninterface PetscViewerHDF5WriteAttribute
94a968899dSTapashree Pradhan  subroutine PetscViewerHDF5WriteAttributeInt(viewer, parent, name, value, ierr)
95fe66ebccSMartin Diehl    use, intrinsic :: ISO_C_binding
96a968899dSTapashree Pradhan    import tPetscViewer
97a968899dSTapashree Pradhan    PetscViewer :: viewer
98a968899dSTapashree Pradhan    character(len=*), intent(in) :: parent, name
99a968899dSTapashree Pradhan    PetscInt, intent(in) :: value
100a968899dSTapashree Pradhan    PetscErrorCode, intent(out):: ierr
101a968899dSTapashree Pradhan  end subroutine PetscViewerHDF5WriteAttributeInt
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#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 Pradhanend interface PetscViewerHDF5WriteAttribute
121