From: eap Date: Fri, 15 Nov 2019 13:22:33 +0000 (+0300) Subject: LOT2: conversion int->mcIdType with main INTERP_KERNEL entries used by MEDCoupling X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33d99c6501a5a52a1430bfa62d037ecee31f0b92;p=tools%2Fmedcoupling.git LOT2: conversion int->mcIdType with main INTERP_KERNEL entries used by MEDCoupling --- diff --git a/src/INTERP_KERNEL/BBTree.txx b/src/INTERP_KERNEL/BBTree.txx index b49c93268..23dcfe3be 100644 --- a/src/INTERP_KERNEL/BBTree.txx +++ b/src/INTERP_KERNEL/BBTree.txx @@ -101,9 +101,9 @@ public: new_elems_right.reserve(nbelems/2+1); double max_left = -std::numeric_limits::max(); double min_right= std::numeric_limits::max(); - for (int i=0; isize()+_right->size(); diff --git a/src/INTERP_KERNEL/BBTreeDst.txx b/src/INTERP_KERNEL/BBTreeDst.txx index b8931777f..3fa065126 100755 --- a/src/INTERP_KERNEL/BBTreeDst.txx +++ b/src/INTERP_KERNEL/BBTreeDst.txx @@ -38,20 +38,20 @@ private: double _max_left; double _min_right; const double *_bb; - std::vector _elems; + std::vector _elems; double *_terminal; - int _nbelems; + mcIdType _nbelems; static const int MIN_NB_ELEMS=15; static const int MAX_LEVEL=20; public: - BBTreeDst(const double* bbs, int* elems, int level, int nbelems): + BBTreeDst(const double* bbs, mcIdType* elems, int level, mcIdType nbelems): _left(0),_right(0),_level(level),_bb(bbs),_terminal(0),_nbelems(nbelems) { if((nbelems < MIN_NB_ELEMS || level> MAX_LEVEL)) _terminal=new double[2*dim]; _elems.resize(nbelems); - for (int i=0; i(nodes, nodes+nbelems/2, nodes+nbelems); double median = *(nodes+nbelems/2); delete [] nodes; - std::vector new_elems_left; - std::vector new_elems_right; + std::vector new_elems_left; + std::vector new_elems_right; new_elems_left.reserve(nbelems/2+1); new_elems_right.reserve(nbelems/2+1); double max_left = -std::numeric_limits::max(); double min_right= std::numeric_limits::max(); - for(int i=0; i& elems) const + void getElemsWhoseMinDistanceToPtSmallerThan(const double *pt, double minOfMaxDstsSq, std::vector& elems) const { if(_terminal) { - for(int i=0; i<_nbelems; i++) + for(mcIdType i=0; i<_nbelems; i++) { if(GetMinDistanceFromBBoxToPt(_bb+_elems[i]*2*dim,pt)minOfMaxDstsSq)//min it is not a bug return ; - for(int i=0; i<_nbelems; i++) + for(mcIdType i=0; i<_nbelems; i++) { minOfMaxDstsSq=std::min(minOfMaxDstsSq,GetMaxDistanceFromBBoxToPt(_bb+_elems[i]*2*dim,pt)); } @@ -168,7 +168,7 @@ public: _terminal[2*j]=std::numeric_limits::max(); _terminal[2*j+1]=-std::numeric_limits::max(); } - for(int i=0;i<_nbelems;i++) + for(mcIdType i=0;i<_nbelems;i++) { for(int j=0;j::max(); double min_right= std::numeric_limits::max(); - for(int i=0;igetElementsAroundPoint2(xx,threshold,elem); if(xx[_level%dim]-s>_max_left) return _right->getElementsAroundPoint2(xx,threshold,elem); - int eleml,elemr; + ConnType eleml,elemr; double retl=_left->getElementsAroundPoint2(xx,threshold,eleml); double retr=_right->getElementsAroundPoint2(xx,threshold,elemr); if(retlgetElementsAroundPoint(xx,elems); } - int size() const + ConnType size() const { if(_terminal) return _nbelems; diff --git a/src/INTERP_KERNEL/CellModel.cxx b/src/INTERP_KERNEL/CellModel.cxx index 585675205..133f9d027 100644 --- a/src/INTERP_KERNEL/CellModel.cxx +++ b/src/INTERP_KERNEL/CellModel.cxx @@ -449,7 +449,7 @@ namespace INTERP_KERNEL /*! * Equivalent to getNumberOfSons except that this method deals with dynamic type. */ - unsigned CellModel::getNumberOfSons2(const int *conn, int lgth) const + unsigned CellModel::getNumberOfSons2(const mcIdType *conn, int lgth) const { if(!isDynamic()) return getNumberOfSons(); @@ -466,7 +466,7 @@ namespace INTERP_KERNEL return std::count(conn,conn+lgth,-1)+1; } - unsigned CellModel::getNumberOfEdgesIn3D(const int *conn, int lgth) const + unsigned CellModel::getNumberOfEdgesIn3D(const mcIdType *conn, int lgth) const { if(!isDynamic()) return _nb_of_little_sons; @@ -549,7 +549,7 @@ namespace INTERP_KERNEL /*! * \b WARNING this method do not manage correctly types that return true at the call of isDynamic. Use fillSonCellNodalConnectivity2 instead. */ - unsigned CellModel::fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const + unsigned CellModel::fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const { unsigned nbOfTurnLoop=_nb_of_sons_con[sonId]; const unsigned *sonConn=_sons_con[sonId]; @@ -558,7 +558,7 @@ namespace INTERP_KERNEL return nbOfTurnLoop; } - unsigned CellModel::fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const + unsigned CellModel::fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const { typeOfSon=getSonType2(sonId); if(!isDynamic()) @@ -583,13 +583,13 @@ namespace INTERP_KERNEL } else if(_dim==3) {//polyedron - const int *where=nodalConn; + const mcIdType *where=nodalConn; for(int i=0;iHEXA27 */ - unsigned CellModel::fillSonCellNodalConnectivity4(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const + unsigned CellModel::fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const { if(_type==NORM_HEXA8) { @@ -612,7 +612,7 @@ namespace INTERP_KERNEL return fillSonCellNodalConnectivity2(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); } - unsigned CellModel::fillSonEdgesNodalConnectivity3D(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const + unsigned CellModel::fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const { if(!isDynamic()) { @@ -639,7 +639,7 @@ namespace INTERP_KERNEL /*! * \sa getNumberOfMicroEdges */ - unsigned CellModel::fillMicroEdgeNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn, NormalizedCellType& typeOfSon) const + unsigned CellModel::fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const { if(isQuadratic()) { @@ -680,20 +680,20 @@ namespace INTERP_KERNEL } } - void CellModel::changeOrientationOf2D(int *nodalConn, unsigned int sz) const + void CellModel::changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const { if(sz<1) return ; if(!isQuadratic()) { - std::vector tmp(sz-1); + std::vector tmp(sz-1); std::copy(nodalConn+1,nodalConn+sz,tmp.rbegin()); std::copy(tmp.begin(),tmp.end(),nodalConn+1); } else { unsigned int sz2(sz/2); - std::vector tmp0(sz2-1),tmp1(sz2); + std::vector tmp0(sz2-1),tmp1(sz2); std::copy(nodalConn+1,nodalConn+sz2,tmp0.rbegin()); std::copy(nodalConn+sz2,nodalConn+sz,tmp1.rbegin()); std::copy(tmp0.begin(),tmp0.end(),nodalConn+1); @@ -701,7 +701,7 @@ namespace INTERP_KERNEL } } - void CellModel::changeOrientationOf1D(int *nodalConn, unsigned int sz) const + void CellModel::changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const { if(!isDynamic()) { @@ -720,7 +720,7 @@ namespace INTERP_KERNEL } else { - std::vector tmp(sz-1); + std::vector tmp(sz-1); std::copy(nodalConn+1,nodalConn+sz,tmp.rbegin()); std::copy(tmp.begin(),tmp.end(),nodalConn+1); } @@ -732,7 +732,7 @@ namespace INTERP_KERNEL */ //================================================================================ - unsigned CellModel::getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const + unsigned CellModel::getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, int lgth) const { if(!isDynamic()) return getNumberOfNodesConstituentTheSon(sonId); @@ -746,13 +746,13 @@ namespace INTERP_KERNEL } else if(_dim==3) {//polyedron - const int *where=nodalConn; + const mcIdType *where=nodalConn; for(unsigned int i=0;i tmp(2*lgth); - std::vector::iterator it=std::copy(conn1,conn1+lgth,tmp.begin()); + std::vector tmp(2*lgth); + std::vector::iterator it=std::copy(conn1,conn1+lgth,tmp.begin()); std::copy(conn1,conn1+lgth,it); it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth); if(it==tmp.begin()) return true; if(it!=tmp.end()) return _dim!=1; - std::vector::reverse_iterator it2=std::search(tmp.rbegin(),tmp.rend(),conn2,conn2+lgth); + std::vector::reverse_iterator it2=std::search(tmp.rbegin(),tmp.rend(),conn2,conn2+lgth); if(it2!=tmp.rend()) return false; throw INTERP_KERNEL::Exception("CellModel::getOrientationStatus : Request of orientation status of non equal connectively cells !"); @@ -788,11 +788,11 @@ namespace INTERP_KERNEL { if(_dim!=1) { - std::vector tmp(lgth); - std::vector::iterator it=std::copy(conn1,conn1+lgth/2,tmp.begin()); + std::vector tmp(lgth); + std::vector::iterator it=std::copy(conn1,conn1+lgth/2,tmp.begin()); std::copy(conn1,conn1+lgth/2,it); it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth/2); - int d=std::distance(tmp.begin(),it); + std::size_t d=std::distance(tmp.begin(),it); if(it==tmp.end()) return false; it=std::copy(conn1+lgth/2,conn1+lgth,tmp.begin()); @@ -800,17 +800,17 @@ namespace INTERP_KERNEL it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth); if(it==tmp.end()) return false; - int d2=std::distance(tmp.begin(),it); + std::size_t d2=std::distance(tmp.begin(),it); return d==d2; } else { int p=(lgth+1)/2; - std::vector tmp(2*p); - std::vector::iterator it=std::copy(conn1,conn1+p,tmp.begin()); + std::vector tmp(2*p); + std::vector::iterator it=std::copy(conn1,conn1+p,tmp.begin()); std::copy(conn1,conn1+p,it); it=std::search(tmp.begin(),tmp.end(),conn2,conn2+p); - int d=std::distance(tmp.begin(),it); + std::size_t d=std::distance(tmp.begin(),it); if(it==tmp.end()) return false; tmp.resize(2*p-2); @@ -819,7 +819,7 @@ namespace INTERP_KERNEL it=std::search(tmp.begin(),tmp.end(),conn2+p,conn2+lgth); if(it==tmp.end()) return false; - int d2=std::distance(tmp.begin(),it); + std::size_t d2=std::distance(tmp.begin(),it); return d==d2; } } diff --git a/src/INTERP_KERNEL/CellModel.hxx b/src/INTERP_KERNEL/CellModel.hxx index 4300b4327..7d8825145 100644 --- a/src/INTERP_KERNEL/CellModel.hxx +++ b/src/INTERP_KERNEL/CellModel.hxx @@ -24,6 +24,7 @@ #include "INTERPKERNELDefines.hxx" #include "NormalizedUnstructuredMesh.hxx" +#include "MCIdType.hxx" #include @@ -57,14 +58,14 @@ namespace INTERP_KERNEL //! sonId is in C format. INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; } INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheLittleSon(unsigned littleSonId) const { return _little_sons_con[littleSonId]; } - INTERPKERNEL_EXPORT bool getOrientationStatus(unsigned lgth, const int *conn1, const int *conn2) const; + INTERPKERNEL_EXPORT bool getOrientationStatus(unsigned lgth, const mcIdType *conn1, const mcIdType *conn2) const; INTERPKERNEL_EXPORT unsigned getNumberOfNodes() const { return _nb_of_pts; } INTERPKERNEL_EXPORT unsigned getNumberOfSons() const { return _nb_of_sons; } - INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const int *conn, int lgth) const; - INTERPKERNEL_EXPORT unsigned getNumberOfEdgesIn3D(const int *conn, int lgth) const; + INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const mcIdType *conn, int lgth) const; + INTERPKERNEL_EXPORT unsigned getNumberOfEdgesIn3D(const mcIdType *conn, int lgth) const; INTERPKERNEL_EXPORT unsigned getNumberOfMicroEdges() const; INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; } - INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const; + INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, int lgth) const; INTERPKERNEL_EXPORT NormalizedCellType getExtrudedType() const { return _extruded_type; } INTERPKERNEL_EXPORT NormalizedCellType getCorrespondingPolyType() const; INTERPKERNEL_EXPORT NormalizedCellType getReverseExtrudedType() const { return _reverse_extruded_type; } @@ -73,13 +74,13 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT NormalizedCellType getQuadraticType2() const { return _quadratic_type2; } INTERPKERNEL_EXPORT NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; } INTERPKERNEL_EXPORT NormalizedCellType getSonType2(unsigned sonId) const; - INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const; - INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const; - INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity4(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const; - INTERPKERNEL_EXPORT unsigned fillSonEdgesNodalConnectivity3D(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const; - INTERPKERNEL_EXPORT unsigned fillMicroEdgeNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn, NormalizedCellType& typeOfSon) const; - INTERPKERNEL_EXPORT void changeOrientationOf2D(int *nodalConn, unsigned int sz) const; - INTERPKERNEL_EXPORT void changeOrientationOf1D(int *nodalConn, unsigned int sz) const; + INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const; + INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const; + INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const; + INTERPKERNEL_EXPORT unsigned fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, int lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const; + INTERPKERNEL_EXPORT unsigned fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const; + INTERPKERNEL_EXPORT void changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const; + INTERPKERNEL_EXPORT void changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const; INTERPKERNEL_EXPORT DiameterCalculator *buildInstanceOfDiameterCalulator(int spaceDim) const; INTERPKERNEL_EXPORT OrientationInverter *buildOrientationInverter() const; private: diff --git a/src/INTERP_KERNEL/DiameterCalculator.cxx b/src/INTERP_KERNEL/DiameterCalculator.cxx index 09eb07ce8..1ea15692c 100644 --- a/src/INTERP_KERNEL/DiameterCalculator.cxx +++ b/src/INTERP_KERNEL/DiameterCalculator.cxx @@ -94,14 +94,14 @@ inline void DiffV3(const double a[3], const double b[3], double c[3]) } template -void ComputeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) +void ComputeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) { Evaluator evtor; NormalizedCellType ct(Evaluator::TYPE); int cti((int) ct); - for(const int *it=bgIds;it!=endIds;it++) + for(const mcIdType *it=bgIds;it!=endIds;it++) { - int offset(indPtr[*it]); + mcIdType offset(indPtr[*it]); if(connPtr[offset]==cti) resPtr[*it]=evtor.ComputeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[(*it)+1],coordsPtr); else @@ -113,14 +113,14 @@ void ComputeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const } template -void ComputeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) +void ComputeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) { Evaluator evtor; NormalizedCellType ct(Evaluator::TYPE); int cti((int) ct); - for(int it=bgId;it -void ComputeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) +void ComputeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) { Evaluator evtor; NormalizedCellType ct(Evaluator::TYPE); const CellModel& cm(CellModel::GetCellModel(ct)); unsigned nbNodes(cm.getNumberOfNodes()); - const int *ptr(connPtr); - for(int i=0;i(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI3S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI3S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI3S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI3S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==3) { @@ -196,24 +196,24 @@ double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTRI3S2::ComputeForOneCellInternal : input connectivity must be of size 3 !"); } -void DiameterCalulatorTRI3S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI3S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI3S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI3S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI3S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI3S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==6) return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr); @@ -221,24 +221,24 @@ double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTRI6S2::ComputeForOneCellInternal : input connectivity must be of size 6 !"); } -void DiameterCalulatorTRI6S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI6S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI6S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==6) return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr); @@ -246,24 +246,24 @@ double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTRI6S3::ComputeForOneCellInternal : input connectivity must be of size 6 !"); } -void DiameterCalulatorTRI6S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI6S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI6S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI6S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==7) return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr); @@ -271,24 +271,24 @@ double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTRI7S2::ComputeForOneCellInternal : input connectivity must be of size 7 !"); } -void DiameterCalulatorTRI7S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI7S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI7S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==7) return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr); @@ -296,24 +296,24 @@ double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTRI7S3::ComputeForOneCellInternal : input connectivity must be of size 7 !"); } -void DiameterCalulatorTRI7S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI7S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTRI7S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTRI7S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==4) { @@ -327,24 +327,24 @@ double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD4S2::ComputeForOneCellInternal : input connectivity must be of size 4 !"); } -void DiameterCalulatorQUAD4S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD4S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD4S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==4) { @@ -358,24 +358,24 @@ double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD4S3::ComputeForOneCellInternal : input connectivity must be of size 4 !"); } -void DiameterCalulatorQUAD4S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD4S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD4S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD4S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==8) return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr); @@ -383,24 +383,24 @@ double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD8S2::ComputeForOneCellInternal : input connectivity must be of size 8 !"); } -void DiameterCalulatorQUAD8S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD8S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD8S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==8) return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr); @@ -408,24 +408,24 @@ double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD8S3::ComputeForOneCellInternal : input connectivity must be of size 8 !"); } -void DiameterCalulatorQUAD8S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD8S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD8S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD8S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==9) return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr); @@ -433,24 +433,24 @@ double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD9S2::ComputeForOneCellInternal : input connectivity must be of size 9 !"); } -void DiameterCalulatorQUAD9S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD9S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD9S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==9) return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr); @@ -458,24 +458,24 @@ double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorQUAD8S3::ComputeForOneCellInternal : input connectivity must be of size 9 !"); } -void DiameterCalulatorQUAD9S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD9S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorQUAD9S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorQUAD9S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==4) { @@ -495,24 +495,24 @@ double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorTETRA4::ComputeForOneCellInternal : input connectivity must be of size 4 !"); } -void DiameterCalulatorTETRA4::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA4::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTETRA4::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA4::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTETRA4::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA4::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==10) return DiameterCalulatorTETRA4::ComputeForOneCellInternal(bg,bg+4,coordsPtr); @@ -520,24 +520,24 @@ double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorTETRA10::ComputeForOneCellInternal : input connectivity must be of size 10 !"); } -void DiameterCalulatorTETRA10::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA10::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTETRA10::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA10::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorTETRA10::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorTETRA10::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==8) { @@ -555,24 +555,24 @@ double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const int *bg, const in throw Exception("DiameterCalulatorHEXA8::ComputeForOneCellInternal : input connectivity must be of size 8 !"); } -void DiameterCalulatorHEXA8::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA8::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA8::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA8::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA8::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA8::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==20) return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr); @@ -580,24 +580,24 @@ double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorHEXA20::ComputeForOneCellInternal : input connectivity must be of size 20 !"); } -void DiameterCalulatorHEXA20::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA20::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA20::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA20::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA20::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA20::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==27) return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr); @@ -605,24 +605,24 @@ double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorHEXA27::ComputeForOneCellInternal : input connectivity must be of size 27 !"); } -void DiameterCalulatorHEXA27::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA27::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA27::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA27::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorHEXA27::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorHEXA27::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==6) { @@ -642,24 +642,24 @@ double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorPENTA6::ComputeForOneCellInternal : input connectivity must be of size 6 !"); } -void DiameterCalulatorPENTA6::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA6::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPENTA6::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA6::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPENTA6::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA6::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==15) return DiameterCalulatorPENTA6::ComputeForOneCellInternal(bg,bg+6,coordsPtr); @@ -667,24 +667,24 @@ double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const int *bg, const throw Exception("DiameterCalulatorPENTA15::ComputeForOneCellInternal : input connectivity must be of size 15 !"); } -void DiameterCalulatorPENTA15::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA15::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPENTA15::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA15::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPENTA15::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPENTA15::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==5) { @@ -704,24 +704,24 @@ double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const int *bg, const in throw Exception("DiameterCalulatorPYRA5::ComputeForOneCellInternal : input connectivity must be of size 5 !"); } -void DiameterCalulatorPYRA5::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA5::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPYRA5::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA5::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPYRA5::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA5::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } //================================================================= -double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) +double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) { if(std::distance(bg,endd)==13) return DiameterCalulatorPYRA5::ComputeForOneCellInternal(bg,bg+5,coordsPtr); @@ -729,17 +729,17 @@ double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const int *bg, const i throw Exception("DiameterCalulatorPYRA13::ComputeForOneCellInternal : input connectivity must be of size 13 !"); } -void DiameterCalulatorPYRA13::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA13::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForListOfCellIdsUMeshFrmt(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPYRA13::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA13::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeForRangeOfCellIdsUMeshFrmt(bgId,endId,indPtr,connPtr,coordsPtr,resPtr); } -void DiameterCalulatorPYRA13::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const +void DiameterCalulatorPYRA13::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const { ComputeFor1SGTUMeshFrmt(nbOfCells,connPtr,coordsPtr,resPtr); } diff --git a/src/INTERP_KERNEL/DiameterCalculator.hxx b/src/INTERP_KERNEL/DiameterCalculator.hxx index 939e85f8b..1c08dbd19 100644 --- a/src/INTERP_KERNEL/DiameterCalculator.hxx +++ b/src/INTERP_KERNEL/DiameterCalculator.hxx @@ -24,6 +24,7 @@ #include "INTERPKERNELDefines.hxx" #include "NormalizedGeometricTypes" +#include "MCIdType.hxx" namespace INTERP_KERNEL { @@ -32,21 +33,21 @@ namespace INTERP_KERNEL public: INTERPKERNEL_EXPORT virtual ~DiameterCalculator() { } INTERPKERNEL_EXPORT virtual NormalizedCellType getType() const = 0; - INTERPKERNEL_EXPORT virtual double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const = 0; - INTERPKERNEL_EXPORT virtual void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0; - INTERPKERNEL_EXPORT virtual void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0; - INTERPKERNEL_EXPORT virtual void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0; + INTERPKERNEL_EXPORT virtual double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const = 0; + INTERPKERNEL_EXPORT virtual void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0; + INTERPKERNEL_EXPORT virtual void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0; + INTERPKERNEL_EXPORT virtual void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0; }; class DiameterCalulatorTRI3S2 : public DiameterCalculator { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -55,11 +56,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -68,11 +69,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -81,11 +82,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -94,11 +95,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -107,11 +108,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -120,11 +121,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -133,11 +134,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -146,11 +147,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -159,11 +160,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -172,11 +173,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -185,11 +186,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -198,11 +199,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -211,11 +212,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -224,11 +225,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -237,11 +238,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -250,11 +251,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -263,11 +264,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -276,11 +277,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -289,11 +290,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; @@ -302,11 +303,11 @@ namespace INTERP_KERNEL { public: NormalizedCellType getType() const { return TYPE; } - double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } - static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr); - void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const; - void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const; + double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); } + static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr); + void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; + void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const; public: static NormalizedCellType TYPE; }; diff --git a/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx b/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx index f295fd416..333e75eff 100644 --- a/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx +++ b/src/INTERP_KERNEL/InterpKernelCellSimplify.cxx @@ -39,16 +39,16 @@ using namespace INTERP_KERNEL; * It retrieves the same cell with a potentially different type (in return) whose connectivity is defined by (retConn,retLgth) * \b WARNING for optimization reason the arrays 'retConn' and 'conn' can overlapped ! */ -INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, int lgth, mcIdType *retConn, int& retLgth) { const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type); - std::set c(conn,conn+lgth); + std::set c(conn,conn+lgth); c.erase(-1); bool isObviousNonDegeneratedCell=((int)c.size()==lgth); if((cm.getDimension()==3 && cm.isQuadratic()) || isObviousNonDegeneratedCell) {//quadratic 3D, do nothing for the moment. retLgth=lgth; - int *tmp=new int[lgth];//no direct std::copy ! overlapping of conn and retConn ! + mcIdType *tmp=new mcIdType[lgth];//no direct std::copy ! overlapping of conn and retConn ! std::copy(conn,conn+lgth,tmp); std::copy(tmp,tmp+lgth,retConn); delete [] tmp; @@ -56,7 +56,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K } if(cm.getDimension()==2) { - int *tmp=new int[lgth]; + mcIdType *tmp=new mcIdType[lgth]; int newPos=0; if(!cm.isQuadratic()) { @@ -67,7 +67,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K else { int quadOff = lgth/2; - int *tmpQuad = new int[quadOff]; + mcIdType *tmpQuad = new mcIdType[quadOff]; for(int i = 0; i < quadOff; i++) if(conn[i] != conn[(i+1)%quadOff] || conn[i] != conn[i+quadOff]) // zip nul segments/arcs (quad point must match too) { @@ -86,7 +86,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K if(cm.getDimension()==3) { int nbOfFaces,lgthOfPolyhConn; - int *zipFullReprOfPolyh=getFullPolyh3DCell(type,conn,lgth,nbOfFaces,lgthOfPolyhConn); + mcIdType *zipFullReprOfPolyh=getFullPolyh3DCell(type,conn,lgth,nbOfFaces,lgthOfPolyhConn); INTERP_KERNEL::NormalizedCellType ret=tryToUnPoly3D(zipFullReprOfPolyh,nbOfFaces,lgthOfPolyhConn,retConn,retLgth); delete [] zipFullReprOfPolyh; return ret; @@ -99,7 +99,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K * This static method tries to unpolygonize a cell whose connectivity is given by 'conn' and 'lgth'. * Contrary to INTERP_KERNEL::CellSimplify::simplifyDegeneratedCell method 'conn' and 'retConn' do not overlap. */ -INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const int *conn, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const mcIdType *conn, int lgth, mcIdType *retConn, int& retLgth) { retLgth=lgth; std::copy(conn,conn+lgth,retConn); @@ -135,20 +135,20 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const * The format of output array is the following : * 1,2,3,-1,3,4,2,-1,3,4,1,-1,1,2,4,NORM_TRI3,NORM_TRI3,NORM_TRI3 (faces type at the end of classical polyhedron nodal description) */ -int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, +mcIdType *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, int lgth, int& retNbOfFaces, int& retLgth) { const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type); unsigned nbOfFaces=cm.getNumberOfSons2(conn,lgth); - int *tmp=new int[nbOfFaces*(lgth+1)]; - int *work=tmp; - std::vector faces; + mcIdType *tmp=new mcIdType[nbOfFaces*(lgth+1)]; + mcIdType *work=tmp; + std::vector faces; for(unsigned j=0;j nodes(conn,conn+lgth); + std::set nodes(conn,conn+lgth); nodes.erase(-1); int nbOfNodes=(int)nodes.size(); int magicNumber=100*nbOfNodes+nbOfFaces; @@ -202,48 +202,48 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly3D(const int *conn, i } } -bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace) +bool CellSimplify::orientOppositeFace(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, int lgthBaseFace) { - std::vector tmp2; - std::set bases(baseFace,baseFace+lgthBaseFace); - std::set sides(sideFace,sideFace+4); - std::set_intersection(bases.begin(),bases.end(),sides.begin(),sides.end(),std::back_insert_iterator< std::vector >(tmp2)); + std::vector tmp2; + std::set bases(baseFace,baseFace+lgthBaseFace); + std::set sides(sideFace,sideFace+4); + std::set_intersection(bases.begin(),bases.end(),sides.begin(),sides.end(),std::back_insert_iterator< std::vector >(tmp2)); if(tmp2.size()!=2) return false; - std::vector< std::pair > baseEdges(lgthBaseFace); - std::vector< std::pair > oppEdges(lgthBaseFace); - std::vector< std::pair > sideEdges(4); + std::vector< std::pair > baseEdges(lgthBaseFace); + std::vector< std::pair > oppEdges(lgthBaseFace); + std::vector< std::pair > sideEdges(4); for(int i=0;i(baseFace[i],baseFace[(i+1)%lgthBaseFace]); - oppEdges[i]=std::pair(retConn[i],retConn[(i+1)%lgthBaseFace]); + baseEdges[i]=std::pair(baseFace[i],baseFace[(i+1)%lgthBaseFace]); + oppEdges[i]=std::pair(retConn[i],retConn[(i+1)%lgthBaseFace]); } for(int i=0;i<4;i++) - sideEdges[i]=std::pair(sideFace[i],sideFace[(i+1)%4]); - std::vector< std::pair > tmp; - std::set< std::pair > baseEdgesS(baseEdges.begin(),baseEdges.end()); - std::set< std::pair > sideEdgesS(sideEdges.begin(),sideEdges.end()); - std::set_intersection(baseEdgesS.begin(),baseEdgesS.end(),sideEdgesS.begin(),sideEdgesS.end(),std::back_insert_iterator< std::vector< std::pair > >(tmp)); + sideEdges[i]=std::pair(sideFace[i],sideFace[(i+1)%4]); + std::vector< std::pair > tmp; + std::set< std::pair > baseEdgesS(baseEdges.begin(),baseEdges.end()); + std::set< std::pair > sideEdgesS(sideEdges.begin(),sideEdges.end()); + std::set_intersection(baseEdgesS.begin(),baseEdgesS.end(),sideEdgesS.begin(),sideEdgesS.end(),std::back_insert_iterator< std::vector< std::pair > >(tmp)); if(tmp.empty()) { //reverse sideFace for(int i=0;i<4;i++) { - std::pair p=sideEdges[i]; - std::pair r(p.second,p.first); + std::pair p=sideEdges[i]; + std::pair r(p.second,p.first); sideEdges[i]=r; } //end reverse sideFace - std::set< std::pair > baseEdgesS2(baseEdges.begin(),baseEdges.end()); - std::set< std::pair > sideEdgesS2(sideEdges.begin(),sideEdges.end()); - std::set_intersection(baseEdgesS2.begin(),baseEdgesS2.end(),sideEdgesS2.begin(),sideEdgesS2.end(),std::back_insert_iterator< std::vector< std::pair > >(tmp)); + std::set< std::pair > baseEdgesS2(baseEdges.begin(),baseEdges.end()); + std::set< std::pair > sideEdgesS2(sideEdges.begin(),sideEdges.end()); + std::set_intersection(baseEdgesS2.begin(),baseEdgesS2.end(),sideEdgesS2.begin(),sideEdgesS2.end(),std::back_insert_iterator< std::vector< std::pair > >(tmp)); if(tmp.empty()) return false; } if(tmp.size()!=1) return false; bool found=false; - std::pair pInOpp; + std::pair pInOpp; for(int i=0;i<4 && !found;i++) {//finding the pair(edge) in sideFace that do not include any node of tmp[0] edge found=(tmp[0].first!=sideEdges[i].first && tmp[0].first!=sideEdges[i].second && @@ -257,7 +257,7 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i if(!found) return false; int pos=(int)std::distance(baseEdges.begin(),std::find(baseEdges.begin(),baseEdges.end(),tmp[0])); - std::vector< std::pair >::iterator it=std::find(oppEdges.begin(),oppEdges.end(),pInOpp); + std::vector< std::pair >::iterator it=std::find(oppEdges.begin(),oppEdges.end(),pInOpp); if(it==oppEdges.end())//the opposite edge of side face is not found opposite face ... maybe problem of orientation of polyhedron return false; int pos2=(int)std::distance(oppEdges.begin(),it); @@ -265,7 +265,7 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i if(offset<0) offset+=lgthBaseFace; //this is the end copy the result - int *tmp3=new int[lgthBaseFace]; + mcIdType *tmp3=new mcIdType[lgthBaseFace]; for(int i=0;i(),(int)INTERP_KERNEL::NORM_QUAD4))==conn+lgth+nbOfFaces) + if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to(),(mcIdType)INTERP_KERNEL::NORM_QUAD4))==conn+lgth+nbOfFaces) {//6 faces are QUAD4. int oppositeFace=-1; - std::set conn1(conn,conn+4); + std::set conn1(conn,conn+4); for(int i=1;i<6 && oppositeFace<0;i++) { - std::vector tmp; - std::set conn2(conn+5*i,conn+5*i+4); - std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); + std::vector tmp; + std::set conn2(conn+5*i,conn+5*i+4); + std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); if(tmp.empty()) oppositeFace=i; } if(oppositeFace>=1) {//oppositeFace of face#0 found. - int tmp2[4]; + mcIdType tmp2[4]; if(tryToArrangeOppositeFace(conn,lgth,4,conn,conn+5*oppositeFace,6,tmp2)) { std::copy(conn,conn+4,retConn); @@ -343,31 +343,31 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHex8(const int *conn, return INTERP_KERNEL::NORM_POLYHED; } -INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth) { - std::size_t nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON); - std::size_t nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4); + std::size_t nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_POLYGON); + std::size_t nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_QUAD4); if(nbOfQuad==6 && nbOfHexagon==2) { - const int *hexag0=std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON); + const mcIdType *hexag0=std::find(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_POLYGON); std::size_t hexg0Id=std::distance(conn+lgth,hexag0); - const int *hexag1=std::find(hexag0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON); + const mcIdType *hexag1=std::find(hexag0+1,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_POLYGON); std::size_t hexg1Id=std::distance(conn+lgth,hexag1); - const int *connHexag0=conn+5*hexg0Id; + const mcIdType *connHexag0=conn+5*hexg0Id; std::size_t lgthH0=std::distance(connHexag0,std::find(connHexag0,conn+lgth,-1)); if(lgthH0==6) { - const int *connHexag1=conn+5*hexg0Id+7+(hexg1Id-hexg0Id-1)*5; + const mcIdType *connHexag1=conn+5*hexg0Id+7+(hexg1Id-hexg0Id-1)*5; std::size_t lgthH1=std::distance(connHexag1,std::find(connHexag1,conn+lgth,-1)); if(lgthH1==6) { - std::vector tmp; - std::set conn1(connHexag0,connHexag0+6); - std::set conn2(connHexag1,connHexag1+6); - std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); + std::vector tmp; + std::set conn1(connHexag0,connHexag0+6); + std::set conn2(connHexag1,connHexag1+6); + std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); if(tmp.empty()) { - int tmp2[6]; + mcIdType tmp2[6]; if(tryToArrangeOppositeFace(conn,lgth,6,connHexag0,connHexag1,8,tmp2)) { std::copy(connHexag0,connHexag0+6,retConn); @@ -388,16 +388,16 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *con * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_PENTA6 is returned. * If fails a POLYHED is returned. */ -INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth) { - std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3); - std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4); + std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_TRI3); + std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_QUAD4); if(nbOfTriFace==2 && nbOfQuadFace==3) { - std::size_t tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3)); - std::size_t tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3)); - const int *tri_0=0,*tri_1=0; - const int *w=conn; + std::size_t tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_TRI3)); + std::size_t tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_TRI3)); + const mcIdType *tri_0=0,*tri_1=0; + const mcIdType *w=conn; for(std::size_t i=0;i<5;i++) { if(i==tri3_0) @@ -407,13 +407,13 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *con w=std::find(w,conn+lgth,-1); w++; } - std::vector tmp; - std::set conn1(tri_0,tri_0+3); - std::set conn2(tri_1,tri_1+3); - std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); + std::vector tmp; + std::set conn1(tri_0,tri_0+3); + std::set conn2(tri_1,tri_1+3); + std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector >(tmp)); if(tmp.empty()) { - int tmp2[3]; + mcIdType tmp2[3]; if(tryToArrangeOppositeFace(conn,lgth,3,tri_0,tri_1,5,tmp2)) { std::copy(tri_0,tri_0+3,retConn); @@ -432,15 +432,15 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *con * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_PYRA5 is returned. * If fails a POLYHED is returned. */ -INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth) { - std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3); - std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4); + std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_TRI3); + std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_QUAD4); if(nbOfTriFace==4 && nbOfQuadFace==1) { - std::size_t quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4)); - const int *quad4=0; - const int *w=conn; + std::size_t quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(mcIdType)INTERP_KERNEL::NORM_QUAD4)); + const mcIdType *quad4=0; + const mcIdType *w=conn; for(std::size_t i=0;i<5 && quad4==0;i++) { if(i==quad4_pos) @@ -448,7 +448,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn w=std::find(w,conn+lgth,-1); w++; } - std::set quad4S(quad4,quad4+4); + std::set quad4S(quad4,quad4+4); w=conn; bool ok=true; int point=-1; @@ -456,12 +456,12 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn { if(i!=quad4_pos) { - std::vector tmp; - std::set conn2(w,w+3); - std::set_intersection(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector >(tmp)); + std::vector tmp; + std::set conn2(w,w+3); + std::set_intersection(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector >(tmp)); ok=tmp.size()==2; tmp.clear(); - std::set_difference(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector >(tmp)); + std::set_difference(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector >(tmp)); ok=ok && tmp.size()==1; if(ok) { @@ -491,21 +491,21 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_TETRA4 is returned. * If fails a POLYHED is returned. */ -INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth) +INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth) { - if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to(),(int)INTERP_KERNEL::NORM_TRI3))==conn+lgth+nbOfFaces) + if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to(),(mcIdType)INTERP_KERNEL::NORM_TRI3))==conn+lgth+nbOfFaces) { - std::set tribase(conn,conn+3); + std::set tribase(conn,conn+3); int point=-1; bool ok=true; for(int i=1;i<4 && ok;i++) { - std::vector tmp; - std::set conn2(conn+i*4,conn+4*i+3); - std::set_intersection(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector >(tmp)); + std::vector tmp; + std::set conn2(conn+i*4,conn+4*i+3); + std::set_intersection(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector >(tmp)); ok=tmp.size()==2; tmp.clear(); - std::set_difference(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector >(tmp)); + std::set_difference(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector >(tmp)); ok=ok && tmp.size()==1; if(ok) { @@ -534,7 +534,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const int *con * - fully degenerated polygons (polygon with 1 point, or 2 if quadratic) * - quad polygon with 2 points and two identical quad points */ -bool CellSimplify::isFlatCell(const int* conn, int pos, int lgth, NormalizedCellType type) +bool CellSimplify::isFlatCell(const mcIdType* conn, mcIdType pos, int lgth, NormalizedCellType type) { const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type); if ( lgth <= 2 ) // a polygon with a single, or two points has been returned. This check also captures degenerated quadratics diff --git a/src/INTERP_KERNEL/InterpKernelCellSimplify.hxx b/src/INTERP_KERNEL/InterpKernelCellSimplify.hxx index ba2168374..148d67b70 100644 --- a/src/INTERP_KERNEL/InterpKernelCellSimplify.hxx +++ b/src/INTERP_KERNEL/InterpKernelCellSimplify.hxx @@ -24,26 +24,27 @@ #include "INTERPKERNELDefines.hxx" #include "NormalizedUnstructuredMesh.hxx" #include "InterpKernelException.hxx" +#include "MCIdType.hxx" namespace INTERP_KERNEL { class INTERPKERNEL_EXPORT CellSimplify { public: - static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth); - static int *getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, + static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, int lgth, mcIdType *retConn, int& retLgth); + static mcIdType *getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, int lgth, int& retNbOfFaces, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPoly2D(bool isQuad, const int *conn, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPoly3D(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPolyHex8(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPolyHexp12(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPolyPenta6(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPolyPyra5(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static INTERP_KERNEL::NormalizedCellType tryToUnPolyTetra4(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth); - static bool tryToArrangeOppositeFace(const int *conn, int lgth, int lgthBaseFace, const int *baseFace, const int *oppFaceId, int nbOfFaces, int *retConnOfOppFace); - static bool isWellOriented(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace); - static bool orientOppositeFace(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace); - static bool isFlatCell(const int* conn, int pos, int lgth, NormalizedCellType type); + static INTERP_KERNEL::NormalizedCellType tryToUnPoly2D(bool isQuad, const mcIdType *conn, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPoly3D(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPolyHex8(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPolyHexp12(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPolyPenta6(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPolyPyra5(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static INTERP_KERNEL::NormalizedCellType tryToUnPolyTetra4(const mcIdType *conn, int nbOfFaces, int lgth, mcIdType *retConn, int& retLgth); + static bool tryToArrangeOppositeFace(const mcIdType *conn, int lgth, int lgthBaseFace, const mcIdType *baseFace, const mcIdType *oppFaceId, int nbOfFaces, mcIdType *retConnOfOppFace); + static bool isWellOriented(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, int lgthBaseFace); + static bool orientOppositeFace(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, int lgthBaseFace); + static bool isFlatCell(const mcIdType* conn, mcIdType pos, int lgth, NormalizedCellType type); }; } diff --git a/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx b/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx index ee2f3e531..3b8de967a 100644 --- a/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx +++ b/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx @@ -52,10 +52,10 @@ namespace INTERP_KERNEL * \param [in] incy the increment between successive entries in \a dy. * \return the sum of the product of the corresponding entries of \a dx and \a dy. */ - double ddot(int n, const double *dx, int incx, const double *dy, int incy) + double ddot(mcIdType n, const double *dx, mcIdType incx, const double *dy, mcIdType incy) { double dtemp=0.0; - int i,ix,iy,m; + mcIdType i,ix,iy,m; if(n<=0) return dtemp; // Code for unequal increments or equal increments not equal to 1. @@ -86,9 +86,9 @@ namespace INTERP_KERNEL } - void dscal(int n, double sa, double *x, int incx) + void dscal(mcIdType n, double sa, double *x, mcIdType incx) { - int i,ix,m; + mcIdType i,ix,m; if(n<=0) { } else if(incx==1) @@ -118,9 +118,9 @@ namespace INTERP_KERNEL } } - void daxpy(int n, double da, const double *dx, int incx, double *dy, int incy) + void daxpy(mcIdType n, double da, const double *dx, mcIdType incx, double *dy, mcIdType incy) { - int i,ix,iy,m; + mcIdType i,ix,iy,m; if (n<=0) return; if (da==0.0) @@ -165,9 +165,9 @@ namespace INTERP_KERNEL return -x; } - void dswap(int n, double *x, int incx, double *y, int incy) + void dswap(mcIdType n, double *x, mcIdType incx, double *y, mcIdType incy) { - int i,ix,iy,m; + mcIdType i,ix,iy,m; double temp; if(n<=0) { } @@ -222,10 +222,10 @@ namespace INTERP_KERNEL * \param [in] incx the increment between successive entries of SX. * \return the index of the element of maximum absolute value (in C convention). */ - int idamax(int n, const double *dx, int incx) + mcIdType idamax(mcIdType n, const double *dx, mcIdType incx) { double dmax; - int i,ix,value; + mcIdType i,ix,value; value=-1; if ( n < 1 || incx <= 0 ) return value; @@ -292,13 +292,13 @@ namespace INTERP_KERNEL * - K, if U(K-1,K-1) == 0. This is not an error condition for this subroutine, * but it does indicate that DGESL or DGEDI will divide by zero if called. */ - int dgefa(double *a, int lda, int n, int *ipvt) + mcIdType dgefa(double *a, mcIdType lda, mcIdType n, mcIdType *ipvt) { - int info=0; - int l; + mcIdType info=0; + mcIdType l; double t; // Gaussian elimination with partial pivoting. - for(int k=0;k=0;k--) + for(mcIdType k=n-2;k>=0;k--) { - for(int i=k+1;i ipvt=new int[n]; + INTERP_KERNEL::AutoPtr ipvt=new mcIdType[n]; INTERP_KERNEL::AutoPtr work=new double[n*n]; std::copy(A,A+n*n,iA); dgefa(iA,n,n,ipvt); diff --git a/src/INTERP_KERNEL/InterpKernelMatrixTools.hxx b/src/INTERP_KERNEL/InterpKernelMatrixTools.hxx index 231e97ac9..beb155a6d 100644 --- a/src/INTERP_KERNEL/InterpKernelMatrixTools.hxx +++ b/src/INTERP_KERNEL/InterpKernelMatrixTools.hxx @@ -22,12 +22,13 @@ #define __INTERPKERNELMATRIXTOOLS_HXX__ #include "INTERPKERNELDefines.hxx" +#include "MCIdType.hxx" namespace INTERP_KERNEL { - void INTERPKERNEL_EXPORT matrixProduct(const double *A, int n1, int p1, const double *B, int n2, int p2, double *C); - void INTERPKERNEL_EXPORT inverseMatrix(const double *A, int n, double *iA); - void INTERPKERNEL_EXPORT daxpy(int n, double da, const double *dx, int incx, double *dy, int incy); + void INTERPKERNEL_EXPORT matrixProduct(const double *A, mcIdType n1, mcIdType p1, const double *B, mcIdType n2, mcIdType p2, double *C); + void INTERPKERNEL_EXPORT inverseMatrix(const double *A, mcIdType n, double *iA); + void INTERPKERNEL_EXPORT daxpy(mcIdType n, double da, const double *dx, mcIdType incx, double *dy, mcIdType incy); } #endif diff --git a/src/INTERP_KERNEL/Interpolation.hxx b/src/INTERP_KERNEL/Interpolation.hxx index 4baba86f4..f8fa6a146 100644 --- a/src/INTERP_KERNEL/Interpolation.hxx +++ b/src/INTERP_KERNEL/Interpolation.hxx @@ -37,17 +37,17 @@ namespace INTERP_KERNEL Interpolation(const InterpolationOptions& io) :InterpolationOptions(io){} //interpolation of two triangular meshes. template - int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result) + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result) { return asLeaf().interpolateMeshes(meshS,meshT,result); } template - int fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const std::string& method) { return fromToIntegralUniform(false,meshT,result,method); } + typename MyMeshType::MyConnType fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const std::string& method) { return fromToIntegralUniform(false,meshT,result,method); } template - int toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const std::string& method) { return fromToIntegralUniform(true,meshS,result,method); } + typename MyMeshType::MyConnType toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const std::string& method) { return fromToIntegralUniform(true,meshS,result,method); } template static double CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel); protected: template - int fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method); + typename MyMeshType::MyConnType fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method); protected: TrueMainInterpolator& asLeaf() { return static_cast(*this); } }; diff --git a/src/INTERP_KERNEL/Interpolation.txx b/src/INTERP_KERNEL/Interpolation.txx index 7a896c80b..7b2e3ba2c 100755 --- a/src/INTERP_KERNEL/Interpolation.txx +++ b/src/INTERP_KERNEL/Interpolation.txx @@ -29,10 +29,10 @@ namespace INTERP_KERNEL { template template - int Interpolation::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method) + typename MyMeshType::MyConnType Interpolation::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method) { typedef typename MyMeshType::MyConnType ConnType; - int ret=-1; + ConnType ret=-1; if(method=="P0") { IntegralUniformIntersectorP0 intersector(mesh,InterpolationOptions::getMeasureAbsStatus()); diff --git a/src/INTERP_KERNEL/Interpolation2D1D.txx b/src/INTERP_KERNEL/Interpolation2D1D.txx index 2324e62ae..02aef0c72 100755 --- a/src/INTERP_KERNEL/Interpolation2D1D.txx +++ b/src/INTERP_KERNEL/Interpolation2D1D.txx @@ -114,12 +114,12 @@ namespace INTERP_KERNEL /* Loop on the target cells - core of the algorithm */ /****************************************************/ long start_intersection=clock(); - long nbelem_type=myMeshT.getNumberOfElements(); + ConnType nbelem_type=myMeshT.getNumberOfElements(); const ConnType *connIndxT=myMeshT.getConnectivityIndexPtr(); - for(int iT=0; iT intersecting_elems; + std::vector intersecting_elems; double bb[2*SPACEDIM]; intersector->getElemBB(bb,myMeshT,OTT::indFC(iT),nb_nodesT); my_tree.getIntersectingElems(bb, intersecting_elems); @@ -127,7 +127,7 @@ namespace INTERP_KERNEL counter+=intersecting_elems.size(); intersecting_elems.clear(); } - int ret=intersector->getNumberOfColsOfResMatrix(); + ConnType ret=intersector->getNumberOfColsOfResMatrix(); const DuplicateFacesType& intersectFaces = *intersector->getIntersectFaces(); DuplicateFacesType::const_iterator iter; diff --git a/src/INTERP_KERNEL/Interpolation2D3D.txx b/src/INTERP_KERNEL/Interpolation2D3D.txx index 05e653878..3531e9dce 100755 --- a/src/INTERP_KERNEL/Interpolation2D3D.txx +++ b/src/INTERP_KERNEL/Interpolation2D3D.txx @@ -60,7 +60,7 @@ namespace INTERP_KERNEL * */ template - int Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh, + ConnType Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MyMatrixType& matrix, const std::string& method) @@ -75,7 +75,7 @@ namespace INTERP_KERNEL std::vector*> srcElems(numSrcElems); std::vector*> targetElems(numTargetElems); - std::map*, int> indices; + std::map*, ConnType> indices; DuplicateFacesType intersectFaces; for(ConnType i = 0 ; i < numSrcElems ; ++i) @@ -111,7 +111,7 @@ namespace INTERP_KERNEL // create BBTree structure // - get bounding boxes double* bboxes = new double[6 * numSrcElems]; - int* srcElemIdx = new int[numSrcElems]; + ConnType* srcElemIdx = new ConnType[numSrcElems]; for(ConnType i = 0; i < numSrcElems ; ++i) { // get source bboxes in right order @@ -134,7 +134,7 @@ namespace INTERP_KERNEL for(ConnType i = 0; i < numTargetElems; ++i) { const BoundingBox* box = targetElems[i]->getBoundingBox(); - const int targetIdx = targetElems[i]->getIndex(); + const ConnType targetIdx = targetElems[i]->getIndex(); // get target bbox in right order double targetBox[6]; @@ -167,7 +167,7 @@ namespace INTERP_KERNEL } // free allocated memory - int ret=intersector->getNumberOfColsOfResMatrix(); + ConnType ret=intersector->getNumberOfColsOfResMatrix(); delete intersector; diff --git a/src/INTERP_KERNEL/Interpolation3D.hxx b/src/INTERP_KERNEL/Interpolation3D.hxx index 056c51f53..fca0a763f 100755 --- a/src/INTERP_KERNEL/Interpolation3D.hxx +++ b/src/INTERP_KERNEL/Interpolation3D.hxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL Interpolation3D(); Interpolation3D(const InterpolationOptions& io); template - int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method); + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method); private: SplittingPolicy _splitting_policy; }; diff --git a/src/INTERP_KERNEL/Interpolation3D.txx b/src/INTERP_KERNEL/Interpolation3D.txx index 8992aaa62..e0872c2e1 100755 --- a/src/INTERP_KERNEL/Interpolation3D.txx +++ b/src/INTERP_KERNEL/Interpolation3D.txx @@ -75,7 +75,7 @@ namespace INTERP_KERNEL * */ template - int Interpolation3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method) + typename MyMeshType::MyConnType Interpolation3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method) { typedef typename MyMeshType::MyConnType ConnType; // create MeshElement objects corresponding to each element of the two meshes @@ -87,7 +87,7 @@ namespace INTERP_KERNEL std::vector*> srcElems(numSrcElems); std::vector*> targetElems(numTargetElems); - std::map*, int> indices; + std::map*, ConnType> indices; for(ConnType i = 0 ; i < numSrcElems ; ++i) srcElems[i] = new MeshElement(i, srcMesh); @@ -186,14 +186,14 @@ namespace INTERP_KERNEL MeshRegion& srcRegion = firstNode->getSrcRegion(); - for(unsigned long i = 0 ; i < numSrcElems ; ++i) + for(ConnType i = 0 ; i < numSrcElems ; ++i) { srcRegion.addElement(srcElems[i], srcMesh); } MeshRegion& targetRegion = firstNode->getTargetRegion(); - for(unsigned long i = 0 ; i < numTargetElems ; ++i) + for(ConnType i = 0 ; i < numTargetElems ; ++i) { if(!srcRegion.isDisjointWithElementBoundingBox( *(targetElems[i]) )) { @@ -252,8 +252,8 @@ namespace INTERP_KERNEL // add source elements of current node that overlap the target regions of the new nodes LOG(5, " -- Adding source elements"); - int numLeftElements = 0; - int numRightElements = 0; + ConnType numLeftElements = 0; + ConnType numRightElements = 0; for(typename std::vector*>::const_iterator iter = currNode->getSrcRegion().getBeginElements() ; iter != currNode->getSrcRegion().getEndElements() ; ++iter) { @@ -307,7 +307,7 @@ namespace INTERP_KERNEL // create BBTree structure // - get bounding boxes double* bboxes = new double[6 * numSrcElems]; - int* srcElemIdx = new int[numSrcElems]; + ConnType* srcElemIdx = new ConnType[numSrcElems]; for(ConnType i = 0; i < numSrcElems ; ++i) { // get source bboxes in right order @@ -330,7 +330,7 @@ namespace INTERP_KERNEL for(ConnType i = 0; i < numTargetElems; ++i) { const BoundingBox* box = targetElems[i]->getBoundingBox(); - const int targetIdx = targetElems[i]->getIndex(); + const ConnType targetIdx = targetElems[i]->getIndex(); // get target bbox in right order double targetBox[6]; @@ -354,7 +354,7 @@ namespace INTERP_KERNEL #endif // free allocated memory - int ret=intersector->getNumberOfColsOfResMatrix(); + ConnType ret=intersector->getNumberOfColsOfResMatrix(); delete intersector; diff --git a/src/INTERP_KERNEL/Interpolation3D1D.hxx b/src/INTERP_KERNEL/Interpolation3D1D.hxx index bdd11b540..59a5cec7c 100755 --- a/src/INTERP_KERNEL/Interpolation3D1D.hxx +++ b/src/INTERP_KERNEL/Interpolation3D1D.hxx @@ -36,7 +36,7 @@ namespace INTERP_KERNEL Interpolation3D1D(); Interpolation3D1D(const InterpolationOptions& io); template - int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method); + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method); private: void adjustBoundingBoxes(std::vector& bbox); }; diff --git a/src/INTERP_KERNEL/Interpolation3D1D.txx b/src/INTERP_KERNEL/Interpolation3D1D.txx index 93594623e..9bc67b338 100755 --- a/src/INTERP_KERNEL/Interpolation3D1D.txx +++ b/src/INTERP_KERNEL/Interpolation3D1D.txx @@ -39,7 +39,7 @@ namespace INTERP_KERNEL * adjusted in a similar fashion as in InterpolationPlanar::performAdjustmentOfBB() **/ template - int Interpolation3D1D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method) + typename MyMeshType::MyConnType Interpolation3D1D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method) { if(InterpolationOptions::getIntersectionType() != PointLocator) INTERP_KERNEL::Exception("Invalid 3D/1D intersection type specified : must be PointLocator."); @@ -54,7 +54,7 @@ namespace INTERP_KERNEL std::vector*> srcElems(numSrcElems); std::vector*> targetElems(numTargetElems); - std::map*, int> indices; + std::map*, ConnType> indices; for(ConnType i = 0 ; i < numSrcElems ; ++i) srcElems[i] = new MeshElement(i, srcMesh); @@ -84,7 +84,7 @@ namespace INTERP_KERNEL // create BBTree structure // - get bounding boxes std::vector bboxes(6*numSrcElems); - int* srcElemIdx = new int[numSrcElems]; + ConnType* srcElemIdx = new ConnType[numSrcElems]; for(ConnType i = 0; i < numSrcElems ; ++i) { // get source bboxes in right order @@ -110,7 +110,7 @@ namespace INTERP_KERNEL for(ConnType i = 0; i < numTargetElems; ++i) { const BoundingBox* box = targetElems[i]->getBoundingBox(); - const int targetIdx = targetElems[i]->getIndex(); + const ConnType targetIdx = targetElems[i]->getIndex(); // get target bbox in right order double targetBox[6]; @@ -132,7 +132,7 @@ namespace INTERP_KERNEL // free allocated memory delete [] srcElemIdx; - int ret=intersector->getNumberOfColsOfResMatrix(); + ConnType ret=intersector->getNumberOfColsOfResMatrix(); delete intersector; diff --git a/src/INTERP_KERNEL/InterpolationCU.txx b/src/INTERP_KERNEL/InterpolationCU.txx index 828646721..bc9cdeace 100644 --- a/src/INTERP_KERNEL/InterpolationCU.txx +++ b/src/INTERP_KERNEL/InterpolationCU.txx @@ -92,7 +92,7 @@ namespace INTERP_KERNEL //================================================================================ template - int InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh, + ConnType InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh, const MyUMeshType& tgt_mesh, MatrixType& result, const char * method) @@ -117,27 +117,27 @@ namespace INTERP_KERNEL } // create empty maps for all target elements result.resize( intersector->getNumberOfRowsOfResMatrix() ); - const int ret = intersector->getNumberOfColsOfResMatrix(); + const ConnType ret = intersector->getNumberOfColsOfResMatrix(); const double* src_coords[ dim ]; - int src_nb_coords[ dim ]; - std::map< double, int> src_coord_to_index[ dim ]; + ConnType src_nb_coords[ dim ]; + std::map< double, ConnType> src_coord_to_index[ dim ]; for ( int j = 0; j < dim; ++j ) { src_coords [j] = src_mesh.getCoordsAlongAxis( _TMIC( j )); src_nb_coords[j] = static_cast(src_mesh.nbCellsAlongAxis ( _TMIC( j ))) + 1; - for (int i = 0; i < src_nb_coords[j]; ++i ) + for (ConnType i = 0; i < src_nb_coords[j]; ++i ) src_coord_to_index[j].insert( std::make_pair( src_coords[j][i], i )); } - const unsigned long tgtu_nb_cells = tgt_mesh.getNumberOfElements(); + const ConnType tgtu_nb_cells = tgt_mesh.getNumberOfElements(); IntersectorCU bbHelper(src_mesh, tgt_mesh); double bb[2*dim]; // loop on unstructured tgt cells - for(unsigned int iT=0; iT > structIndices(1); - std::map< double, int>::iterator coo_ind; + std::map< double, ConnType>::iterator coo_ind; for ( int j = 0; j < dim; ++j ) { coo_ind = src_coord_to_index[j].lower_bound( bb[2*j+1] - eps ); if ( coo_ind == src_coord_to_index[j].end() ) --coo_ind; - int max_i = coo_ind->second; + ConnType max_i = coo_ind->second; coo_ind = src_coord_to_index[j].upper_bound( bb[2*j ] + eps ); if ( coo_ind != src_coord_to_index[j].begin() ) --coo_ind; - int min_i = coo_ind->second; + ConnType min_i = coo_ind->second; std::vector< std::vector< CConnType > > newStructIndices; for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) { - for ( int i = min_i; i < max_i; ++i ) + for ( ConnType i = min_i; i < max_i; ++i ) { std::vector< CConnType > index = structIndices[iInd]; index.push_back( i ); @@ -214,14 +214,14 @@ namespace INTERP_KERNEL //================================================================================ template - int InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method) + ConnType InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method) { MatrixType revResult; - int sizeT = interpolateMeshes( meshT, meshS, revResult, method ); - int sizeS = revResult.size(); + ConnType sizeT = interpolateMeshes( meshT, meshS, revResult, method ); + ConnType sizeS = revResult.size(); result.resize( sizeT ); - for ( int iS = 0; iS < sizeS; ++iS ) + for ( ConnType iS = 0; iS < sizeS; ++iS ) { typename MatrixType::value_type & row = revResult[iS]; typename MatrixType::value_type::iterator iT_surf = row.begin(); diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index aaa4e812c..f5ff0abde 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -1012,7 +1012,7 @@ namespace INTERP_KERNEL } template - inline void getElemBB(double* bb, const double *coordsOfMesh, int iP, int nb_nodes) + inline void getElemBB(double* bb, const double *coordsOfMesh, mcIdType iP, int nb_nodes) { bb[0]=std::numeric_limits::max(); bb[1]=-std::numeric_limits::max(); diff --git a/src/INTERP_KERNEL/OrientationInverter.cxx b/src/INTERP_KERNEL/OrientationInverter.cxx index c23a75b90..e61f3af12 100644 --- a/src/INTERP_KERNEL/OrientationInverter.cxx +++ b/src/INTERP_KERNEL/OrientationInverter.cxx @@ -72,7 +72,7 @@ OrientationInverter *OrientationInverter::BuildInstanceFrom(NormalizedCellType g } } -void OrientationInverterChecker::check(int *beginPt, int *endPt) const +void OrientationInverterChecker::check(mcIdType *beginPt, mcIdType *endPt) const { if(std::distance(beginPt,endPt)!=getNbNodes()) { @@ -81,72 +81,72 @@ void OrientationInverterChecker::check(int *beginPt, int *endPt) const } } -void OrientationInverterSEG2::operateAndShutUp(int *beginPt) const +void OrientationInverterSEG2::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[0],beginPt[1]); } -void OrientationInverterSEG3::operateAndShutUp(int *beginPt) const +void OrientationInverterSEG3::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[0],beginPt[2]); } -void OrientationInverter2DLinear::operateAndShutUp(int *beginPt) const +void OrientationInverter2DLinear::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+getNbNodes()); } -void OrientationInverter2DQuadratic::operateAndShutUp(int *beginPt) const +void OrientationInverter2DQuadratic::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()); std::reverse(beginPt+1,beginPt+nbNodes/2); std::reverse(beginPt+nbNodes/2,beginPt+nbNodes); } -void OrientationInverterPolygon::operate(int *beginPt, int *endPt) const +void OrientationInverterPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const { std::reverse(beginPt+1,endPt); } -void OrientationInverterQPolygon::operate(int *beginPt, int *endPt) const +void OrientationInverterQPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const { std::size_t sz(std::distance(beginPt,endPt)); std::reverse(beginPt+1,beginPt+sz/2); std::reverse(beginPt+sz/2,endPt); } -void OrientationInverterTetra4::operateAndShutUp(int *beginPt) const +void OrientationInverterTetra4::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[1],beginPt[2]); } -void OrientationInverterTetra10::operateAndShutUp(int *beginPt) const +void OrientationInverterTetra10::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[1],beginPt[2]); std::swap(beginPt[4],beginPt[6]); std::swap(beginPt[8],beginPt[9]); } -void OrientationInverterPyra5::operateAndShutUp(int *beginPt) const +void OrientationInverterPyra5::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+4); } -void OrientationInverterPyra13::operateAndShutUp(int *beginPt) const +void OrientationInverterPyra13::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+4); std::reverse(beginPt+5,beginPt+9); std::swap(beginPt[10],beginPt[12]); } -void OrientationInverter3DExtrusionLinear::operateAndShutUp(int *beginPt) const +void OrientationInverter3DExtrusionLinear::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()); std::reverse(beginPt+1,beginPt+nbNodes/2); std::reverse(beginPt+nbNodes/2+1,beginPt+nbNodes); } -void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(int *beginPt) const +void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()),nbNodesLinearBase(nbNodes/5); std::reverse(beginPt+1,beginPt+nbNodesLinearBase); diff --git a/src/INTERP_KERNEL/OrientationInverter.hxx b/src/INTERP_KERNEL/OrientationInverter.hxx index 06653e419..5ab0ee629 100644 --- a/src/INTERP_KERNEL/OrientationInverter.hxx +++ b/src/INTERP_KERNEL/OrientationInverter.hxx @@ -23,6 +23,7 @@ #include "INTERPKERNELDefines.hxx" #include "NormalizedGeometricTypes" +#include "MCIdType.hxx" namespace INTERP_KERNEL { @@ -31,19 +32,19 @@ namespace INTERP_KERNEL public: INTERPKERNEL_EXPORT static OrientationInverter *BuildInstanceFrom(NormalizedCellType gt); INTERPKERNEL_EXPORT virtual ~OrientationInverter() { } - INTERPKERNEL_EXPORT virtual void operate(int *beginPt, int *endPt) const = 0; + INTERPKERNEL_EXPORT virtual void operate(mcIdType *beginPt, mcIdType *endPt) const = 0; }; class OrientationInverterChecker : public OrientationInverter { public: OrientationInverterChecker(unsigned nbNodes):_nb_nodes(nbNodes) { } - void operate(int *beginPt, int *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); } - virtual void operateAndShutUp(int *beginPt) const = 0; + void operate(mcIdType *beginPt, mcIdType *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); } + virtual void operateAndShutUp(mcIdType *beginPt) const = 0; protected: unsigned getNbNodes() const { return _nb_nodes; } private: - void check(int *beginPt, int *endPt) const; + void check(mcIdType *beginPt, mcIdType *endPt) const; private: unsigned _nb_nodes; }; @@ -52,82 +53,82 @@ namespace INTERP_KERNEL { public: OrientationInverterSEG2():OrientationInverterChecker(2u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterSEG3 : public OrientationInverterChecker { public: OrientationInverterSEG3():OrientationInverterChecker(3u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter2DLinear : public OrientationInverterChecker { public: OrientationInverter2DLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter2DQuadratic : public OrientationInverterChecker { public: OrientationInverter2DQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPolygon : public OrientationInverter { public: - void operate(int *beginPt, int *endPt) const; + void operate(mcIdType *beginPt, mcIdType *endPt) const; }; class OrientationInverterQPolygon : public OrientationInverter { public: - void operate(int *beginPt, int *endPt) const; + void operate(mcIdType *beginPt, mcIdType *endPt) const; }; class OrientationInverterTetra4 : public OrientationInverterChecker { public: OrientationInverterTetra4():OrientationInverterChecker(4u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterTetra10 : public OrientationInverterChecker { public: OrientationInverterTetra10():OrientationInverterChecker(10u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPyra5 : public OrientationInverterChecker { public: OrientationInverterPyra5():OrientationInverterChecker(5u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPyra13 : public OrientationInverterChecker { public: OrientationInverterPyra13():OrientationInverterChecker(13u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter3DExtrusionLinear : public OrientationInverterChecker { public: OrientationInverter3DExtrusionLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter3DExtrusionQuadratic : public OrientationInverterChecker { public: OrientationInverter3DExtrusionQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; } diff --git a/src/INTERP_KERNEL/PlanarIntersector.hxx b/src/INTERP_KERNEL/PlanarIntersector.hxx index ef35bbde9..72779a629 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.hxx +++ b/src/INTERP_KERNEL/PlanarIntersector.hxx @@ -39,7 +39,7 @@ namespace INTERP_KERNEL static const int MESHDIM=MyMeshType::MY_MESHDIM; typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; - typedef typename std::map > DuplicateFacesType; + typedef typename std::map > DuplicateFacesType; public: PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); virtual ~PlanarIntersector(); diff --git a/src/INTERP_KERNEL/PointLocatorAlgos.txx b/src/INTERP_KERNEL/PointLocatorAlgos.txx index 6a0498e72..7017933ea 100644 --- a/src/INTERP_KERNEL/PointLocatorAlgos.txx +++ b/src/INTERP_KERNEL/PointLocatorAlgos.txx @@ -50,19 +50,19 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; const int SPACEDIM=MyMeshType::MY_SPACEDIM; const NumberingPolicy numPol=MyMeshType::My_numPol; - int nelem = _mesh.getNumberOfElements(); + ConnType nelem = _mesh.getNumberOfElements(); _bb = new double[SPACEDIM*2*nelem]; const ConnType* conn = _mesh.getConnectivityPtr(); const ConnType* conn_index = _mesh.getConnectivityIndexPtr(); const double* coords=_mesh.getCoordinatesPtr(); - for (int i=0; i::max(); _bb[2*(i*SPACEDIM+idim)+1]=-std::numeric_limits::max(); } - for (int index= conn_index[i]; index < conn_index[i+1];index++) + for (ConnType index= conn_index[i]; index < conn_index[i+1];index++) { //coordelem points to the coordinates of the current node of the i-th element const double* coordelem = coords+OTT::ind2C(conn[OTT::ind2C(index)])*SPACEDIM; @@ -95,7 +95,7 @@ namespace INTERP_KERNEL std::list retlist; for(unsigned int i=0; i< candidates.size(); i++) { - int ielem=candidates[i]; + ConnType ielem=candidates[i]; if (elementContainsPoint(ielem,x,eps)) retlist.push_back(OTT::indFC(ielem)); } @@ -133,7 +133,7 @@ namespace INTERP_KERNEL return ret; } - static bool isElementContainsPointAlg3D(const double *ptToTest, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, const double *coords, const CellModel& cmType, double eps) + static bool isElementContainsPointAlg3D(const double *ptToTest, const typename MyMeshType::MyConnType *conn_elem, typename MyMeshType::MyConnType conn_elem_sz, const double *coords, const CellModel& cmType, double eps) { const int SPACEDIM=MyMeshType::MY_SPACEDIM; typedef typename MyMeshType::MyConnType ConnType; @@ -166,7 +166,7 @@ namespace INTERP_KERNEL /*! * Precondition : spacedim==meshdim. To be checked upstream to this call. */ - static bool isElementContainsPoint(const double *ptToTest, NormalizedCellType type, const double *coords, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, double eps) + static bool isElementContainsPoint(const double *ptToTest, NormalizedCellType type, const double *coords, const typename MyMeshType::MyConnType *conn_elem, typename MyMeshType::MyConnType conn_elem_sz, double eps) { const int SPACEDIM=MyMeshType::MY_SPACEDIM; typedef typename MyMeshType::MyConnType ConnType; @@ -249,17 +249,17 @@ namespace INTERP_KERNEL */ //================================================================================ - virtual std::list locates(const double* x, double eps) + virtual std::list locates(const double* x, double eps) { typedef typename MyMeshType::MyConnType ConnType; const NumberingPolicy numPol=MyMeshType::My_numPol; - std::list simplexNodes; - std::list candidates = PointLocatorAlgos::locates(x,eps); - std::list::iterator eIt = candidates.begin(); + std::list simplexNodes; + std::list candidates = PointLocatorAlgos::locates(x,eps); + typename std::list::iterator eIt = candidates.begin(); for ( ; eIt != candidates.end(); ++eIt ) { - const int i = OTT::ind2C( *eIt ); + const ConnType i = OTT::ind2C( *eIt ); const double* coords= _mesh.getCoordinatesPtr(); const ConnType* conn=_mesh.getConnectivityPtr(); const ConnType* conn_index= _mesh.getConnectivityIndexPtr(); @@ -279,14 +279,14 @@ namespace INTERP_KERNEL else { NormalizedCellType simlexType = cell.getDimension()==3 ? NORM_TETRA4 : NORM_TRI3; - std::vector sonNodes; + std::vector sonNodes; NormalizedCellType sonType; const unsigned nbSons = cell.getNumberOfSons2( conn_elem, conn_elem_sz ); for ( unsigned s = 0; s < nbSons; ++s ) { sonNodes.resize( cell.getNumberOfNodesConstituentTheSon2( s, conn_elem, conn_elem_sz )); cell.fillSonCellNodalConnectivity2( s, conn_elem, conn_elem_sz, &sonNodes[0], sonType ); - std::set sonNodesSet( sonNodes.begin(), sonNodes.end() ); + std::set sonNodesSet( sonNodes.begin(), sonNodes.end() ); std::set< std::set< ConnType > > checkedSonSimplex; for ( unsigned sn = 0; sn < sonNodes.size(); ++sn ) diff --git a/src/INTERP_KERNEL/SplitterTetra.hxx b/src/INTERP_KERNEL/SplitterTetra.hxx index 54e1387b7..5ed02aa47 100644 --- a/src/INTERP_KERNEL/SplitterTetra.hxx +++ b/src/INTERP_KERNEL/SplitterTetra.hxx @@ -27,6 +27,7 @@ #include "InterpKernelException.hxx" #include "InterpKernelHashMap.hxx" #include "VectorUtils.hxx" +#include "MCIdType.hxx" #include #include @@ -199,11 +200,11 @@ namespace INTERP_KERNEL -15,-19,-18,-10,-7,-17,-12,7, -19,-16,-11,-18,-17,-8,6,-12}; - void SplitHexa8IntoTetras(SplittingPolicy policy, const int *nodalConnBg, const int *nodalConnEnd, const double *coords, - std::vector& tetrasNodalConn, std::vector& addCoords); + void SplitHexa8IntoTetras(SplittingPolicy policy, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords, + std::vector& tetrasNodalConn, std::vector& addCoords); - INTERPKERNEL_EXPORT void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const int *nodalConnBg, const int *nodalConnEnd, const double *coords, - std::vector& tetrasNodalConn, std::vector& addCoords); + INTERPKERNEL_EXPORT void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords, + std::vector& tetrasNodalConn, std::vector& addCoords); /** * \brief Class representing a triangular face, used as key in caching hash map in SplitterTetra. @@ -222,7 +223,7 @@ namespace INTERP_KERNEL * @param node2 global number of the second node of the face * @param node3 global number of the third node of the face */ - TriangleFaceKey(int node1, int node2, int node3) + TriangleFaceKey(mcIdType node1, mcIdType node2, mcIdType node3) { Sort3Ints(_nodes, node1, node2, node3); _hashVal = ( _nodes[0] + _nodes[1] + _nodes[2] ) % 29; @@ -273,11 +274,11 @@ namespace INTERP_KERNEL return _hashVal; } - inline static void Sort3Ints(int* sorted, int node1, int node2, int node3); + inline static void Sort3Ints(mcIdType* sorted, mcIdType node1, mcIdType node2, mcIdType node3); private: /// global numbers of the three nodes, sorted in ascending order - int _nodes[3]; + mcIdType _nodes[3]; /// hash value for the object, calculated in the constructor int _hashVal; @@ -286,12 +287,12 @@ namespace INTERP_KERNEL /** * Method to sort three integers in ascending order * - * @param sorted int[3] array in which to store the result + * @param sorted mcIdType[3] array in which to store the result * @param x1 first integer * @param x2 second integer * @param x3 third integer */ - inline void TriangleFaceKey::Sort3Ints(int* sorted, int x1, int x2, int x3) + inline void TriangleFaceKey::Sort3Ints(mcIdType* sorted, mcIdType x1, mcIdType x2, mcIdType x3) { if(x1 < x2) { @@ -371,7 +372,7 @@ namespace INTERP_KERNEL double intersectSourceCell(typename MyMeshType::MyConnType srcCell, double* baryCentre=0); double intersectSourceFace(const NormalizedCellType polyType, const int polyNodesNbr, - const int *const polyNodes, + const mcIdType *const polyNodes, const double *const *const polyCoords, const double dimCaracteristic, const double precision, @@ -380,7 +381,7 @@ namespace INTERP_KERNEL double intersectTetra(const double** tetraCorners); - typename MyMeshType::MyConnType getId(int id) { return _conn[id]; } + typename MyMeshType::MyConnType getId(mcIdType id) { return _conn[id]; } void splitIntoDualCells(SplitterTetra **output); @@ -415,7 +416,7 @@ namespace INTERP_KERNEL TetraAffineTransform* _t; /// HashMap relating node numbers to transformed nodes, used for caching - HashMap< int , double* > _nodes; + HashMap< typename MyMeshType::MyConnType , double* > _nodes; /// HashMap relating triangular faces to calculated volume contributions, used for caching HashMap< TriangleFaceKey, double > _volumes; diff --git a/src/INTERP_KERNEL/SplitterTetra.txx b/src/INTERP_KERNEL/SplitterTetra.txx index 293250e9a..147312671 100644 --- a/src/INTERP_KERNEL/SplitterTetra.txx +++ b/src/INTERP_KERNEL/SplitterTetra.txx @@ -197,11 +197,11 @@ namespace INTERP_KERNEL bool isTargetOutside = false; // calculate the coordinates of the nodes - int *cellNodes=new int[nbOfNodes4Type]; + ConnType *cellNodes=new ConnType[nbOfNodes4Type]; for(int i = 0;i<(int)nbOfNodes4Type;++i) { // we could store mapping local -> global numbers too, but not sure it is worth it - const int globalNodeNum = getGlobalNumberOfNode(i, OTT::indFC(element), _src_mesh); + const ConnType globalNodeNum = getGlobalNumberOfNode(i, OTT::indFC(element), _src_mesh); cellNodes[i]=globalNodeNum; if(_nodes.find(globalNodeNum) == _nodes.end()) { @@ -239,10 +239,10 @@ namespace INTERP_KERNEL { // get sons connectivity NormalizedCellType faceType; - int *faceNodes, nbFaceNodes=-1; + mcIdType *faceNodes, nbFaceNodes=-1; if ( cellModelCell.isDynamic() ) { - faceNodes=new int[nbOfNodes4Type]; + faceNodes=new mcIdType[nbOfNodes4Type]; nbFaceNodes = cellModelCell.fillSonCellNodalConnectivity2(ii,rawCellConn,rawNbCellNodes,faceNodes,faceType); for ( int i = 0; i < nbFaceNodes; ++i ) faceNodes[i] = OTT::coo2C(faceNodes[i]); @@ -253,7 +253,7 @@ namespace INTERP_KERNEL const CellModel& faceModel=CellModel::GetCellModel(faceType); assert(faceModel.getDimension() == 2); nbFaceNodes = cellModelCell.getNumberOfNodesConstituentTheSon(ii); - faceNodes = new int[nbFaceNodes]; + faceNodes = new ConnType[nbFaceNodes]; cellModelCell.fillSonCellNodalConnectivity(ii,cellNodes,faceNodes); } // intersect a son with the unit tetra @@ -590,7 +590,7 @@ namespace INTERP_KERNEL template double SplitterTetra::intersectSourceFace(const NormalizedCellType polyType, const int polyNodesNbr, - const int *const polyNodes, + const mcIdType *const polyNodes, const double *const *const polyCoords, const double dimCaracteristic, const double precision, @@ -866,7 +866,7 @@ namespace INTERP_KERNEL if(!isTargetOutside) { const CellModel& cellModelCell=CellModel::GetCellModel(NORM_TETRA4); - int cellNodes[4] = { 0, 1, 2, 3 }, faceNodes[3]; + mcIdType cellNodes[4] = { 0, 1, 2, 3 }, faceNodes[3]; for(unsigned ii = 0 ; ii < 4 ; ++ii) { diff --git a/src/INTERP_KERNEL/TargetIntersector.hxx b/src/INTERP_KERNEL/TargetIntersector.hxx index 55fba1d65..aefeed0b5 100644 --- a/src/INTERP_KERNEL/TargetIntersector.hxx +++ b/src/INTERP_KERNEL/TargetIntersector.hxx @@ -46,8 +46,8 @@ namespace INTERP_KERNEL */ virtual void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) = 0; - virtual int getNumberOfRowsOfResMatrix() const = 0; - virtual int getNumberOfColsOfResMatrix() const = 0; + virtual ConnType getNumberOfRowsOfResMatrix() const = 0; + virtual ConnType getNumberOfColsOfResMatrix() const = 0; virtual ~TargetIntersector() { } }; } diff --git a/src/INTERP_KERNEL/VolSurfUser.hxx b/src/INTERP_KERNEL/VolSurfUser.hxx index 03562790e..225dfbb8a 100644 --- a/src/INTERP_KERNEL/VolSurfUser.hxx +++ b/src/INTERP_KERNEL/VolSurfUser.hxx @@ -24,6 +24,7 @@ #include "INTERPKERNELDefines.hxx" #include "InterpKernelException.hxx" #include "NormalizedUnstructuredMesh.hxx" +#include "MCIdType.hxx" namespace INTERP_KERNEL { @@ -45,7 +46,7 @@ namespace INTERP_KERNEL double INTERPKERNEL_EXPORT DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3); - double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords); + double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const mcIdType *connOfPolygonBg, const mcIdType *connOfPolygonEnd, const double *coords); bool ComputeRotTranslationMatrixToPut3PointsOnOXY(const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3, double *matrix); } diff --git a/src/INTERP_KERNEL/VolSurfUser.txx b/src/INTERP_KERNEL/VolSurfUser.txx index cdcc00c1c..9f637f78e 100644 --- a/src/INTERP_KERNEL/VolSurfUser.txx +++ b/src/INTERP_KERNEL/VolSurfUser.txx @@ -36,22 +36,22 @@ namespace INTERP_KERNEL case INTERP_KERNEL::NORM_SEG2 : case INTERP_KERNEL::NORM_SEG4 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); return INTERP_KERNEL::calculateLgthForSeg2(coords+(SPACEDIM*N1),coords+(SPACEDIM*N2),SPACEDIM); } case INTERP_KERNEL::NORM_SEG3 : { - int beginNode = OTT::coo2C(connec[0]); - int endNode = OTT::coo2C(connec[1]); - int middleNode = OTT::coo2C(connec[2]); + ConnType beginNode = OTT::coo2C(connec[0]); + ConnType endNode = OTT::coo2C(connec[1]); + ConnType middleNode = OTT::coo2C(connec[2]); return INTERP_KERNEL::calculateLgthForSeg3(coords+(SPACEDIM*beginNode),coords+(SPACEDIM*endNode),coords+(SPACEDIM*middleNode),SPACEDIM); } case INTERP_KERNEL::NORM_TRI3 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); return INTERP_KERNEL::calculateAreaForTria(coords+(SPACEDIM*N1), coords+(SPACEDIM*N2), @@ -75,10 +75,10 @@ namespace INTERP_KERNEL break; case INTERP_KERNEL::NORM_QUAD4 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); + ConnType N4 = OTT::coo2C(connec[3]); return INTERP_KERNEL::calculateAreaForQuad(coords+SPACEDIM*N1, coords+SPACEDIM*N2, @@ -125,10 +125,10 @@ namespace INTERP_KERNEL case INTERP_KERNEL::NORM_TETRA4 : case INTERP_KERNEL::NORM_TETRA10 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); + ConnType N4 = OTT::coo2C(connec[3]); return INTERP_KERNEL::calculateVolumeForTetra(coords+SPACEDIM*N1, coords+SPACEDIM*N2, @@ -140,11 +140,11 @@ namespace INTERP_KERNEL case INTERP_KERNEL::NORM_PYRA5 : case INTERP_KERNEL::NORM_PYRA13 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); + ConnType N4 = OTT::coo2C(connec[3]); + ConnType N5 = OTT::coo2C(connec[4]); return INTERP_KERNEL::calculateVolumeForPyra(coords+SPACEDIM*N1, coords+SPACEDIM*N2, @@ -158,12 +158,12 @@ namespace INTERP_KERNEL case INTERP_KERNEL::NORM_PENTA15 : case INTERP_KERNEL::NORM_PENTA18 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); - int N6 = OTT::coo2C(connec[5]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); + ConnType N4 = OTT::coo2C(connec[3]); + ConnType N5 = OTT::coo2C(connec[4]); + ConnType N6 = OTT::coo2C(connec[5]); return INTERP_KERNEL::calculateVolumeForPenta(coords+SPACEDIM*N1, coords+SPACEDIM*N2, @@ -178,14 +178,14 @@ namespace INTERP_KERNEL case INTERP_KERNEL::NORM_HEXA20 : case INTERP_KERNEL::NORM_HEXA27 : { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); - int N6 = OTT::coo2C(connec[5]); - int N7 = OTT::coo2C(connec[6]); - int N8 = OTT::coo2C(connec[7]); + ConnType N1 = OTT::coo2C(connec[0]); + ConnType N2 = OTT::coo2C(connec[1]); + ConnType N3 = OTT::coo2C(connec[2]); + ConnType N4 = OTT::coo2C(connec[3]); + ConnType N5 = OTT::coo2C(connec[4]); + ConnType N6 = OTT::coo2C(connec[5]); + ConnType N7 = OTT::coo2C(connec[6]); + ConnType N8 = OTT::coo2C(connec[7]); return INTERP_KERNEL::calculateVolumeForHexa(coords+SPACEDIM*N1, coords+SPACEDIM*N2, @@ -199,7 +199,7 @@ namespace INTERP_KERNEL break; case INTERP_KERNEL::NORM_HEXGP12: { - const int connecHexa12[43]={ + const ConnType connecHexa12[43]={ OTT::coo2C(connec[0]),OTT::coo2C(connec[1]),OTT::coo2C(connec[2]),OTT::coo2C(connec[3]),OTT::coo2C(connec[4]),OTT::coo2C(connec[5]),-1, OTT::coo2C(connec[6]),OTT::coo2C(connec[11]),OTT::coo2C(connec[10]),OTT::coo2C(connec[9]),OTT::coo2C(connec[8]),OTT::coo2C(connec[7]),-1, OTT::coo2C(connec[0]),OTT::coo2C(connec[6]),OTT::coo2C(connec[7]),OTT::coo2C(connec[1]),-1, @@ -376,7 +376,7 @@ namespace INTERP_KERNEL } case NORM_HEXA8: { - const int conn[29]={ + const ConnType conn[29]={ OTT::coo2C(connec[0]),OTT::coo2C(connec[1]),OTT::coo2C(connec[2]),OTT::coo2C(connec[3]),-1, OTT::coo2C(connec[4]),OTT::coo2C(connec[7]),OTT::coo2C(connec[6]),OTT::coo2C(connec[5]),-1, OTT::coo2C(connec[0]),OTT::coo2C(connec[3]),OTT::coo2C(connec[7]),OTT::coo2C(connec[4]),-1, @@ -389,7 +389,7 @@ namespace INTERP_KERNEL } case NORM_PENTA6: { - const int conn[22]={ + const ConnType conn[22]={ OTT::coo2C(connec[0]),OTT::coo2C(connec[1]),OTT::coo2C(connec[2]),-1, OTT::coo2C(connec[3]),OTT::coo2C(connec[5]),OTT::coo2C(connec[4]),-1, OTT::coo2C(connec[0]),OTT::coo2C(connec[2]),OTT::coo2C(connec[5]),OTT::coo2C(connec[3]),-1, @@ -401,7 +401,7 @@ namespace INTERP_KERNEL } case INTERP_KERNEL::NORM_HEXGP12: { - const int connecHexa12[43]={ + const ConnType connecHexa12[43]={ OTT::coo2C(connec[0]),OTT::coo2C(connec[1]),OTT::coo2C(connec[2]),OTT::coo2C(connec[3]),OTT::coo2C(connec[4]),OTT::coo2C(connec[5]),-1, OTT::coo2C(connec[6]),OTT::coo2C(connec[11]),OTT::coo2C(connec[10]),OTT::coo2C(connec[9]),OTT::coo2C(connec[8]),OTT::coo2C(connec[7]),-1, OTT::coo2C(connec[0]),OTT::coo2C(connec[6]),OTT::coo2C(connec[7]),OTT::coo2C(connec[1]),-1,