Salome HOME
scotch6.0.4 needs pthread... Quick and dirty solution to be improved
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingStructuredMesh.cxx
index e12fcc546a112d7769559092c99712864720b63b..a6b9706fdb84a3dcfba4ff8bbfab5b5995dbc6a6 100644 (file)
@@ -33,7 +33,7 @@ MEDCouplingStructuredMesh::MEDCouplingStructuredMesh()
 {
 }
 
-MEDCouplingStructuredMesh::MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCopy):MEDCouplingMesh(other)
+MEDCouplingStructuredMesh::MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy):MEDCouplingMesh(other)
 {
 }
 
@@ -140,7 +140,7 @@ DataArrayInt *MEDCouplingStructuredMesh::computeEffectiveNbOfNodesPerCell() cons
   return computeNbOfNodesPerCell();
 }
 
-void MEDCouplingStructuredMesh::getNodeIdsOfCell(int cellId, std::vector<int>& conn) const
+void MEDCouplingStructuredMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
 {
   int meshDim=getMeshDimension();
   int tmpCell[3],tmpNode[3];
@@ -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();
@@ -984,8 +984,8 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity2D(const int *
   conn->alloc(4*n1*n2,1);
   int *cp(conn->getPointer());
   std::size_t pos(0);
-  for(int j=0;j<n2;j++)
-    for(int i=0;i<n1;i++,pos++)
+  for(std::size_t j=0;j<n2;j++)
+    for(std::size_t i=0;i<n1;i++,pos++)
       {
         cp[4*pos+0]=i+1+j*(n1+1);
         cp[4*pos+1]=i+j*(n1+1);
@@ -1002,9 +1002,9 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity3D(const int *
   conn->alloc(8*n1*n2*n3,1);
   int *cp(conn->getPointer());
   std::size_t pos(0);
-  for(int k=0;k<n3;k++)
-    for(int j=0;j<n2;j++)
-      for(int i=0;i<n1;i++,pos++)
+  for(std::size_t k=0;k<n3;k++)
+    for(std::size_t j=0;j<n2;j++)
+      for(std::size_t i=0;i<n1;i++,pos++)
         {
           int tmp=(n1+1)*(n2+1);
           cp[8*pos+0]=i+1+j*(n1+1)+k*tmp;
@@ -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
@@ -1956,7 +1956,7 @@ DataArrayInt *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<
  * \param [in] st - the structure of grid ( \b without considering ghost cells).
  * \param [in] part - the part in the structure ( \b without considering ghost cells) contained in grid whose structure is defined by \a st.
  * \param [in] factor - the factor, the tuples in \a da will be multiply by.
- * \param [in,out] da - The DataArray in wich only tuples specified by \a part will be modified.
+ * \param [in,out] da - The DataArray in which only tuples specified by \a part will be modified.
  *
  * \sa BuildExplicitIdsFrom
  */
@@ -2037,7 +2037,7 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
  * \param [in] part - the part in the structure ( \b without considering ghost cells) contained in grid whose structure is defined by \a st.
  * \param [in] ghostSize - \a ghostSize must be >= 0.
  * \param [in] factor - the factor, the tuples in \a da will be multiply by.
- * \param [in,out] da - The DataArray in wich only tuples specified by \a part will be modified.
+ * \param [in,out] da - The DataArray in which only tuples specified by \a part will be modified.
  *
  * \sa MultiplyPartOf, PutInGhostFormat
  */