}
break;
}
+ case NORM_TRI6:
+ {
+ switch(spaceDim)
+ {
+ case 2:
+ return new DiameterCalulatorTRI6S2;
+ case 3:
+ return new DiameterCalulatorTRI6S3;
+ default:
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For TRI6 only space dimension 2 and 3 implemented !");
+ }
+ break;
+ }
+ case NORM_TRI7:
+ {
+ switch(spaceDim)
+ {
+ case 2:
+ return new DiameterCalulatorTRI7S2;
+ case 3:
+ return new DiameterCalulatorTRI7S3;
+ default:
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For TRI7 only space dimension 2 and 3 implemented !");
+ }
+ break;
+ }
+ case NORM_QUAD8:
+ {
+ switch(spaceDim)
+ {
+ case 2:
+ return new DiameterCalulatorQUAD8S2;
+ case 3:
+ return new DiameterCalulatorQUAD8S3;
+ default:
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For QUAD8 only space dimension 2 and 3 implemented !");
+ }
+ break;
+ }
+ case NORM_QUAD9:
+ {
+ switch(spaceDim)
+ {
+ case 2:
+ return new DiameterCalulatorQUAD9S2;
+ case 3:
+ return new DiameterCalulatorQUAD9S3;
+ default:
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For QUAD9 only space dimension 2 and 3 implemented !");
+ }
+ break;
+ }
case NORM_TETRA4:
{
if(spaceDim==3)
else
throw Exception("CellModel::buildInstanceOfDiameterCalulator : For TETRA4 space dimension 3 expected !");
}
+ case NORM_TETRA10:
+ {
+ if(spaceDim==3)
+ return new DiameterCalulatorTETRA10;
+ else
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For TETRA10 space dimension 3 expected !");
+ }
case NORM_HEXA8:
{
if(spaceDim==3)
else
throw Exception("CellModel::buildInstanceOfDiameterCalulator : For HEXA8 space dimension 3 expected !");
}
+ case NORM_HEXA20:
+ {
+ if(spaceDim==3)
+ return new DiameterCalulatorHEXA20;
+ else
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For HEXA20 space dimension 3 expected !");
+ }
+ case NORM_HEXA27:
+ {
+ if(spaceDim==3)
+ return new DiameterCalulatorHEXA27;
+ else
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For HEXA27 space dimension 3 expected !");
+ }
case NORM_PENTA6:
{
if(spaceDim==3)
else
throw Exception("CellModel::buildInstanceOfDiameterCalulator : For PENTA6 space dimension 3 expected !");
}
+ case NORM_PENTA15:
+ {
+ if(spaceDim==3)
+ return new DiameterCalulatorPENTA15;
+ else
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For PENTA15 space dimension 3 expected !");
+ }
case NORM_PYRA5:
{
if(spaceDim==3)
else
throw Exception("CellModel::buildInstanceOfDiameterCalulator : For PYRA5 space dimension 3 expected !");
}
+ case NORM_PYRA13:
+ {
+ if(spaceDim==3)
+ return new DiameterCalulatorPYRA13;
+ else
+ throw Exception("CellModel::buildInstanceOfDiameterCalulator : For PYRA13 space dimension 3 expected !");
+ }
default:
throw Exception("CellModel::buildInstanceOfDiameterCalulator : implemented only for TRI3, QUAD4, TETRA4, HEXA8, PENTA6, PYRA5 !");
}
NormalizedCellType DiameterCalulatorTRI3S3::TYPE=NORM_TRI3;
+NormalizedCellType DiameterCalulatorTRI6S2::TYPE=NORM_TRI6;
+
+NormalizedCellType DiameterCalulatorTRI6S3::TYPE=NORM_TRI6;
+
+NormalizedCellType DiameterCalulatorTRI7S2::TYPE=NORM_TRI7;
+
+NormalizedCellType DiameterCalulatorTRI7S3::TYPE=NORM_TRI7;
+
NormalizedCellType DiameterCalulatorQUAD4S2::TYPE=NORM_QUAD4;
NormalizedCellType DiameterCalulatorQUAD4S3::TYPE=NORM_QUAD4;
+NormalizedCellType DiameterCalulatorQUAD8S2::TYPE=NORM_QUAD8;
+
+NormalizedCellType DiameterCalulatorQUAD8S3::TYPE=NORM_QUAD8;
+
+NormalizedCellType DiameterCalulatorQUAD9S2::TYPE=NORM_QUAD9;
+
+NormalizedCellType DiameterCalulatorQUAD9S3::TYPE=NORM_QUAD9;
+
NormalizedCellType DiameterCalulatorTETRA4::TYPE=NORM_TETRA4;
+NormalizedCellType DiameterCalulatorTETRA10::TYPE=NORM_TETRA10;
+
NormalizedCellType DiameterCalulatorHEXA8::TYPE=NORM_HEXA8;
+NormalizedCellType DiameterCalulatorHEXA20::TYPE=NORM_HEXA20;
+
+NormalizedCellType DiameterCalulatorHEXA27::TYPE=NORM_HEXA27;
+
NormalizedCellType DiameterCalulatorPENTA6::TYPE=NORM_PENTA6;
+NormalizedCellType DiameterCalulatorPENTA15::TYPE=NORM_PENTA15;
+
NormalizedCellType DiameterCalulatorPYRA5::TYPE=NORM_PYRA5;
+NormalizedCellType DiameterCalulatorPYRA13::TYPE=NORM_PYRA13;
+
inline double SqNormV2(const double tab[2])
{
return tab[0]*tab[0]+tab[1]*tab[1];
{
int offset(indPtr[*it]);
if(connPtr[offset]==cti)
- resPtr[*it]=evtor.computeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[(*it)+1],coordsPtr);
+ resPtr[*it]=evtor.ComputeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[(*it)+1],coordsPtr);
else
{
std::ostringstream oss; oss << "DiameterCalculator::computeForListOfCellIdsUMeshFrmt : invalid nodal connectivity format at cell # " << *it << " !";
{
int offset(indPtr[it]);
if(connPtr[offset]==cti)
- resPtr[it]=evtor.computeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[it+1],coordsPtr);
+ resPtr[it]=evtor.ComputeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[it+1],coordsPtr);
else
{
std::ostringstream oss; oss << "DiameterCalculator::computeForListOfCellIdsUMeshFrmt : invalid nodal connectivity format at cell # " << it << " !";
unsigned nbNodes(cm.getNumberOfNodes());
const int *ptr(connPtr);
for(int i=0;i<nbOfCells;i++,ptr+=nbNodes,resPtr++)
- *resPtr=evtor.computeForOneCellInternal(ptr,ptr+nbNodes,coordsPtr);
+ *resPtr=evtor.ComputeForOneCellInternal(ptr,ptr+nbNodes,coordsPtr);
}
-double DiameterCalulatorTRI3S2::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorTRI3S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==3)
{
return std::sqrt(res);
}
else
- throw Exception("DiameterCalulatorTRI3S2::computeForOneCellInternal : input connectivity must be of size 3 !");
+ throw Exception("DiameterCalulatorTRI3S2::ComputeForOneCellInternal : input connectivity must be of size 3 !");
}
void DiameterCalulatorTRI3S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI3S2>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorTRI3S3::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==3)
{
return std::sqrt(res);
}
else
- throw Exception("DiameterCalulatorTRI3S2::computeForOneCellInternal : input connectivity must be of size 3 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI3S3>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorQUAD4S2::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==6)
+ return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S2>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorTRI6S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI6S2>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==6)
+ return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S3>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorTRI6S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI6S3>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==7)
+ return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S2>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorTRI7S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI7S2>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==7)
+ return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S3>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorTRI7S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI7S3>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==4)
{
return std::sqrt(std::max(SqNormV2(l0),SqNormV2(l1)));
}
else
- throw Exception("DiameterCalulatorQUAD4S2::computeForOneCellInternal : input connectivity must be of size 4 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD4S2>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorQUAD4S3::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==4)
{
return std::sqrt(std::max(SqNormV3(l0),SqNormV3(l1)));
}
else
- throw Exception("DiameterCalulatorQUAD4S3::computeForOneCellInternal : input connectivity must be of size 4 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD4S3>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorTETRA4::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==8)
+ return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S2>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorQUAD8S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD8S2>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==8)
+ return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S3>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorQUAD8S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD8S3>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==9)
+ return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S2>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorQUAD9S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD9S2>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==9)
+ return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S3>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorQUAD9S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD9S3>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==4)
{
return std::sqrt(*std::max_element(tmp,tmp+6));
}
else
- throw Exception("DiameterCalulatorTETRA4::computeForOneCellInternal : input connectivity must be of size 4 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorTETRA4>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorHEXA8::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==10)
+ return DiameterCalulatorTETRA4::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTETRA10>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTETRA10>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorTETRA10::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorTETRA10>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==8)
{
return std::sqrt(*std::max_element(tmp,tmp+4));
}
else
- throw Exception("DiameterCalulatorHEXA8::computeForOneCellInternal : input connectivity must be of size 8 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA8>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorPENTA6::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==20)
+ return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorHEXA20>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorHEXA20>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorHEXA20::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA20>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==27)
+ return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorHEXA27>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorHEXA27>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorHEXA27::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA27>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==6)
{
return std::sqrt(*std::max_element(tmp,tmp+6));
}
else
- throw Exception("DiameterCalulatorPENTA6::computeForOneCellInternal : input connectivity must be of size 6 !");
+ 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
ComputeFor1SGTUMeshFrmt<DiameterCalulatorPENTA6>(nbOfCells,connPtr,coordsPtr,resPtr);
}
-double DiameterCalulatorPYRA5::computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const
+//=================================================================
+
+double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==15)
+ return DiameterCalulatorPENTA6::ComputeForOneCellInternal(bg,bg+6,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPENTA15>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPENTA15>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorPENTA15::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorPENTA15>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
+
+//=================================================================
+
+double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
{
if(std::distance(bg,endd)==5)
{
return std::sqrt(*std::max_element(tmp,tmp+6));
}
else
- throw Exception("DiameterCalulatorPYRA5::computeForOneCellInternal : input connectivity must be of size 5 !");
+ 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
{
ComputeFor1SGTUMeshFrmt<DiameterCalulatorPYRA5>(nbOfCells,connPtr,coordsPtr,resPtr);
}
+
+//=================================================================
+
+double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+{
+ if(std::distance(bg,endd)==13)
+ return DiameterCalulatorPYRA5::ComputeForOneCellInternal(bg,bg+5,coordsPtr);
+ else
+ 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
+{
+ ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPYRA13>(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
+{
+ ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPYRA13>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
+}
+
+void DiameterCalulatorPYRA13::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+{
+ ComputeFor1SGTUMeshFrmt<DiameterCalulatorPYRA13>(nbOfCells,connPtr,coordsPtr,resPtr);
+}
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorTRI6S2 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorTRI6S3 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorTRI7S2 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorTRI7S3 : 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorQUAD8S2 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorQUAD8S3 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorQUAD9S2 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorQUAD9S3 : 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorTETRA10 : 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorHEXA20 : 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorHEXA27 : 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorPENTA15 : 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;
{
public:
NormalizedCellType getType() const { return TYPE; }
- double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return computeForOneCellInternal(bg,endd,coordsPtr); }
- double computeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr) const;
+ 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;
+ public:
+ static NormalizedCellType TYPE;
+ };
+
+ class DiameterCalulatorPYRA13 : 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;
for c in [[0,1,2],[0,2,1],[2,1,0]]:
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],4.1,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],4.1,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],4.1,12)
# TRI3 - spacedim = 3
coo=DataArrayDouble([(1.3198537928820775,1.0991902391274959,-0.028645697595823361),(5.2486835106806335,2.2234012799688281,0.30368935050077939),(2.2973688139447361,3.1572023778066649,0.10937756365410012)])
m=MEDCoupling1SGTUMesh("mesh",NORM_TRI3) ; m.setCoords(coo)
for c in [[0,1,2],[0,2,1],[2,1,0]]:
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],4.1,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],4.1,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],4.1,12)
# QUAD4 - spacedim = 2
coo=DataArrayDouble([(0,2),(2,0),(6,4),(4,9)])
m=MEDCoupling1SGTUMesh("mesh",NORM_QUAD4) ; m.setCoords(coo)
c=[(elt+delta)%4 for elt in xrange(4)]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp3,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp3,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],exp3,12)
c.reverse()
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp3,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp3,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],exp3,12)
# QUAD4 - spacedim = 3
coo=DataArrayDouble([(0.26570992384234871,2.0405889913271817,-0.079134238105786903),(2.3739976619218064,0.15779148692781009,0.021842842914139737),(6.1207841448393197,4.3755532938679655,0.43666375769970678),(3.8363255342943359,9.2521096041694229,0.41551170895942313)])
m=MEDCoupling1SGTUMesh("mesh",NORM_QUAD4) ; m.setCoords(coo)
c=[(elt+delta)%4 for elt in xrange(4)]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp3,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp3,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],exp3,12)
c.reverse()
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp3,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp3,12)
+ m3=m.buildUnstructured() ; m3.convertLinearCellsToQuadratic(1)
+ self.assertAlmostEqual(m3.computeDiameterField().getArray()[0],exp3,12)
# PENTA6
# noise of coo=DataArrayDouble([(0,0,0),(1,0,0),(0,1,0),(0,0,2),(1,0,2),(0,1,2)]) + rotation([0.7,-1.2,0.6],[-4,-1,10],0.3)
coo=DataArrayDouble([(-0.28594726851554486,-0.23715005500928255,-0.10268080010083136),(0.6167364988633947,-0.008923258436324799,-0.08574087516687756),(-0.6132873463333834,0.6943403970881654,-0.2806118260037991),(-0.40705974936532896,-0.05868487929989308,1.7724055544436323),(0.5505955507861958,0.19145393798144705,1.8788156352163994),(-0.6092686217773406,0.812502961290914,1.685712743757831)])
c+=[elt+3 for elt in c]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp4,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp4,12)
c.reverse()
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp4,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp4,12)
# HEXA8
# noise of coo=DataArrayDouble([(0,0,0),(1,0,0),(1,1,0),(0,1,0),(0,0,2),(1,0,2),(1,1,2),(0,1,2)]) + rotation([0.7,-1.2,0.6],[-4,-1,10],0.3)
coo=DataArrayDouble([(-0.21266406388867243,-0.3049569460042527,-0.11012394815006032),(0.7641037943272584,-0.06990814759929553,-0.0909613877456491),(0.47406560768559974,0.8681310650341907,-0.2577311403703061),(-0.5136830410871793,0.644390554940524,-0.21319015989794698),(-0.4080167737381202,-0.12853761670628505,1.7869166291979348),(0.5650318811550441,0.20476257733110748,1.8140158890821603),(0.3230844436386215,1.1660778242678538,1.7175073141333406),(-0.6656588358432984,0.918357550969698,1.7566470691880265)])
c+=[elt+4 for elt in c]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp5,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp5,12)
c.reverse()
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp5,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp5,12)
# PYRA5 (1) 5th node is further
# noise of coo=DataArrayDouble([(0,0,0),(1,0,0),(1,1,0),(0,1,0),(0.5,0.5,2)]) + rotation([0.7,-1.2,0.6],[-4,-1,10],0.3)
coo=DataArrayDouble([(-0.31638393672228626,-0.3157865246451914,-0.12555467233075002),(0.7281379795666488,0.03836511217237115,-0.08431662762197323),(0.4757967840735147,0.8798897996143908,-0.2680890320119049),(-0.5386339871809047,0.5933159894201252,-0.2975311238319419),(0.012042592988768974,0.534282135495012,1.7859521682027926)])
c+=[4]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp6,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp6,12)
pass
# PYRA5 (2) 5th node is closer
# noise of coo=DataArrayDouble([(0,0,0),(1,0,0),(1,1,0),(0,1,0),(0.5,0.5,0.1)]) + rotation([0.7,-1.2,0.6],[-4,-1,10],0.3)
c+=[4]
m.setNodalConnectivity(DataArrayInt(c))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp7,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp7,12)
pass
# TETRA4
# noise of coo=DataArrayDouble([(0,0,0),(1,0,0),(0,1,0),(1,1,1)]) + rotation([0.7,-1.2,0.6],[-4,-1,10],0.3)
for i in xrange(4):
m.setNodalConnectivity(DataArrayInt([(elt+i)%4 for elt in c]))
self.assertAlmostEqual(m.computeDiameterField().getArray()[0],exp8,12)
+ m2=m.buildUnstructured() ; m2.convertLinearCellsToQuadratic(0)
+ self.assertAlmostEqual(m2.computeDiameterField().getArray()[0],exp8,12)
pass
pass
pass