Salome HOME
scotch6.0.4 needs pthread... Quick and dirty solution to be improved
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingStructuredMesh.cxx
index e39a599a46dadc13bef9799f44cb0e98baa8b511..a6b9706fdb84a3dcfba4ff8bbfab5b5995dbc6a6 100644 (file)
@@ -310,7 +310,7 @@ DataArrayInt *MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(const std
  *          - After \a code contains [NORM_...,nbCells,0], \a idsInPflPerType [[0,1]] and \a idsPerType is [[1,2]] <br>
 
  */
-void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const
+void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller) const
 {
   if(!profile || !profile->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::splitProfilePerType : input profile is NULL or not allocated !");
@@ -321,7 +321,7 @@ void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayInt *profile,
   code.resize(3); idsInPflPerType.resize(1);
   code[0]=(int)getTypeOfCell(0); code[1]=nbOfCells;
   idsInPflPerType.resize(1);
-  if(profile->isIota(nbOfCells))
+  if(smartPflKiller && profile->isIota(nbOfCells))
     {
       code[2]=-1;
       idsInPflPerType[0]=profile->deepCopy();
@@ -1887,7 +1887,7 @@ std::vector<int> MEDCouplingStructuredMesh::FindTranslationFrom(const std::vecto
 
 /*!
  * This method builds the explicit entity array from the structure in \a st and the range in \a partCompactFormat.
- * If the range contains invalid values regarding sructure an exception will be thrown.
+ * If the range contains invalid values regarding structure an exception will be thrown.
  *
  * \return DataArrayInt * - a new object.
  * \sa MEDCouplingStructuredMesh::IsPartStructured, MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt, SwitchOnIdsFrom, ExtractFieldOfBoolFrom, ExtractFieldOfDoubleFrom, MultiplyPartOf