INSTALL(TARGETS _ParaMEDMEM DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
INSTALL(FILES ParaMEDMEM.i DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
+SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MEDCOUPLING_INSTALL_PYTHON})
SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
INSTALL(FILES test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
%module ParaMEDMEM
+#define MEDCOUPLING_EXPORT
+#define INTERPKERNEL_EXPORT
+
%include "ParaMEDMEM.typemap"
%include "MEDCouplingCommon.i"
#include <mpi.h>
+using namespace INTERP_KERNEL;
using namespace MEDCoupling;
using namespace ICoCo;
enum mpi_constants { mpi_comm_world, mpi_comm_self, mpi_double, mpi_int };
%}
+%include "InterpolationOptions.hxx"
%include "CommInterface.hxx"
%include "ProcessorGroup.hxx"
%include "DECOptions.hxx"
%include "MPIProcessorGroup.hxx"
%include "ComponentTopology.hxx"
%include "DEC.hxx"
+%include "DisjointDEC.hxx"
%include "InterpKernelDEC.hxx"
%include "StructuredCoincidentDEC.hxx"
+%include "ICoCoField.hxx"
%rename(ICoCoMEDField) ICoCo::MEDField;
%include "ICoCoMEDField.hxx"
#
from ParaMEDMEM import *
+from MEDLoader import ReadUMeshFromFile
import sys, os
import unittest
import math
+from mpi4py import MPI
+
class ParaMEDMEMBasicsTest(unittest.TestCase):
def testInterpKernelDEC_2D(self):
- MPI_Init(sys.argv)
- size = MPI_Comm_size(MPI_COMM_WORLD)
- rank = MPI_Comm_rank(MPI_COMM_WORLD)
+ size = MPI.COMM_WORLD.size
+ rank = MPI.COMM_WORLD.rank
if size != 5:
raise RuntimeError("Expect MPI_COMM_WORLD size == 5")
print(rank)
nb_local=mesh.getNumberOfCells()
value = [1.0]*nb_local
parafield.getField().setValues(value)
- icocofield = ICoCoMEDField(mesh,parafield.getField())
- dec.setMethod("P0")
+ icocofield = ICoCoMEDField(parafield.getField())
dec.attachLocalField(icocofield)
pass
else:
nb_local=mesh.getNumberOfCells()
value = [0.0]*nb_local
parafield.getField().setValues(value)
- icocofield = ICoCoMEDField(mesh,parafield.getField())
- dec.setMethod("P0")
+ icocofield = ICoCoMEDField(parafield.getField())
dec.attachLocalField(icocofield)
pass