Commit 366b7b37 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

Added Fortran bindings for multiopen code

parent eb3575d5
......@@ -9,6 +9,7 @@
integer xdmfstoremap
integer xdmfaddcoordinate
integer xdmfaddset
integer xdmfgetmaxopenedfiles
! Array Type
integer XDMF_ARRAY_TYPE_INT8
......
......@@ -52,6 +52,7 @@
#include "XdmfUnstructuredGrid.hpp"
#include "XdmfWriter.hpp"
#include "XdmfHDF5Writer.hpp"
#include "XdmfHDF5Controller.hpp"
#include "string.h"
#include <stdio.h>
......@@ -9964,6 +9965,24 @@ extern "C"
xdmfFortran->initHDF5(xmlFilePath, release);
}
unsigned int
XdmfGetMaxOpenedFiles()
{
return XdmfHDF5Controller::getMaxOpenedFiles();
}
void
XdmfSetMaxOpenedFiles(int * numFilePtr)
{
XdmfHDF5Controller::setMaxOpenedFiles(*numFilePtr);
}
void
XdmfCloseOpenedHDF5Files()
{
XdmfHDF5Controller::closeFiles();
}
void
XdmfRead(long * pointer,
char * xmlFilePath)
......
......@@ -183,6 +183,9 @@ class XdmfHDF5WriterDSM;
#define XdmfWriteToDSM xdmfwritetodsm_
#define XdmfWriteHDF5 xdmfwritehdf5_
#define XdmfInitHDF5 xdmfinithdf5_
#define XdmfGetMaxOpenedFiles xdmfgetmaxopenedfiles_
#define XdmfSetMaxOpenedFiles xdmfsetmaxopenedfiles_
#define XdmfCloseOpenedHDF5Files xdmfcloseopenedhdf5files_
#define XdmfSetTopologyPolyline xdmfsettopologypolyline_
#define XdmfSetTopologyPolygon xdmfsettopologypolygon_
#define XdmfRetrieveNumDomainGridCollections xdmfretrievenumdomaingridcollections_
......
......@@ -26,6 +26,13 @@ PROGRAM XdmfFortranExample
infilename = 'my_output.xmf'//CHAR(0)
CALL XDMFINIT(obj)
CALL XDMFSETMAXOPENEDFILES(1)
numContained = XDMFGETMAXOPENEDFILES()
PRINT *, 'Maximum hdf5 files loaded: ', numContained
CALL XDMFREAD(obj, infilename)
PRINT *, 'Load From: ', TRIM(infilename)
......@@ -312,6 +319,7 @@ PROGRAM XdmfFortranExample
PRINT *, 'Key: ', itemKey
PRINT *, 'Value: ', itemValue
CALL XDMFCLOSEOPENEDHDF5FILES()
CALL XDMFCLOSE(obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment