tinyInfo.clear();
littleStrings.clear();
littleStrings.push_back(getName());
+ littleStrings.push_back(getDescription());
const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
for(int i=0;i<3;i++)
{
const std::vector<std::string>& littleStrings)
{
setName(littleStrings[0].c_str());
+ setDescription(littleStrings[1].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+1].c_str());
+ (*(thisArr[i]))->setInfoOnComponent(0,littleStrings[i+2].c_str());
std::copy(data,data+tinyInfo[i],(*(thisArr[i]))->getPointer());
data+=tinyInfo[i];
}
tinyInfo.push_back(tinyInfo1.size());
tinyInfo.push_back(_mesh3D_ids->getNbOfElems());
littleStrings.push_back(getName());
+ littleStrings.push_back(getDescription());
}
void MEDCouplingExtrudedMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
//
a1->alloc(la1+tinyInfo[sz-1],1);
a2->alloc(la2,1);
- littleStrings.resize(ls1.size()+ls2.size()+1);
+ littleStrings.resize(ls1.size()+ls2.size()+2);
}
void MEDCouplingExtrudedMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
void MEDCouplingExtrudedMesh::unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
{
- setName(littleStrings.back().c_str());
+ setName(littleStrings[littleStrings.size()-2].c_str());
+ setDescription(littleStrings.back().c_str());
int sz=tinyInfo.size();
int sz1=tinyInfo[sz-2];
_cell_2D_id=tinyInfo[sz-3];
a1tmp->decrRef(); a2tmp->decrRef();
//
ls2.clear();
- ls2.insert(ls2.end(),littleStrings.begin()+ls1.size(),littleStrings.end()-1);
+ ls2.insert(ls2.end(),littleStrings.begin()+ls1.size(),littleStrings.end()-2);
_mesh1D=MEDCouplingUMesh::New();
a1tmp=DataArrayInt::New(); a2tmp=DataArrayDouble::New();
_mesh1D->resizeForUnserialization(ti2,a1tmp,a2tmp,ls1);
if(_coords)
{
int spaceDim=getSpaceDimension();
- littleStrings.resize(spaceDim+1);
+ littleStrings.resize(spaceDim+3);
littleStrings[0]=getName();
+ littleStrings[1]=getDescription();
+ littleStrings[2]=_coords->getName();
for(int i=0;i<spaceDim;i++)
- littleStrings[i+1]=getCoords()->getInfoOnComponent(i);
+ littleStrings[i+3]=getCoords()->getInfoOnComponent(i);
tinyInfo.clear();
tinyInfo.push_back(getType());
tinyInfo.push_back(spaceDim);
}
else
{
- littleStrings.resize(1);
+ littleStrings.resize(2);
littleStrings[0]=getName();
+ littleStrings[1]=getDescription();
tinyInfo.clear();
tinyInfo.push_back(getType());
tinyInfo.push_back(-1);
if(tinyInfo[2]>=0 && tinyInfo[1]>=1)
{
a2->alloc(tinyInfo[2],tinyInfo[1]);
- littleStrings.resize(tinyInfo[1]+1);
+ littleStrings.resize(tinyInfo[1]+3);
}
else
{
- littleStrings.resize(1);
+ littleStrings.resize(2);
}
}
{
setCoords(a2);
setName(littleStrings[0].c_str());
+ setDescription(littleStrings[1].c_str());
+ a2->setName(littleStrings[2].c_str());
for(int i=0;i<tinyInfo[1];i++)
- getCoords()->setInfoOnComponent(i,littleStrings[i+1].c_str());
+ getCoords()->setInfoOnComponent(i,littleStrings[i+3].c_str());
}
else
- setName(littleStrings[0].c_str());
+ {
+ setName(littleStrings[0].c_str());
+ setDescription(littleStrings[1].c_str());
+ }
}
/*!