+ if(_loc.empty())
+ {
+ if(getPflName().empty())
+ return (_start_end.second-_start_end.first)/_nb_of_entity;
+ else
+ return (_start_end.second-_start_end.first)/getPfl(globs)->getNumberOfTuples();
+ }
+ else
+ {
+ const MEDFileFieldLoc& loc(globs->getLocalization(_loc.c_str()));
+ return loc.getNumberOfGaussPoints();
+ }
+}
+
+std::string MEDFileField1TSStructItem2::getPflName() const
+{
+ return _pfl->getName();
+}
+
+const DataArrayInt *MEDFileField1TSStructItem2::getPfl(const MEDFileFieldGlobsReal *globs) const
+{
+ if(!_pfl->isAllocated())
+ {
+ if(_pfl->getName().empty())
+ return 0;
+ else
+ return globs->getProfile(_pfl->getName().c_str());
+ }
+ else
+ return _pfl;
+}
+
+/*!
+ * \param [in] nbOfEntity - number of entity that can be either cells or nodes. Not other possibility.
+ * \param [in] nip - number of integration points. 1 for ON_CELLS and NO_NODES
+ */
+void MEDFileField1TSStructItem2::checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs)
+{
+ _nb_of_entity=nbOfEntity;
+ if(_pfl->getName().empty())
+ {
+ if(nbOfEntity!=(_start_end.second-_start_end.first)/nip)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkInRange : Mismatch between number of entities and size of field !");
+ return ;
+ }
+ else
+ {
+ if(!globs)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkInRange : Presence of a profile on field whereas no globals found in file !");
+ const DataArrayInt *pfl=globs->getProfile(_pfl->getName().c_str());
+ if(!pfl)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkInRange : Presence of a profile on field whereas no such profile found in file !");
+ pfl->checkAllIdsInRange(0,nbOfEntity);
+ }
+}
+
+bool MEDFileField1TSStructItem2::isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const
+{
+ if(startExp!=_start_end.first)
+ return false;
+ if(gt!=_geo_type)
+ return false;
+ if(getPflName()!=pflName)
+ return false;
+ startExp=_start_end.second;
+ return true;
+}
+
+bool MEDFileField1TSStructItem2::operator==(const MEDFileField1TSStructItem2& other) const
+{
+ //_nb_of_entity is not taken into account here. It is not a bug, because no mesh consideration needed here to perform fast compare.
+ //idem for _loc. It is not an effective attribute for support comparison.
+ return _geo_type==other._geo_type && _start_end==other._start_end && _pfl->getName()==other._pfl->getName();
+}
+
+bool MEDFileField1TSStructItem2::isCellSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const
+{
+ if(_geo_type!=other._geo_type)
+ return false;
+ if(_nb_of_entity!=other._nb_of_entity)
+ return false;
+ if((_pfl->getName().empty() && !other._pfl->getName().empty()) || (!_pfl->getName().empty() && other._pfl->getName().empty()))
+ return false;
+ if(_pfl->getName().empty() && other._pfl->getName().empty())
+ return true;
+ const DataArrayInt *pfl1(getPfl(globs)),*pfl2(other.getPfl(globs));
+ return pfl1->isEqualWithoutConsideringStr(*pfl2);
+}
+
+bool MEDFileField1TSStructItem2::isNodeSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const
+{
+ return isCellSupportEqual(other,globs);
+}
+
+/*!
+ * \a objs must be non empty. \a objs should contain items having same geometric type.
+ */
+MEDFileField1TSStructItem2 MEDFileField1TSStructItem2::BuildAggregationOf(const std::vector<const MEDFileField1TSStructItem2 *>& objs, const MEDFileFieldGlobsReal *globs)
+{
+ if(objs.empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : empty input !");
+ if(objs.size()==1)
+ return MEDFileField1TSStructItem2(*objs[0]);
+ INTERP_KERNEL::NormalizedCellType gt(objs[0]->_geo_type);
+ int nbEntityRef(objs[0]->_nb_of_entity);
+ std::size_t sz(objs.size());
+ std::vector<const DataArrayInt *> arrs(sz);
+ for(std::size_t i=0;i<sz;i++)
+ {
+ const MEDFileField1TSStructItem2 *obj(objs[i]);
+ if(gt!=obj->_geo_type)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : invalid situation ! All input must have the same geo type !");
+ if(nbEntityRef!=obj->_nb_of_entity)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : invalid situation ! All input must have the global nb of entity !");
+ if(obj->_pfl->getName().empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : invalid situation ! Several same geo type chunk must all lie on profiles !");
+ arrs[i]=globs->getProfile(obj->_pfl->getName().c_str());
+ }
+ MCAuto<DataArrayInt> arr(DataArrayInt::Aggregate(arrs));
+ arr->sort();
+ int oldNbTuples(arr->getNumberOfTuples());
+ arr=arr->buildUnique();
+ if(oldNbTuples!=arr->getNumberOfTuples())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : some entities are present several times !");
+ if(arr->isIota(nbEntityRef))
+ {
+ std::pair<int,int> p(0,nbEntityRef);
+ std::string a,b;
+ MEDFileField1TSStructItem2 ret(gt,p,a,b);
+ ret._nb_of_entity=nbEntityRef;
+ return ret;
+ }
+ else
+ {
+ arr->setName(NEWLY_CREATED_PFL_NAME);
+ std::pair<int,int> p(0,oldNbTuples);
+ std::string a,b;
+ MEDFileField1TSStructItem2 ret(gt,p,a,b);
+ ret._nb_of_entity=nbEntityRef;
+ ret._pfl=arr;
+ return ret;
+ }
+}
+
+std::size_t MEDFileField1TSStructItem2::getHeapMemorySizeWithoutChildren() const
+{
+ std::size_t ret(_loc.capacity());
+ return ret;
+}
+
+std::vector<const BigMemoryObject *> MEDFileField1TSStructItem2::getDirectChildrenWithNull() const
+{
+ std::vector<const BigMemoryObject *> ret;
+ ret.push_back((const DataArrayInt *)_pfl);
+ return ret;
+}
+
+//=
+
+MEDFileField1TSStructItem::MEDFileField1TSStructItem(TypeOfField a, const std::vector< MEDFileField1TSStructItem2 >& b):_computed(false),_type(a),_items(b)
+{
+}
+
+void MEDFileField1TSStructItem::checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs)
+{
+ switch(_type)
+ {
+ case ON_NODES:
+ {
+ int nbOfEnt=mst->getNumberOfNodes();
+ if(_items.size()!=1)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::checkWithMeshStruct : for nodes field only one subdivision supported !");
+ _items[0].checkInRange(nbOfEnt,1,globs);
+ break ;
+ }
+ case ON_CELLS:
+ {
+ for(std::vector< MEDFileField1TSStructItem2 >::iterator it=_items.begin();it!=_items.end();it++)
+ (*it).checkWithMeshStructForCells(mst,globs);
+ break;
+ }
+ case ON_GAUSS_NE:
+ {
+ for(std::vector< MEDFileField1TSStructItem2 >::iterator it=_items.begin();it!=_items.end();it++)
+ (*it).checkWithMeshStructForGaussNE(mst,globs);
+ break;
+ }
+ case ON_GAUSS_PT:
+ {
+ for(std::vector< MEDFileField1TSStructItem2 >::iterator it=_items.begin();it!=_items.end();it++)
+ (*it).checkWithMeshStructForGaussPT(mst,globs);
+ break;
+ }
+ default:
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::checkWithMeshStruct : not managed field type !");
+ }
+}
+
+bool MEDFileField1TSStructItem::operator==(const MEDFileField1TSStructItem& other) const
+{
+ if(_type!=other._type)
+ return false;
+ if(_items.size()!=other._items.size())
+ return false;
+ for(std::size_t i=0;i<_items.size();i++)
+ if(!(_items[i]==other._items[i]))
+ return false;
+ return true;
+}
+
+bool MEDFileField1TSStructItem::isCellSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const
+{
+ if(_type!=other._type)
+ return false;
+ if(_items.size()!=other._items.size())
+ return false;
+ for(std::size_t i=0;i<_items.size();i++)
+ if(!(_items[i].isCellSupportEqual(other._items[i],globs)))
+ return false;
+ return true;
+}
+
+bool MEDFileField1TSStructItem::isNodeSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const
+{
+ if(_type!=other._type)
+ return false;
+ if(_items.size()!=other._items.size())
+ return false;
+ for(std::size_t i=0;i<_items.size();i++)
+ if(!(_items[i].isNodeSupportEqual(other._items[i],globs)))
+ return false;
+ return true;
+}
+
+bool MEDFileField1TSStructItem::isEntityCell() const
+{
+ if(_type==ON_NODES)
+ return false;
+ else
+ return true;
+}
+
+class CmpGeo
+{
+public:
+ CmpGeo(INTERP_KERNEL::NormalizedCellType geoTyp):_geo_type(geoTyp) { }
+ bool operator()(const std::pair< INTERP_KERNEL::NormalizedCellType, std::vector<std::size_t> > & v) const { return _geo_type==v.first; }
+private:
+ INTERP_KERNEL::NormalizedCellType _geo_type;
+};
+
+MEDFileField1TSStructItem MEDFileField1TSStructItem::simplifyMeOnCellEntity(const MEDFileFieldGlobsReal *globs) const
+{
+ if(!isEntityCell())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::simplifyMeOnCellEntity : must be on ON_CELLS, ON_GAUSS_NE or ON_GAUSS_PT !");
+ std::vector< std::pair< INTERP_KERNEL::NormalizedCellType, std::vector<std::size_t> > > m;
+ std::size_t i=0;
+ for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++,i++)
+ {
+ std::vector< std::pair< INTERP_KERNEL::NormalizedCellType, std::vector<std::size_t> > >::iterator it0(std::find_if(m.begin(),m.end(),CmpGeo((*it).getGeo())));
+ if(it0==m.end())
+ m.push_back(std::pair< INTERP_KERNEL::NormalizedCellType, std::vector<std::size_t> >((*it).getGeo(),std::vector<std::size_t>(1,i)));
+ else
+ (*it0).second.push_back(i);
+ }
+ if(m.size()==_items.size())
+ {
+ MEDFileField1TSStructItem ret(*this);
+ ret._type=ON_CELLS;
+ return ret;
+ }
+ std::size_t sz(m.size());
+ std::vector< MEDFileField1TSStructItem2 > items(sz);
+ for(i=0;i<sz;i++)
+ {
+ const std::vector<std::size_t>& ids=m[i].second;
+ std::vector<const MEDFileField1TSStructItem2 *>objs(ids.size());
+ for(std::size_t j=0;j<ids.size();j++)
+ objs[j]=&_items[ids[j]];
+ items[i]=MEDFileField1TSStructItem2::BuildAggregationOf(objs,globs);
+ }
+ MEDFileField1TSStructItem ret(ON_CELLS,items);
+ ret._computed=true;
+ return ret;
+}
+
+/*!
+ * \a this is expected to be ON_CELLS and simplified.
+ */
+bool MEDFileField1TSStructItem::isCompatibleWithNodesDiscr(const MEDFileField1TSStructItem& other, const MEDFileMeshStruct *meshSt, const MEDFileFieldGlobsReal *globs) const
+{
+ if(other._type!=ON_NODES)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isCompatibleWithNodesDiscr : other must be on nodes !");
+ if(other._items.size()!=1)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isCompatibleWithNodesDiscr : other is on nodes but number of subparts !");
+ int theFirstLevFull;
+ bool ret0=isFullyOnOneLev(meshSt,theFirstLevFull);
+ const MEDFileField1TSStructItem2& otherNodeIt(other._items[0]);
+ int nbOfNodes(meshSt->getNumberOfNodes());
+ if(otherNodeIt.getPflName().empty())
+ {//on all nodes
+ if(!ret0)
+ return false;
+ std::vector<bool> nodesFetched(nbOfNodes,false);
+ meshSt->getTheMesh()->whichAreNodesFetched(*this,globs,nodesFetched);
+ if(std::find(nodesFetched.begin(),nodesFetched.end(),false)==nodesFetched.end())
+ return theFirstLevFull==0;
+ else
+ return false;
+ }
+ else
+ {
+ const DataArrayInt *pfl=globs->getProfile(otherNodeIt.getPflName().c_str());
+ MCAuto<DataArrayInt> cpyPfl(pfl->deepCopy());
+ cpyPfl->sort();
+ if(cpyPfl->isIota(nbOfNodes))
+ {//on all nodes also !
+ if(!ret0)
+ return false;
+ return theFirstLevFull==0;
+ }
+ std::vector<bool> nodesFetched(nbOfNodes,false);
+ meshSt->getTheMesh()->whichAreNodesFetched(*this,globs,nodesFetched);
+ return cpyPfl->isFittingWith(nodesFetched);
+ }
+}
+
+bool MEDFileField1TSStructItem::isFullyOnOneLev(const MEDFileMeshStruct *meshSt, int& theFirstLevFull) const
+{
+ if(_type!=ON_CELLS)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isFullyOnOneLev : works only for ON_CELLS discretization !");
+ if(_items.empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isFullyOnOneLev : items vector is empty !");
+ int nbOfLevs(meshSt->getNumberOfLevs());
+ if(nbOfLevs==0)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isFullyOnOneLev : no levels in input mesh structure !");
+ std::vector<int> levs(nbOfLevs);
+ theFirstLevFull=1;
+ std::set<INTERP_KERNEL::NormalizedCellType> gts;
+ for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++)
+ {
+ if(!(*it).getPflName().empty())
+ return false;
+ INTERP_KERNEL::NormalizedCellType gt((*it).getGeo());
+ if(gts.find(gt)!=gts.end())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::isFullyOnOneLev : internal error !");
+ gts.insert(gt);
+ int pos(meshSt->getLevelOfGeoType((*it).getGeo()));
+ levs[-pos]++;
+ }
+ for(int i=0;i<nbOfLevs;i++)
+ if(meshSt->getNumberOfGeoTypesInLev(-i)==levs[i])
+ { theFirstLevFull=-i; return true; }
+ return false;
+}
+
+const MEDFileField1TSStructItem2& MEDFileField1TSStructItem::operator[](std::size_t i) const
+{
+ if(i>=_items.size())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::operator[] : input is not in valid range !");
+ return _items[i];
+}
+
+std::size_t MEDFileField1TSStructItem::getHeapMemorySizeWithoutChildren() const
+{
+ std::size_t ret(_items.size()*sizeof(MEDFileField1TSStructItem2));
+ return ret;
+}
+
+std::vector<const BigMemoryObject *> MEDFileField1TSStructItem::getDirectChildrenWithNull() const
+{
+ std::vector<const BigMemoryObject *> ret;
+ for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++)
+ ret.push_back(&(*it));
+ return ret;
+}
+
+MEDMeshMultiLev *MEDFileField1TSStructItem::buildFromScratchDataSetSupportOnCells(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) const
+{
+ std::size_t sz(_items.size());
+ std::vector<INTERP_KERNEL::NormalizedCellType> a0(sz);
+ std::vector<const DataArrayInt *> a1(sz);
+ std::vector<int> a2(sz);
+ std::size_t i(0);
+ for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++,i++)
+ {
+ a0[i]=(*it).getGeo();
+ a1[i]=(*it).getPfl(globs);
+ a2[i]=mst->getNumberOfElemsOfGeoType((*it).getGeo());
+ }
+ return MEDMeshMultiLev::New(mst->getTheMesh(),a0,a1,a2);
+}
+
+std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileField1TSStructItem::getGeoTypes(const MEDFileMesh *m) const
+{
+ std::vector<INTERP_KERNEL::NormalizedCellType> ret;
+ if(_type==ON_NODES)
+ {
+ if(!_items.empty() && _items[0].getPflName().empty())
+ {
+ if(m)
+ return m->getAllGeoTypes();
+ else
+ return ret;
+ }
+ else
+ return ret;
+ }
+ for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++)
+ {
+ INTERP_KERNEL::NormalizedCellType elt((*it).getGeo());
+ std::vector<INTERP_KERNEL::NormalizedCellType>::iterator it2(std::find(ret.begin(),ret.end(),elt));
+ if(it2==ret.end())
+ ret.push_back(elt);
+ }
+ return ret;
+}
+
+MEDFileField1TSStructItem MEDFileField1TSStructItem::BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt)
+{
+ std::vector< MEDFileField1TSStructItem2 > anItems;
+ //
+ std::vector< std::vector<std::string> > pfls,locs;
+ std::vector< std::vector<TypeOfField> > typesF;
+ std::vector<INTERP_KERNEL::NormalizedCellType> geoTypes;
+ std::vector< std::vector<std::pair<int,int> > > strtEnds=ref->getFieldSplitedByType(std::string(),geoTypes,typesF,pfls,locs);
+ std::size_t nbOfGeoTypes(geoTypes.size());
+ if(nbOfGeoTypes==0)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct : not null by empty ref !");
+ if(typesF[0].empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct : internal error #1 bis !");
+ TypeOfField atype(typesF[0][0]);
+ for(std::size_t i=0;i<nbOfGeoTypes;i++)
+ {
+ std::size_t sz=typesF[i].size();
+ if(strtEnds[i].size()<1 || sz<1 || pfls[i].size()<1)
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct : internal error #1 !");
+ //
+ for(std::size_t j=0;j<sz;j++)
+ {
+ if(atype==typesF[i][j])
+ anItems.push_back(MEDFileField1TSStructItem2(geoTypes[i],strtEnds[i][j],pfls[i][j],locs[i][j]));
+ else
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct : can be applied only on single spatial discretization fields ! Call SplitPerDiscretization method !");
+ }
+ }
+ MEDFileField1TSStructItem ret(atype,anItems);
+ try
+ {
+ ret.checkWithMeshStruct(meshSt,ref);
+ }
+ catch(INTERP_KERNEL::Exception& e)
+ {
+ std::ostringstream oss; oss << e.what() << " (" << MEDCouplingFieldDiscretization::GetTypeOfFieldRepr(ret.getType()) << ")";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ return ret;
+}
+
+//=
+
+MEDFileField1TSStruct *MEDFileField1TSStruct::New(const MEDFileAnyTypeField1TS *ref, MEDFileMeshStruct *mst)
+{
+ return new MEDFileField1TSStruct(ref,mst);
+}
+
+MEDFileField1TSStruct::MEDFileField1TSStruct(const MEDFileAnyTypeField1TS *ref, MEDFileMeshStruct *mst)
+{
+ _already_checked.push_back(MEDFileField1TSStructItem::BuildItemFrom(ref,mst));
+}
+
+void MEDFileField1TSStruct::checkWithMeshStruct(MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs)
+{
+ if(_already_checked.empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct::checkWithMeshStruct : not correctly initialized !");
+ _already_checked.back().checkWithMeshStruct(mst,globs);
+}
+
+bool MEDFileField1TSStruct::isEqualConsideringThePast(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *mst) const
+{
+ MEDFileField1TSStructItem b(MEDFileField1TSStructItem::BuildItemFrom(other,mst));
+ for(std::vector<MEDFileField1TSStructItem>::const_iterator it=_already_checked.begin();it!=_already_checked.end();it++)
+ {
+ if((*it)==b)
+ return true;
+ }
+ return false;
+}
+
+/*!
+ * Not const because \a other structure will be added to the \c _already_checked attribute in case of success.
+ */
+bool MEDFileField1TSStruct::isSupportSameAs(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt)
+{
+ if(_already_checked.empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct::isSupportSameAs : no ref !");
+ MEDFileField1TSStructItem b(MEDFileField1TSStructItem::BuildItemFrom(other,meshSt));
+ if(!_already_checked[0].isEntityCell() || !b.isEntityCell())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct::isSupportSameAs : only available on cell entities !");
+ MEDFileField1TSStructItem other1(b.simplifyMeOnCellEntity(other));
+ int found=-1,i=0;
+ for(std::vector<MEDFileField1TSStructItem>::const_iterator it=_already_checked.begin();it!=_already_checked.end();it++,i++)
+ if((*it).isComputed())
+ { found=i; break; }
+ bool ret(false);
+ if(found==-1)
+ {
+ MEDFileField1TSStructItem this1(_already_checked[0].simplifyMeOnCellEntity(other));
+ ret=this1.isCellSupportEqual(other1,other);
+ if(ret)
+ _already_checked.push_back(this1);
+ }
+ else
+ ret=_already_checked[found].isCellSupportEqual(other1,other);
+ if(ret)
+ _already_checked.push_back(b);
+ return ret;
+}
+
+/*!
+ * \param [in] other - a field with only one spatial discretization : ON_NODES.
+ */
+bool MEDFileField1TSStruct::isCompatibleWithNodesDiscr(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt)
+{
+ if(_already_checked.empty())
+ throw INTERP_KERNEL::Exception("MEDFileField1TSStruct::isCompatibleWithNodesDiscr : no ref !");
+ MEDFileField1TSStructItem other1(MEDFileField1TSStructItem::BuildItemFrom(other,meshSt));
+ if(_already_checked[0].isEntityCell())
+ {
+ int found=-1,i=0;
+ for(std::vector<MEDFileField1TSStructItem>::const_iterator it=_already_checked.begin();it!=_already_checked.end();it++,i++)
+ if((*it).isComputed())
+ { found=i; break; }
+ bool ret(false);
+ if(found==-1)
+ {
+ MEDFileField1TSStructItem this1(_already_checked[0].simplifyMeOnCellEntity(other));
+ ret=this1.isCompatibleWithNodesDiscr(other1,meshSt,other);
+ if(ret)
+ _already_checked.push_back(this1);
+ }
+ else
+ ret=_already_checked[found].isCompatibleWithNodesDiscr(other1,meshSt,other);
+ if(ret)
+ _already_checked.push_back(other1);
+ return ret;
+ }
+ else
+ return _already_checked[0].isNodeSupportEqual(other1,other);