XdmfDSM.i 1.92 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
/*
XdmfDSMPython.cpp:
swig -v -c++ -python -o XdmfDSMPython.cpp XdmfDSM.i
*/


%module XdmfDSM
%{

    #include <mpi.h>

    #include <XdmfArray.hpp>
13
    #include <XdmfArrayReference.hpp>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    #include <XdmfArrayType.hpp>
    #include <XdmfCore.hpp>
    #include <XdmfCoreItemFactory.hpp>
    #include <XdmfCoreReader.hpp>
    #include <XdmfDSM.hpp>
    #include <XdmfDSMManager.hpp>
    #include <XdmfDSMBuffer.hpp>
    #include <XdmfDSMCommMPI.hpp>
    #include <XdmfError.hpp>
    #include <XdmfFunction.hpp>
    #include <XdmfHeavyDataController.hpp>
    #include <XdmfHeavyDataWriter.hpp>
    #include <XdmfHDF5Controller.hpp>
    #include <XdmfHDF5Writer.hpp>
    #include <XdmfHDF5ControllerDSM.hpp>
    #include <XdmfHDF5WriterDSM.hpp>
    #include <XdmfInformation.hpp>
    #include <XdmfItem.hpp>
    #include <XdmfItemProperty.hpp>
    #include <XdmfSharedPtr.hpp>
    #include <XdmfSparseMatrix.hpp>
    #include <XdmfSubset.hpp>
    #include <XdmfSystemUtils.hpp>
    #include <XdmfVersion.hpp>
    #include <XdmfVisitor.hpp>
    #include <XdmfWriter.hpp>

    #include <ProjectVersion.hpp>
%}

%import XdmfCore.i

#ifdef SWIGJAVA

%pragma(java) jniclasscode=%{
    static {
        try {
            System.loadLibrary("XdmfDSMJava");
        }
        catch (UnsatisfiedLinkError e) {
            System.err.println("Native code library failed to load for" +
                               "XdmfDSMJava\n" + e);
            System.exit(1);
        }
    }
%}


#endif /* SWIGJAVA */

#ifdef SWIGPYTHON

66
67
68
69
%pythoncode {
    from XdmfCore import *
}

70
71
%include mpi4py/mpi4py.i

72
%mpi4py_typemap(Comm, MPI_Comm);
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

%include <typemaps.i>
%apply int & INOUT {int & data };

#endif /* SWIGPYTHON */



// Shared Pointer Templates
%shared_ptr(XdmfHDF5ControllerDSM)
%shared_ptr(XdmfHDF5WriterDSM)


%include XdmfDSM.hpp
%include XdmfHDF5ControllerDSM.hpp
%include XdmfHDF5WriterDSM.hpp
%include XdmfDSMManager.hpp
%include XdmfDSMBuffer.hpp
%include XdmfDSMCommMPI.hpp