{
}
-MEDCouplingStructuredMesh::MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCopy):MEDCouplingMesh(other)
+MEDCouplingStructuredMesh::MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy):MEDCouplingMesh(other)
{
}
return MEDCouplingMesh::isEqualIfNotWhy(other,prec,reason);
}
-INTERP_KERNEL::NormalizedCellType MEDCouplingStructuredMesh::getTypeOfCell(int cellId) const
+INTERP_KERNEL::NormalizedCellType MEDCouplingStructuredMesh::getTypeOfCell(std::size_t cellId) const
{
return GetGeoTypeGivenMeshDimension(getMeshDimension());
}
return ret2;
}
-int MEDCouplingStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+std::size_t MEDCouplingStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
- int ret=getNumberOfCells();
+ std::size_t ret(getNumberOfCells());
if(type==getTypeOfCell(0))
return ret;
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(getTypeOfCell(0));
+ const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getTypeOfCell(0)));
std::ostringstream oss; oss << "MEDCouplingStructuredMesh::getNumberOfCellsWithType : no specified type ! Type available is " << cm.getRepr() << " !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
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];
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);
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;
}
-int MEDCouplingStructuredMesh::getNumberOfCells() const
+std::size_t MEDCouplingStructuredMesh::getNumberOfCells() const
{
std::vector<int> ngs(getNodeGridStructure());
- int ret(1);
+ std::size_t ret(1);
bool isCatched(false);
std::size_t ii(0);
for(std::vector<int>::const_iterator it=ngs.begin();it!=ngs.end();it++,ii++)
* \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
*/
* \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
*/