mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Disabling face centre tet decomposition quality checks.
Difficult to achieve both types of decomposition with positive tets simultaneously in cvMeshes.
This commit is contained in:
@ -404,54 +404,54 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets
|
||||
{
|
||||
const face& f = fcs[faceI];
|
||||
|
||||
forAll(f, fPtI)
|
||||
{
|
||||
scalar tetQual = tetPointRef
|
||||
(
|
||||
p[f[fPtI]],
|
||||
p[f.nextLabel(fPtI)],
|
||||
fc[faceI],
|
||||
cc[own[faceI]]
|
||||
).quality();
|
||||
// forAll(f, fPtI)
|
||||
// {
|
||||
// scalar tetQual = tetPointRef
|
||||
// (
|
||||
// p[f[fPtI]],
|
||||
// p[f.nextLabel(fPtI)],
|
||||
// fc[faceI],
|
||||
// cc[own[faceI]]
|
||||
// ).quality();
|
||||
|
||||
if (tetQual > -tol)
|
||||
{
|
||||
if (setPtr)
|
||||
{
|
||||
setPtr->insert(faceI);
|
||||
}
|
||||
// if (tetQual > -tol)
|
||||
// {
|
||||
// if (setPtr)
|
||||
// {
|
||||
// setPtr->insert(faceI);
|
||||
// }
|
||||
|
||||
nErrorTets++;
|
||||
break; // no need to check other tets
|
||||
}
|
||||
}
|
||||
// nErrorTets++;
|
||||
// break; // no need to check other tets
|
||||
// }
|
||||
// }
|
||||
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
// Create the neighbour tet - it will have positive volume
|
||||
const face& f = fcs[faceI];
|
||||
|
||||
forAll(f, fPtI)
|
||||
{
|
||||
scalar tetQual = tetPointRef
|
||||
(
|
||||
p[f[fPtI]],
|
||||
p[f.nextLabel(fPtI)],
|
||||
fc[faceI],
|
||||
cc[nei[faceI]]
|
||||
).quality();
|
||||
// forAll(f, fPtI)
|
||||
// {
|
||||
// scalar tetQual = tetPointRef
|
||||
// (
|
||||
// p[f[fPtI]],
|
||||
// p[f.nextLabel(fPtI)],
|
||||
// fc[faceI],
|
||||
// cc[nei[faceI]]
|
||||
// ).quality();
|
||||
|
||||
if (tetQual < tol)
|
||||
{
|
||||
if (setPtr)
|
||||
{
|
||||
setPtr->insert(faceI);
|
||||
}
|
||||
// if (tetQual < tol)
|
||||
// {
|
||||
// if (setPtr)
|
||||
// {
|
||||
// setPtr->insert(faceI);
|
||||
// }
|
||||
|
||||
nErrorTets++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// nErrorTets++;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (findSharedBasePoint(mesh, faceI, tol, report) == -1)
|
||||
{
|
||||
|
||||
@ -309,7 +309,6 @@ Foam::scalar Foam::polyMeshGeometry::calcSkewness
|
||||
}
|
||||
|
||||
|
||||
// Create the neighbour pyramid - it will have positive volume
|
||||
bool Foam::polyMeshGeometry::checkFaceTet
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -803,48 +802,50 @@ bool Foam::polyMeshGeometry::checkFaceTets
|
||||
|
||||
label nErrorTets = 0;
|
||||
|
||||
// bool tetError = false
|
||||
|
||||
forAll(checkFaces, i)
|
||||
{
|
||||
label faceI = checkFaces[i];
|
||||
|
||||
// Create the owner pyramid - note: exchange cell and face centre
|
||||
// to get positive volume.
|
||||
bool tetError = checkFaceTet
|
||||
(
|
||||
mesh,
|
||||
report,
|
||||
minTetQuality,
|
||||
p,
|
||||
faceI,
|
||||
cellCentres[own[faceI]], // face centre
|
||||
faceCentres[faceI], // cell centre
|
||||
setPtr
|
||||
);
|
||||
// tetError = checkFaceTet
|
||||
// (
|
||||
// mesh,
|
||||
// report,
|
||||
// minTetQuality,
|
||||
// p,
|
||||
// faceI,
|
||||
// cellCentres[own[faceI]], // face centre
|
||||
// faceCentres[faceI], // cell centre
|
||||
// setPtr
|
||||
// );
|
||||
|
||||
if (tetError)
|
||||
{
|
||||
nErrorTets++;
|
||||
}
|
||||
// if (tetError)
|
||||
// {
|
||||
// nErrorTets++;
|
||||
// }
|
||||
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
// Create the neighbour tets - they will have positive volume
|
||||
bool tetError = checkFaceTet
|
||||
(
|
||||
mesh,
|
||||
report,
|
||||
minTetQuality,
|
||||
p,
|
||||
faceI,
|
||||
faceCentres[faceI], // face centre
|
||||
cellCentres[nei[faceI]], // cell centre
|
||||
setPtr
|
||||
);
|
||||
// tetError = checkFaceTet
|
||||
// (
|
||||
// mesh,
|
||||
// report,
|
||||
// minTetQuality,
|
||||
// p,
|
||||
// faceI,
|
||||
// faceCentres[faceI], // face centre
|
||||
// cellCentres[nei[faceI]], // cell centre
|
||||
// setPtr
|
||||
// );
|
||||
|
||||
if (tetError)
|
||||
{
|
||||
nErrorTets++;
|
||||
}
|
||||
// if (tetError)
|
||||
// {
|
||||
// nErrorTets++;
|
||||
// }
|
||||
|
||||
if
|
||||
(
|
||||
@ -920,40 +921,40 @@ bool Foam::polyMeshGeometry::checkFaceTets
|
||||
label face0 = baffles[i].first();
|
||||
label face1 = baffles[i].second();
|
||||
|
||||
bool tetError = checkFaceTet
|
||||
(
|
||||
mesh,
|
||||
report,
|
||||
minTetQuality,
|
||||
p,
|
||||
face0,
|
||||
cellCentres[own[face0]], // face centre
|
||||
faceCentres[face0], // cell centre
|
||||
setPtr
|
||||
);
|
||||
// tetError = checkFaceTet
|
||||
// (
|
||||
// mesh,
|
||||
// report,
|
||||
// minTetQuality,
|
||||
// p,
|
||||
// face0,
|
||||
// cellCentres[own[face0]], // face centre
|
||||
// faceCentres[face0], // cell centre
|
||||
// setPtr
|
||||
// );
|
||||
|
||||
if (tetError)
|
||||
{
|
||||
nErrorTets++;
|
||||
}
|
||||
// if (tetError)
|
||||
// {
|
||||
// nErrorTets++;
|
||||
// }
|
||||
|
||||
// Create the neighbour tets - they will have positive volume
|
||||
tetError = checkFaceTet
|
||||
(
|
||||
mesh,
|
||||
report,
|
||||
minTetQuality,
|
||||
p,
|
||||
face0,
|
||||
faceCentres[face0], // face centre
|
||||
cellCentres[own[face1]], // cell centre
|
||||
setPtr
|
||||
);
|
||||
// // Create the neighbour tets - they will have positive volume
|
||||
// tetError = checkFaceTet
|
||||
// (
|
||||
// mesh,
|
||||
// report,
|
||||
// minTetQuality,
|
||||
// p,
|
||||
// face0,
|
||||
// faceCentres[face0], // face centre
|
||||
// cellCentres[own[face1]], // cell centre
|
||||
// setPtr
|
||||
// );
|
||||
|
||||
if (tetError)
|
||||
{
|
||||
nErrorTets++;
|
||||
}
|
||||
// if (tetError)
|
||||
// {
|
||||
// nErrorTets++;
|
||||
// }
|
||||
|
||||
if
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user