mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'olesenm'
This commit is contained in:
@ -47,19 +47,16 @@ bool validTri
|
||||
|
||||
const labelledTri& f = surf[faceI];
|
||||
|
||||
if
|
||||
(
|
||||
(f[0] < 0) || (f[0] >= surf.points().size())
|
||||
|| (f[1] < 0) || (f[1] >= surf.points().size())
|
||||
|| (f[2] < 0) || (f[2] >= surf.points().size())
|
||||
)
|
||||
forAll(f, fp)
|
||||
{
|
||||
WarningIn("validTri(const triSurface&, const label)")
|
||||
<< "triangle " << faceI << " vertices " << f
|
||||
<< " uses point indices outside point range 0.."
|
||||
<< surf.points().size()-1 << endl;
|
||||
|
||||
return false;
|
||||
if (f[fp] < 0 || f[fp] >= surf.points().size())
|
||||
{
|
||||
WarningIn("validTri(const triSurface&, const label)")
|
||||
<< "triangle " << faceI << " vertices " << f
|
||||
<< " uses point indices outside point range 0.."
|
||||
<< surf.points().size()-1 << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2]))
|
||||
@ -212,11 +209,10 @@ int main(int argc, char *argv[])
|
||||
// write bounding box corners
|
||||
if (args.optionFound("blockMesh"))
|
||||
{
|
||||
pointField cornerPts = boundBox(surf.points()).points();
|
||||
pointField cornerPts(boundBox(surf.points()).points());
|
||||
|
||||
Info<<"// blockMeshDict info" << nl;
|
||||
|
||||
Info<<"vertices\n(" << nl;
|
||||
Info<<"// blockMeshDict info" << nl
|
||||
<<"vertices\n(" << nl;
|
||||
forAll(cornerPts, ptI)
|
||||
{
|
||||
Info << " " << cornerPts[ptI] << nl;
|
||||
|
||||
@ -100,8 +100,8 @@ static void splitTri
|
||||
label oldNTris = tris.size();
|
||||
|
||||
label fp = findIndex(f, e[0]);
|
||||
label fp1 = (fp+1)%3;
|
||||
label fp2 = (fp1+1)%3;
|
||||
label fp1 = f.fcIndex(fp);
|
||||
label fp2 = f.fcIndex(fp1);
|
||||
|
||||
if (f[fp1] == e[1])
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@ static void markPointNbrs
|
||||
boolList& okToCollapse
|
||||
)
|
||||
{
|
||||
const labelledTri& f = surf.localFaces()[faceI];
|
||||
const triSurface::FaceType& f = surf.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
@ -108,12 +108,12 @@ label collapseEdge(triSurface& surf, const scalar minLen)
|
||||
if (okToCollapse[faceI])
|
||||
{
|
||||
// Check edge lengths.
|
||||
const labelledTri& f = localFaces[faceI];
|
||||
const triSurface::FaceType& f = localFaces[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label v = f[fp];
|
||||
label v1 = f[(fp+1) % 3];
|
||||
label v1 = f[f.fcIndex(fp)];
|
||||
|
||||
if (mag(localPoints[v1] - localPoints[v]) < minLen)
|
||||
{
|
||||
|
||||
@ -128,9 +128,7 @@ void dumpFaces
|
||||
|
||||
forAllConstIter(Map<label>, connectedFaces, iter)
|
||||
{
|
||||
const labelledTri& f = surf.localFaces()[iter.key()];
|
||||
|
||||
point ctr(f.centre(surf.localPoints()));
|
||||
point ctr = surf.localFaces()[iter.key()].centre(surf.localPoints());
|
||||
|
||||
os << "v " << ctr.x() << ' ' << ctr.y() << ' ' << ctr.z() << endl;
|
||||
}
|
||||
@ -453,7 +451,7 @@ label sharedFace
|
||||
|
||||
const edge& e = surf.edges()[sharedEdgeI];
|
||||
|
||||
const labelledTri& f = surf.localFaces()[firstFaceI];
|
||||
const triSurface::FaceType& f = surf.localFaces()[firstFaceI];
|
||||
|
||||
label startIndex = findIndex(f, e.start());
|
||||
|
||||
@ -597,13 +595,13 @@ void renumberFaces
|
||||
const triSurface& surf,
|
||||
const labelList& pointMap,
|
||||
const Map<label>& faceToEdge,
|
||||
List<labelledTri>& newTris
|
||||
List<triSurface::FaceType>& newTris
|
||||
)
|
||||
{
|
||||
forAllConstIter(Map<label>, faceToEdge, iter)
|
||||
{
|
||||
const label faceI = iter.key();
|
||||
const labelledTri& f = surf.localFaces()[faceI];
|
||||
const triSurface::FaceType& f = surf.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
@ -911,7 +909,6 @@ int main(int argc, char *argv[])
|
||||
forAll(surf, faceI)
|
||||
{
|
||||
newTris[faceI] = surf.localFaces()[faceI];
|
||||
|
||||
newTris[faceI].region() = surf[faceI].region();
|
||||
}
|
||||
|
||||
@ -924,7 +921,7 @@ int main(int argc, char *argv[])
|
||||
// Check if faces use unmoved points.
|
||||
forAll(newTris, faceI)
|
||||
{
|
||||
const labelledTri& f = newTris[faceI];
|
||||
const triSurface::FaceType& f = newTris[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
|
||||
@ -196,8 +196,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(surf1, faceI)
|
||||
{
|
||||
const labelledTri& f = surf1[faceI];
|
||||
const point centre = f.centre(surf1.points());
|
||||
const point centre = surf1[faceI].centre(surf1.points());
|
||||
|
||||
if
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user