-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
for(int i=0;i<nstep;i++)
{
MEDFILESAFECALLERRD0(MEDmeshComputationStepInfo,(fid,mName.c_str(),i+1,&numdt,&numit,&dtt));
- p[i]=std::make_pair(numdt,numit);
- found=(numdt==dt) && (numit==numit);
+ p[i]=std::make_pair((int)numdt,(int)numit);
+ found=(numdt==dt) && (numit==it);
+ if (found) break;
}
if(!found)
{
return ret.retn();
}
+void MEDFileUMeshSplitL1::checkConsistency() const
+{
+ if (!_fam || _fam->getNumberOfTuples() != getSize())
+ throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): internal family array has an invalid size!");
+ int nbCells = getSize();
+ if (_num)
+ {
+ _num->checkNbOfTuplesAndComp(nbCells,1,"MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal node numbering array!");
+ int pos;
+ int maxValue=_num->getMaxValue(pos);
+ if (!_rev_num || _rev_num->getNumberOfTuples() != (maxValue+1))
+ throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal revert node numbering array!");
+ }
+ if ((_num && !_rev_num) || (!_num && _rev_num))
+ throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal numbering arrays (one is null)!");
+ if (_num && !_num->hasUniqueValues())
+ throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal node numbering array: duplicates found!");
+ if (_names)
+ _names->checkNbOfTuplesAndComp(nbCells,1,"MEDFileUMeshSplitL1::checkConsistency(): internal cell naming array has an invalid size!");
+
+ _m_by_types.checkConsistency();
+}
+
bool MEDFileUMeshSplitL1::isEqual(const MEDFileUMeshSplitL1 *other, double eps, std::string& what) const
{
if(!_m_by_types.isEqual(other->_m_by_types,eps,what))
return true;
}
+void MEDFileUMeshAggregateCompute::checkConsistency() const
+{
+ if(_mp_time >= _m_time)
+ for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();
+ it!=_m_parts.end(); it++)
+ (*it)->checkConsistency();
+ else
+ _m->checkConsistency();
+}
+
void MEDFileUMeshAggregateCompute::clearNonDiscrAttributes() const
{
for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)