def MEDCouplingDataArrayDoubleIpow(self,*args):
import _MEDLoader
return _MEDLoader.DataArrayDouble____ipow___(self, self, *args)
-def MEDCouplingFieldDoublenew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingFieldDouble____new___(cls,args)
def MEDCouplingFieldDoubleIadd(self,*args):
import _MEDLoader
return _MEDLoader.MEDCouplingFieldDouble____iadd___(self, self, *args)
def MEDCouplingFieldDoubleIpow(self,*args):
import _MEDLoader
return _MEDLoader.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingFieldIntnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingFieldInt____new___(cls,args)
-def MEDCouplingFieldFloatnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingFieldFloat____new___(cls,args)
-def MEDCouplingDataArrayBytenew(cls,*args):
- import _MEDLoader
- return _MEDLoader.DataArrayByte____new___(cls,args)
-def MEDCouplingDataArrayFloatnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.DataArrayFloat____new___(cls,args)
def MEDCouplingDataArrayFloatIadd(self,*args):
import _MEDLoader
return _MEDLoader.DataArrayFloat____iadd___(self, self, *args)
def MEDCouplingDataArrayFloatIdiv(self,*args):
import _MEDLoader
return _MEDLoader.DataArrayFloat____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.DataArrayInt____new___(cls,args)
def MEDCouplingDataArrayIntIadd(self,*args):
import _MEDLoader
return _MEDLoader.DataArrayInt____iadd___(self, self, *args)
def ParaMEDMEMDenseMatrixIsub(self,*args):
import _MEDLoader
return _MEDLoader.DenseMatrix____isub___(self, self, *args)
-def MEDCouplingUMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingUMesh____new___(cls,args)
-def MEDCoupling1DGTUMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCoupling1DGTUMesh____new___(cls,args)
-def MEDCoupling1SGTUMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCoupling1SGTUMesh____new___(cls,args)
-def MEDCouplingCurveLinearMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingCurveLinearMesh____new___(cls,args)
-def MEDCouplingCMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingCMesh____new___(cls,args)
-def MEDCouplingIMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingIMesh____new___(cls,args)
-def MEDCouplingExtrudedMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%pythoncode %{
-def MEDCouplingMEDFileUMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDFileUMesh____new___(cls,args)
-def MEDCouplingMEDFileCMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDFileCMesh____new___(cls,args)
-def MEDCouplingMEDFileCurveLinearMeshnew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDFileCurveLinearMesh____new___(cls,args)
def MEDCouplingMEDFileMeshesnew(cls,*args):
import _MEDLoader
return _MEDLoader.MEDFileMeshes____new___(cls,args)
-def MEDCouplingMEDFileDatanew(cls,*args):
- import _MEDLoader
- return _MEDLoader.MEDFileData____new___(cls,args)
def MEDCouplingMEDFileFieldsnew(cls,*args):
import _MEDLoader
return _MEDLoader.MEDFileFields____new___(cls,args)
%}
%pythoncode %{
-MEDFileUMesh.__new__=classmethod(MEDCouplingMEDFileUMeshnew)
-del MEDCouplingMEDFileUMeshnew
-MEDFileCMesh.__new__=classmethod(MEDCouplingMEDFileCMeshnew)
-del MEDCouplingMEDFileCMeshnew
-MEDFileCurveLinearMesh.__new__=classmethod(MEDCouplingMEDFileCurveLinearMeshnew)
-del MEDCouplingMEDFileCurveLinearMeshnew
-MEDFileData.__new__=classmethod(MEDCouplingMEDFileDatanew)
-del MEDCouplingMEDFileDatanew
-MEDFileMeshes.__new__=classmethod(MEDCouplingMEDFileMeshesnew)
-del MEDCouplingMEDFileMeshesnew
-MEDFileFields.__new__=classmethod(MEDCouplingMEDFileFieldsnew)
-del MEDCouplingMEDFileFieldsnew
-MEDFileField1TS.__new__=classmethod(MEDCouplingMEDFileField1TSnew)
-del MEDCouplingMEDFileField1TSnew
-MEDFileFieldMultiTS.__new__=classmethod(MEDCouplingMEDFileFieldMultiTSnew)
-del MEDCouplingMEDFileFieldMultiTSnew
-MEDFileIntField1TS.__new__=classmethod(MEDCouplingMEDFileIntField1TSnew)
-del MEDCouplingMEDFileIntField1TSnew
-MEDFileIntFieldMultiTS.__new__=classmethod(MEDCouplingMEDFileIntFieldMultiTSnew)
-del MEDCouplingMEDFileIntFieldMultiTSnew
-MEDFileFloatField1TS.__new__=classmethod(MEDCouplingMEDFileFloatField1TSnew)
-del MEDCouplingMEDFileFloatField1TSnew
-MEDFileFloatFieldMultiTS.__new__=classmethod(MEDCouplingMEDFileFloatFieldMultiTSnew)
-del MEDCouplingMEDFileFloatFieldMultiTSnew
-MEDFileParameters.__new__=classmethod(MEDCouplingMEDFileParametersnew)
-del MEDCouplingMEDFileParametersnew
+def MEDCouplingMEDFileUMeshReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileUMesh,((),(self.__getstate__()),))
+MEDFileUMesh.__reduce__=MEDCouplingMEDFileUMeshReduce
+del MEDCouplingMEDFileUMeshReduce
+def MEDCouplingMEDFileCMeshReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileCMesh,((self.serialize(),),(self.__getstate__()),))
+MEDFileCMesh.__reduce__=MEDCouplingMEDFileCMeshReduce
+del MEDCouplingMEDFileCMeshReduce
+def MEDCouplingMEDFileCurveLinearMeshReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileCurveLinearMesh,((self.serialize(),),(self.__getstate__()),))
+MEDFileCurveLinearMesh.__reduce__=MEDCouplingMEDFileCurveLinearMeshReduce
+del MEDCouplingMEDFileCurveLinearMeshReduce
+def MEDCouplingMEDFileDataReduce(self):#"PyWrap of MEDFileData.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !"
+ return MEDCouplingStdReduceFunct,(MEDFileData,((self.serialize(),),(self.__getstate__()),))
+MEDFileData.__reduce__=MEDCouplingMEDFileDataReduce
+del MEDCouplingMEDFileDataReduce
+def MEDCouplingMEDFileMeshesReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileMeshes,((self.serialize(),),(self.__getstate__()),))
+MEDFileMeshes.__reduce__=MEDCouplingMEDFileMeshesReduce
+del MEDCouplingMEDFileMeshesReduce
+def MEDCouplingMEDFileFieldsReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileFields,((self.serialize(),),(self.__getstate__()),))
+MEDFileFields.__reduce__=MEDCouplingMEDFileFieldsReduce
+del MEDCouplingMEDFileFieldsReduce
+def MEDCouplingMEDFileField1TSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileField1TS,((self.serialize(),),(self.__getstate__()),))
+MEDFileField1TS.__reduce__=MEDCouplingMEDFileField1TSReduce
+del MEDCouplingMEDFileField1TSReduce
+def MEDCouplingMEDFileFieldMultiTSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileFieldMultiTS,((self.serialize(),),(self.__getstate__()),))
+MEDFileFieldMultiTS.__reduce__=MEDCouplingMEDFileFieldMultiTSReduce
+del MEDCouplingMEDFileFieldMultiTSReduce
+def MEDCouplingMEDFileIntField1TSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileIntField1TS,((self.serialize(),),(self.__getstate__()),))
+MEDFileIntField1TS.__reduce__=MEDCouplingMEDFileIntField1TSReduce
+def MEDCouplingMEDFileIntFieldMultiTSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileIntFieldMultiTS,((self.serialize(),),(self.__getstate__()),))
+MEDFileIntFieldMultiTS.__reduce__=MEDCouplingMEDFileIntFieldMultiTSReduce
+del MEDCouplingMEDFileIntFieldMultiTSReduce
+def MEDCouplingMEDFileFloatField1TSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileFloatField1TS,((self.serialize(),),(self.__getstate__()),))
+MEDFileFloatField1TS.__reduce__=MEDCouplingMEDFileFloatField1TSReduce
+def MEDCouplingMEDFileFloatFieldMultiTSReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileFloatFieldMultiTS,((self.serialize(),),(self.__getstate__()),))
+MEDFileFloatFieldMultiTS.__reduce__=MEDCouplingMEDFileFloatFieldMultiTSReduce
+del MEDCouplingMEDFileFloatFieldMultiTSReduce
+def MEDCouplingMEDFileParametersReduce(self):
+ return MEDCouplingStdReduceFunct,(MEDFileParameters,((self.serialize(),),(self.__getstate__()),))
+MEDFileParameters.__reduce__=MEDCouplingMEDFileParametersReduce
+del MEDCouplingMEDFileParametersReduce
%}
void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
{
}
-
- PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
- {
-#ifdef WITH_NUMPY
- PyObject *ret(PyTuple_New(1));
- PyObject *ret0(PyDict_New());
- DataArrayByte *retCpp(MEDCoupling_MEDFileWritableStandAlone_serialize(self));
- PyObject *numpyArryObj=SWIG_NewPointerObj(SWIG_as_voidptr(retCpp),SWIGTYPE_p_MEDCoupling__DataArrayByte, SWIG_POINTER_OWN | 0 );
- {// create a dict to discriminite in __new__ if __init__ should be called. Not beautiful but not idea ...
- PyObject *tmp1(PyInt_FromLong(0));
- PyDict_SetItem(ret0,tmp1,numpyArryObj); Py_DECREF(tmp1); Py_DECREF(numpyArryObj);
- PyTuple_SetItem(ret,0,ret0);
- }
- return ret;
-#else
- throw INTERP_KERNEL::Exception("PyWrap of MEDFileData.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !");
-#endif
- }
}
};
return MEDFileUMesh::New();
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDFileUMesh");
- }
-
static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, PyObject *types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
{
std::vector<int> typesCpp1;
return MEDFileUMesh::LoadPartOf(fileName,mName,typesCpp2,slicPerTyp,dt,it,mrs);
}
- PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
- {// put an empty dict in input to say to __new__ to call __init__...
- PyObject *ret(PyTuple_New(1));
- PyObject *ret0(PyDict_New());
- PyTuple_SetItem(ret,0,ret0);
- return ret;
- }
-
PyObject *__getstate__() throw(INTERP_KERNEL::Exception)
{
std::vector<double> a0;
{
return MEDFileCMesh::New(db);
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileCMesh");
- }
PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
{
{
return MEDFileCurveLinearMesh::New(db);
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileCurveLinearMesh");
- }
PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
{
return MEDFileMeshes::New(db);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileMeshes");
- }
-
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
{
return MEDFileField1TS::New();
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileField1TS");
- }
void copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception)
{
return MEDFileIntField1TS::New(db);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileIntField1TS");
- }
-
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
return MEDFileFloatField1TS::New(db);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFloatField1TS");
- }
-
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
{
return MEDFileFieldMultiTS::New(db);
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFieldMultiTS");
- }
static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
{
return MEDFileIntFieldMultiTS::New(db);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileIntFieldMultiTS");
- }
-
static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
{
std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
return MEDFileFloatFieldMultiTS::New(db);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFloatFieldMultiTS");
- }
-
static MEDFileFloatFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
{
std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
return MEDFileFields::NewAdv(fileName,loadAll,entities);
}
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFields");
- }
-
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
return self->simpleRepr();
{
return MEDFileParameters::New(db);
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileParameters");
- }
std::string __str__() const throw(INTERP_KERNEL::Exception)
{
MCAuto<MEDFileData> ret(MEDFileData::Aggregate(mfdsCpp));
return ret.retn();
}
-
- // serialization
- static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
- {
- return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileData");
- }
}
};