connI->decrRef();
}
-void MEDCouplingCMesh::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
{
+ int it,order;
+ double time=getTime(it,order);
tinyInfo.clear();
+ tinyInfoD.clear();
littleStrings.clear();
littleStrings.push_back(getName());
littleStrings.push_back(getDescription());
+ littleStrings.push_back(getTimeUnit());
const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
for(int i=0;i<3;i++)
{
tinyInfo.push_back(val);
littleStrings.push_back(st);
}
+ tinyInfo.push_back(it);
+ tinyInfo.push_back(order);
+ tinyInfoD.push_back(time);
}
void MEDCouplingCMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
a2Ptr=std::copy(thisArr[i]->getConstPointer(),thisArr[i]->getConstPointer()+thisArr[i]->getNumberOfTuples(),a2Ptr);
}
-void MEDCouplingCMesh::unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCouplingCMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings)
{
setName(littleStrings[0].c_str());
setDescription(littleStrings[1].c_str());
+ setTimeUnit(littleStrings[2].c_str());
DataArrayDouble **thisArr[3]={&_x_array,&_y_array,&_z_array};
const double *data=a2->getConstPointer();
for(int i=0;i<3;i++)
{
(*(thisArr[i]))=DataArrayDouble::New();
(*(thisArr[i]))->alloc(tinyInfo[i],1);
- (*(thisArr[i]))->setInfoOnComponent(0,littleStrings[i+2].c_str());
+ (*(thisArr[i]))->setInfoOnComponent(0,littleStrings[i+3].c_str());
std::copy(data,data+tinyInfo[i],(*(thisArr[i]))->getPointer());
data+=tinyInfo[i];
}
}
+ setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
}
void getSplitCellValues(int *res) const;
void getSplitNodeValues(int *res) const;
//serialisation-unserialization
- void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
- void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
private:
MEDCouplingCMesh();
revDescIndx->decrRef();
}
-void MEDCouplingExtrudedMesh::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingExtrudedMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
{
std::vector<int> tinyInfo1;
std::vector<std::string> ls1;
- _mesh2D->getTinySerializationInformation(tinyInfo1,ls1);
+ std::vector<double> ls3;
+ _mesh2D->getTinySerializationInformation(ls3,tinyInfo1,ls1);
std::vector<int> tinyInfo2;
std::vector<std::string> ls2;
- _mesh1D->getTinySerializationInformation(tinyInfo2,ls2);
+ std::vector<double> ls4;
+ _mesh1D->getTinySerializationInformation(ls4,tinyInfo2,ls2);
tinyInfo.clear(); littleStrings.clear();
tinyInfo.insert(tinyInfo.end(),tinyInfo1.begin(),tinyInfo1.end());
littleStrings.insert(littleStrings.end(),ls1.begin(),ls1.end());
a2_2->decrRef();
}
-void MEDCouplingExtrudedMesh::unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingExtrudedMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
{
setName(littleStrings[littleStrings.size()-2].c_str());
setDescription(littleStrings.back().c_str());
a2Ptr+=a2tmp->getNbOfElems();
a1Ptr+=a1tmp->getNbOfElems();
ls2.insert(ls2.end(),littleStrings.begin(),littleStrings.begin()+ls1.size());
- _mesh2D->unserialization(ti1,a1tmp,a2tmp,ls2);
+ std::vector<double> d1(1);
+ _mesh2D->unserialization(d1,ti1,a1tmp,a2tmp,ls2);
a1tmp->decrRef(); a2tmp->decrRef();
//
ls2.clear();
std::copy(a2Ptr,a2Ptr+a2tmp->getNbOfElems(),a2tmp->getPointer());
std::copy(a1Ptr,a1Ptr+a1tmp->getNbOfElems(),a1tmp->getPointer());
a1Ptr+=a1tmp->getNbOfElems();
- _mesh1D->unserialization(ti2,a1tmp,a2tmp,ls2);
+ _mesh1D->unserialization(d1,ti2,a1tmp,a2tmp,ls2);
a1tmp->decrRef(); a2tmp->decrRef();
//
_mesh3D_ids=DataArrayInt::New();
DataArrayDouble *getCoordinatesAndOwner() const;
DataArrayDouble *getBarycenterAndOwner() const;
//Serialization unserialisation
- void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
- void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
private:
MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
#include "MEDCouplingAutoRefCountObjectPtr.hxx"
#include <set>
+#include <cmath>
#include <sstream>
#include <iterator>
using namespace ParaMEDMEM;
+MEDCouplingMesh::MEDCouplingMesh():_time(0.),_iteration(-1),_order(-1)
+{
+}
+
+MEDCouplingMesh::MEDCouplingMesh(const MEDCouplingMesh& other):_name(other._name),_description(other._description),
+ _time(other._time),_iteration(other._iteration),
+ _order(other._order),_time_unit(other._time_unit)
+{
+}
+
/*!
* This method is only for ParaMEDMEM in ParaFIELD constructor.
*/
bool MEDCouplingMesh::isEqual(const MEDCouplingMesh *other, double prec) const
{
- return _name==other->_name && _description==other->_description;
+ return _name==other->_name && _description==other->_description && _iteration==other->_iteration
+ && _order==other->_order && _time_unit==other->_time_unit && fabs(_time-other->_time)<1e-12;
}
/*!
{
_name=other->_name;
_description=other->_description;
+ _time_unit=other->_time_unit;
}
/*!
const char *getName() const { return _name.c_str(); }
void setDescription(const char *descr) { _description=descr; }
const char *getDescription() const { return _description.c_str(); }
+ double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
+ void setTime(double val, int iteration, int order) { _time=val; _iteration=iteration; _order=order; }
+ void setTimeUnit(const char *unit) { _time_unit=unit; }
+ const char *getTimeUnit() const { return _time_unit.c_str(); }
virtual MEDCouplingMesh *deepCpy() const = 0;
virtual MEDCouplingMeshType getType() const = 0;
bool isStructured() const;
virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
//serialisation-unserialization
- virtual void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
+ virtual void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
virtual void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
virtual void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const = 0;
- virtual void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+ virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings) = 0;
protected:
- MEDCouplingMesh() { }
- MEDCouplingMesh(const MEDCouplingMesh& other):_name(other._name),_description(other._description) { }
+ MEDCouplingMesh();
+ MEDCouplingMesh(const MEDCouplingMesh& other);
virtual ~MEDCouplingMesh() { }
private:
std::string _name;
std::string _description;
+ double _time;
+ int _iteration;
+ int _order;
+ std::string _time_unit;
};
}
/*!
* First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process.
*/
-void MEDCouplingPointSet::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingPointSet::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
{
+ int it,order;
+ double time=getTime(it,order);
if(_coords)
{
int spaceDim=getSpaceDimension();
- littleStrings.resize(spaceDim+3);
+ littleStrings.resize(spaceDim+4);
littleStrings[0]=getName();
littleStrings[1]=getDescription();
littleStrings[2]=_coords->getName();
+ littleStrings[3]=getTimeUnit();
for(int i=0;i<spaceDim;i++)
- littleStrings[i+3]=getCoords()->getInfoOnComponent(i);
+ littleStrings[i+4]=getCoords()->getInfoOnComponent(i);
tinyInfo.clear();
tinyInfo.push_back(getType());
tinyInfo.push_back(spaceDim);
tinyInfo.push_back(getNumberOfNodes());
+ tinyInfo.push_back(it);
+ tinyInfo.push_back(order);
+ tinyInfoD.push_back(time);
}
else
{
- littleStrings.resize(2);
+ littleStrings.resize(3);
littleStrings[0]=getName();
littleStrings[1]=getDescription();
+ littleStrings[2]=getTimeUnit();
tinyInfo.clear();
tinyInfo.push_back(getType());
tinyInfo.push_back(-1);
tinyInfo.push_back(-1);
+ tinyInfo.push_back(it);
+ tinyInfo.push_back(order);
+ tinyInfoD.push_back(time);
}
}
if(tinyInfo[2]>=0 && tinyInfo[1]>=1)
{
a2->alloc(tinyInfo[2],tinyInfo[1]);
- littleStrings.resize(tinyInfo[1]+3);
+ littleStrings.resize(tinyInfo[1]+4);
}
else
{
- littleStrings.resize(2);
+ littleStrings.resize(3);
}
}
* Second and final unserialization process.
* @param tinyInfo must be equal to the result given by getTinySerializationInformation method.
*/
-void MEDCouplingPointSet::unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingPointSet::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
{
if(tinyInfo[2]>=0 && tinyInfo[1]>=1)
{
setName(littleStrings[0].c_str());
setDescription(littleStrings[1].c_str());
a2->setName(littleStrings[2].c_str());
+ setTimeUnit(littleStrings[3].c_str());
for(int i=0;i<tinyInfo[1];i++)
- getCoords()->setInfoOnComponent(i,littleStrings[i+3].c_str());
+ getCoords()->setInfoOnComponent(i,littleStrings[i+4].c_str());
+ setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
}
else
{
setName(littleStrings[0].c_str());
setDescription(littleStrings[1].c_str());
+ setTimeUnit(littleStrings[2].c_str());
+ setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
}
}
virtual void renumberNodes2(const int *newNodeNumbers, int newNbOfNodes);
virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const = 0;
//! size of returned tinyInfo must be always the same.
- void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
- void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
virtual void getCellsInBoundingBox(const double *bbox, double eps, std::vector<int>& elems) = 0;
virtual void getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps, std::vector<int>& elems) = 0;
/*!
* First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process.
*/
-void MEDCouplingUMesh::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
{
- MEDCouplingPointSet::getTinySerializationInformation(tinyInfo,littleStrings);
+ MEDCouplingPointSet::getTinySerializationInformation(tinyInfoD,tinyInfo,littleStrings);
tinyInfo.push_back(getMeshDimension());
tinyInfo.push_back(getNumberOfCells());
if(_nodal_connec)
*/
bool MEDCouplingUMesh::isEmptyMesh(const std::vector<int>& tinyInfo) const
{
- return tinyInfo[4]<=0;
+ return tinyInfo[6]<=0;
}
/*!
{
MEDCouplingPointSet::resizeForUnserialization(tinyInfo,a1,a2,littleStrings);
if(tinyInfo[5]!=-1)
- a1->alloc(tinyInfo[5]+tinyInfo[4]+1,1);
+ a1->alloc(tinyInfo[7]+tinyInfo[6]+1,1);
}
/*!
* Second and final unserialization process.
* @param tinyInfo must be equal to the result given by getTinySerializationInformation method.
*/
-void MEDCouplingUMesh::unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
{
- MEDCouplingPointSet::unserialization(tinyInfo,a1,a2,littleStrings);
- setMeshDimension(tinyInfo[3]);
- if(tinyInfo[5]!=-1)
+ MEDCouplingPointSet::unserialization(tinyInfoD,tinyInfo,a1,a2,littleStrings);
+ setMeshDimension(tinyInfo[5]);
+ if(tinyInfo[7]!=-1)
{
// Connectivity
const int *recvBuffer=a1->getConstPointer();
DataArrayInt* myConnecIndex=DataArrayInt::New();
- myConnecIndex->alloc(tinyInfo[4]+1,1);
- std::copy(recvBuffer,recvBuffer+tinyInfo[4]+1,myConnecIndex->getPointer());
+ myConnecIndex->alloc(tinyInfo[6]+1,1);
+ std::copy(recvBuffer,recvBuffer+tinyInfo[6]+1,myConnecIndex->getPointer());
DataArrayInt* myConnec=DataArrayInt::New();
- myConnec->alloc(tinyInfo[5],1);
- std::copy(recvBuffer+tinyInfo[4]+1,recvBuffer+tinyInfo[4]+1+tinyInfo[5],myConnec->getPointer());
+ myConnec->alloc(tinyInfo[7],1);
+ std::copy(recvBuffer+tinyInfo[6]+1,recvBuffer+tinyInfo[6]+1+tinyInfo[7],myConnec->getPointer());
setConnectivity(myConnec, myConnecIndex) ;
myConnec->decrRef();
myConnecIndex->decrRef();
MEDCOUPLING_EXPORT int getMeshLength() const;
MEDCOUPLING_EXPORT void computeTypes();
//! size of returned tinyInfo must be always the same.
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
+ MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
//tools
MEDCOUPLING_EXPORT bool areCellsEqual(int cell1, int cell2, int compType) const;
MEDCOUPLING_EXPORT bool areCellsEqual0(int cell1, int cell2) const;
computeTypes();
}
-void MEDCouplingUMeshDesc::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingUMeshDesc::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
{
- MEDCouplingPointSet::getTinySerializationInformation(tinyInfo,littleStrings);
+ MEDCouplingPointSet::getTinySerializationInformation(tinyInfoD,tinyInfo,littleStrings);
tinyInfo.push_back(getMeshDimension());
tinyInfo.push_back(getNumberOfNodes());
tinyInfo.push_back(getNumberOfCells());
std::copy(faceConnIndex,faceConnIndex+getNumberOfFaces()+1,ptA1);
}
-void MEDCouplingUMeshDesc::unserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingUMeshDesc::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
{
std::vector<int> tinyInfoTmp(tinyInfo.begin()+1,tinyInfo.end());
- MEDCouplingPointSet::unserialization(tinyInfoTmp,a1,a2,littleStrings);
+ MEDCouplingPointSet::unserialization(tinyInfoD,tinyInfoTmp,a1,a2,littleStrings);
//
const int *recvBuffer=a1->getConstPointer();
DataArrayInt *descConn=DataArrayInt::New();
MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED_DESC; }
MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx);
//tools to overload
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
+ MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void getCellsInBoundingBox(const double *bbox, double eps, std::vector<int>& elems);
MEDCOUPLING_EXPORT void getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps, std::vector<int>& elems);
MEDCOUPLING_EXPORT DataArrayInt *mergeNodes(double precision, bool& areNodesMerged, int& newNbOfNodes);
const char *getName() const;
void setDescription(const char *descr);
const char *getDescription() const;
+ void setTime(double val, int iteration, int order);
+ void setTimeUnit(const char *unit);
+ const char *getTimeUnit() const;
virtual MEDCouplingMeshType getType() const throw(INTERP_KERNEL::Exception) = 0;
bool isStructured() const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingMesh *deepCpy() const = 0;
return self->simpleRepr();
}
+ PyObject *getTime() throw(INTERP_KERNEL::Exception)
+ {
+ int tmp1,tmp2;
+ double tmp0=self->getTime(tmp1,tmp2);
+ PyObject *res = PyList_New(3);
+ PyList_SetItem(res,0,SWIG_From_double(tmp0));
+ PyList_SetItem(res,1,SWIG_From_int(tmp1));
+ PyList_SetItem(res,2,SWIG_From_int(tmp2));
+ return res;
+ }
+
int getCellContainingPoint(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
{
int sz;
virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const throw(INTERP_KERNEL::Exception) = 0;
virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception) = 0;
//! size of returned tinyInfo must be always the same.
- void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const throw(INTERP_KERNEL::Exception);
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const throw(INTERP_KERNEL::Exception);
void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const throw(INTERP_KERNEL::Exception);
void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const throw(INTERP_KERNEL::Exception);
- void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings) throw(INTERP_KERNEL::Exception);
virtual void getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps, std::vector<int>& elems) throw(INTERP_KERNEL::Exception) = 0;
virtual DataArrayInt *zipCoordsTraducer() throw(INTERP_KERNEL::Exception) = 0;
// First stage : exchanging sizes
// ------------------------------
+ vector<double> tinyInfoLocalD,tinyInfoDistantD(1);//not used for the moment
vector<int> tinyInfoLocal,tinyInfoDistant;
vector<string> tinyInfoLocalS;
//Getting tiny info of local mesh to allow the distant proc to initialize and allocate
//the transmitted mesh.
- local_mesh->getTinySerializationInformation(tinyInfoLocal,tinyInfoLocalS);
+ local_mesh->getTinySerializationInformation(tinyInfoLocalD,tinyInfoLocal,tinyInfoLocalS);
tinyInfoLocal.push_back(distant_ids_send->getNumberOfTuples());
tinyInfoDistant.resize(tinyInfoLocal.size());
std::fill(tinyInfoDistant.begin(),tinyInfoDistant.end(),0);
//
distant_mesh=distant_mesh_tmp;
//finish unserialization
- distant_mesh->unserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
+ distant_mesh->unserialization(tinyInfoDistantD,tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
//
distant_ids_recv=new int[tinyInfoDistant.back()];
comm_interface.sendRecv((void *)distant_ids_send->getConstPointer(),tinyInfoLocal.back(), MPI_INT,