+std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWithoutSDA::splitDiscretizations() const throw(INTERP_KERNEL::Exception)
+{
+ std::vector<INTERP_KERNEL::NormalizedCellType> types;
+ std::vector< std::vector<TypeOfField> > typesF;
+ std::vector< std::vector<std::string> > pfls,locs;
+ std::vector< std::vector<std::pair<int,int> > > bgEnd=getFieldSplitedByType(getMeshName().c_str(),types,typesF,pfls,locs);
+ std::set<TypeOfField> allEnt;
+ for(std::vector< std::vector<TypeOfField> >::const_iterator it1=typesF.begin();it1!=typesF.end();it1++)
+ for(std::vector<TypeOfField>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+ allEnt.insert(*it2);
+ std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > ret(allEnt.size());
+ std::set<TypeOfField>::const_iterator it3(allEnt.begin());
+ for(std::size_t i=0;i<allEnt.size();i++,it3++)
+ {
+ std::vector< std::pair<int,int> > its;
+ ret[i]=shallowCpy();
+ int newLgth=ret[i]->keepOnlySpatialDiscretization(*it3,its);
+ ret[i]->updateData(newLgth,its);
+ }
+ return ret;
+}
+
+int MEDFileAnyTypeField1TSWithoutSDA::keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
+{
+ int globalCounter=0;
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
+ (*it)->keepOnlySpatialDiscretization(tof,globalCounter,its);
+ return globalCounter;
+}
+
+void MEDFileAnyTypeField1TSWithoutSDA::updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops) throw(INTERP_KERNEL::Exception)
+{
+ if(_nb_of_tuples_to_be_allocated>=0)
+ {
+ _nb_of_tuples_to_be_allocated=newLgth;
+ return ;
+ }
+ if(_nb_of_tuples_to_be_allocated==-1)
+ return ;
+ if(_nb_of_tuples_to_be_allocated==-2 || _nb_of_tuples_to_be_allocated==-3)
+ {
+ const DataArray *oldArr=getUndergroundDataArray();
+ if(!oldArr || !oldArr->isAllocated())
+ throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::updateData : internal error 1 !");
+ MEDCouplingAutoRefCountObjectPtr<DataArray> newArr=createNewEmptyDataArrayInstance();
+ newArr->alloc(newLgth,getNumberOfComponents());
+ int pos=0;
+ for(std::vector< std::pair<int,int> >::const_iterator it=oldStartStops.begin();it!=oldStartStops.end();it++)
+ {
+ if((*it).second<(*it).first)
+ throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::updateData : the range in the leaves was invalid !");
+ newArr->setContigPartOfSelectedValues2(pos,oldArr,(*it).first,(*it).second,1);
+ pos+=(*it).second-(*it).first;
+ }
+ setArray(newArr);
+ return ;
+ }
+ throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::updateData : internal error 2 !");
+}
+