Commits

Satish Balay  committed 3ef9c66

hdf5: add/enable fortran bindings

  • Participants
  • Parent commits 7bba902

Comments (0)

Files changed (2)

File src/sys/classes/viewer/impls/hdf5/ftn-custom/zhdf5f.c

 #include <petscviewerhdf5.h>
 
 #if defined(PETSC_HAVE_FORTRAN_CAPS)
-#define petscviewerhdf5open_     PETSCVIEWERHDF5OPEN
+#define petscviewerhdf5open_        PETSCVIEWERHDF5OPEN
+#define petscviewerhdf5pushgroup_   PETSCVIEWERHDF5PUSHGROUP
+#define petscviewerhdf5getgroup_    PETSCVIEWERHDF5GETGROUP
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
-#define petscviewerhdf5open_     petscviewerhdf5open
+#define petscviewerhdf5open_        petscviewerhdf5open
+#define petscviewerhdf5pushgroup_   petscviewerhdf5pushgroup
+#define petscviewerhdf5getgroup_    petscviewerhdf5getgroup
 #endif
 
 PETSC_EXTERN void PETSC_STDCALL petscviewerhdf5open_(MPI_Comm *comm,CHAR name PETSC_MIXED_LEN(len),PetscFileMode *type,
   FREECHAR(name,c1);
 }
 
+PETSC_EXTERN void PETSC_STDCALL  petscviewerhdf5pushgroup_(PetscViewer *viewer, CHAR name PETSC_MIXED_LEN(len),
+                           PetscErrorCode *ierr PETSC_END_LEN(len))
+{
+  char *c1;
+  FIXCHAR(name,len,c1);
+  *ierr = PetscViewerHDF5PushGroup(*viewer,c1);
+  FREECHAR(name,c1);
+}
+
+PETSC_EXTERN void PETSC_STDCALL  petscviewerhdf5getgroup_(PetscViewer *viewer, CHAR name PETSC_MIXED_LEN(len),
+                           PetscErrorCode *ierr PETSC_END_LEN(len))
+{
+  const char *c1;
+  *ierr = PetscViewerHDF5GetGroup(*viewer,&c1);
+  *ierr = PetscStrncpy(name,c1,len);
+  FIXRETURNCHAR(PETSC_TRUE,name,len);
+}

File src/sys/classes/viewer/impls/hdf5/hdf5v.c

 
 #undef __FUNCT__
 #define __FUNCT__ "PetscViewerHDF5PopGroup"
-/*@C
+/*@
   PetscViewerHDF5PopGroup - Return the current HDF5 group for output to the previous value
 
   Not collective
 
 #undef __FUNCT__
 #define __FUNCT__ "PetscViewerHDF5IncrementTimestep"
-/*@C
+/*@
   PetscViewerHDF5IncrementTimestep - Increments the current timestep for the HDF5 output. Fields are stacked in time.
 
   Not collective
 
 #undef __FUNCT__
 #define __FUNCT__ "PetscViewerHDF5SetTimestep"
-/*@C
+/*@
   PetscViewerHDF5SetTimestep - Set the current timestep for the HDF5 output. Fields are stacked in time. A timestep
   of -1 disables blocking with timesteps.
 
 
 #undef __FUNCT__
 #define __FUNCT__ "PetscViewerHDF5GetTimestep"
-/*@C
+/*@
   PetscViewerHDF5GetTimestep - Get the current timestep for the HDF5 output. Fields are stacked in time.
 
   Not collective