for(int i=0;i<nstep;i++)
{
MEDFILESAFECALLERRD0(MEDmeshComputationStepInfo,(fid,mName.c_str(),i+1,&numdt,&numit,&dtt));
- p[i]=std::make_pair<int,int>(numdt,numit);
+ p[i]=std::make_pair(numdt,numit);
found=(numdt==dt) && (numit==numit);
}
if(!found)
else
{
if(!m->checkConsecutiveCellTypesAndOrder(typmai2,typmai2+MED_N_CELL_FIXED_GEO))
- throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::assignMesh : the mode of mesh setting expects to follow the MED file numbering convention ! it is not the case !");
+ throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::assignMesh(): the mesh does not follow the MED file numbering convention! Invoke sortCellsInMEDFileFrmt() first!");
m->incrRef();
_m_by_types.assignUMesh(m);
}
return _m_by_types.getGeoTypes();
}
+int MEDFileUMeshSplitL1::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+{
+ return _m_by_types.getNumberOfCellsWithType(ct);
+}
+
MEDCouplingUMesh *MEDFileUMeshSplitL1::getWholeMesh(bool renum) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> tmp;
return _m->getAllGeoTypesSorted();
}
+int MEDFileUMeshAggregateCompute::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+{
+ if(_mp_time>=_m_time)
+ {
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
+ {
+ const MEDCoupling1GTUMesh *elt(*it);
+ if(elt && elt->getCellModelEnum()==ct)
+ return elt->getNumberOfCells();
+ }
+ return 0;
+ }
+ else
+ return _m->getNumberOfCellsWithType(ct);
+}
+
std::vector<MEDCoupling1GTUMesh *> MEDFileUMeshAggregateCompute::retrievePartsWithoutComputation() const
{
if(_mp_time<_m_time)