ENH: distinguish between face areaNormal/unitNormal in the code

This commit is contained in:
Mark Olesen
2018-08-10 15:43:06 +02:00
parent b81a2f2fa6
commit c1964d7807
52 changed files with 200 additions and 256 deletions

View File

@ -425,9 +425,7 @@ void Foam::faMesh::calcFaceAreaNormals() const
vectorField& nInternal = faceAreaNormals.ref();
forAll(localFaces, faceI)
{
nInternal[faceI] =
localFaces[faceI].normal(localPoints)/
localFaces[faceI].mag(localPoints);
nInternal[faceI] = localFaces[faceI].unitNormal(localPoints);
}
forAll(boundary(), patchI)

View File

@ -306,8 +306,8 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchFaceNormals() const
{
tmp<vectorField> tfN(new vectorField());
vectorField& fN = tfN.ref();
auto tfN = tmp<vectorField>::New();
auto& fN = tfN.ref();
if (ngbPolyPatchIndex() == -1)
{
@ -325,8 +325,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchFaceNormals() const
forAll(fN, faceI)
{
fN[faceI] = faces[ngbFaces[faceI]].normal(points)
/faces[ngbFaces[faceI]].mag(points);
fN[faceI] = faces[ngbFaces[faceI]].unitNormal(points);
}
return tfN;