Formatting

This commit is contained in:
Hrvoje Jasak 2011-03-13 23:20:57 +00:00
parent 0dd14c8b93
commit e2923294c8

View file

@ -169,7 +169,7 @@ void Foam::surfaceInterpolation::makeWeights() const
// ... and reference to the internal field of the weighting factors // ... and reference to the internal field of the weighting factors
scalarField& w = weightingFactors.internalField(); scalarField& w = weightingFactors.internalField();
forAll(owner, facei) forAll (owner, facei)
{ {
// Note: mag in the dot-product. // Note: mag in the dot-product.
// For all valid meshes, the non-orthogonality will be less that // For all valid meshes, the non-orthogonality will be less that
@ -181,7 +181,7 @@ void Foam::surfaceInterpolation::makeWeights() const
w[facei] = SfdNei/(SfdOwn + SfdNei); w[facei] = SfdNei/(SfdOwn + SfdNei);
} }
forAll(mesh_.boundary(), patchi) forAll (mesh_.boundary(), patchi)
{ {
mesh_.boundary()[patchi].makeWeights mesh_.boundary()[patchi].makeWeights
( (
@ -233,7 +233,7 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const
const surfaceVectorField& Sf = mesh_.Sf(); const surfaceVectorField& Sf = mesh_.Sf();
const surfaceScalarField& magSf = mesh_.magSf(); const surfaceScalarField& magSf = mesh_.magSf();
forAll(owner, facei) forAll (owner, facei)
{ {
vector delta = C[neighbour[facei]] - C[owner[facei]]; vector delta = C[neighbour[facei]] - C[owner[facei]];
vector unitArea = Sf[facei]/magSf[facei]; vector unitArea = Sf[facei]/magSf[facei];
@ -251,7 +251,7 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const
DeltaCoeffs[facei] = 1.0/max(unitArea & delta, 0.05*mag(delta)); DeltaCoeffs[facei] = 1.0/max(unitArea & delta, 0.05*mag(delta));
} }
forAll(DeltaCoeffs.boundaryField(), patchi) forAll (DeltaCoeffs.boundaryField(), patchi)
{ {
mesh_.boundary()[patchi].makeDeltaCoeffs mesh_.boundary()[patchi].makeDeltaCoeffs
( (
@ -291,19 +291,22 @@ void Foam::surfaceInterpolation::makeCorrectionVectors() const
const surfaceScalarField& magSf = mesh_.magSf(); const surfaceScalarField& magSf = mesh_.magSf();
const surfaceScalarField& DeltaCoeffs = deltaCoeffs(); const surfaceScalarField& DeltaCoeffs = deltaCoeffs();
forAll(owner, facei) forAll (owner, facei)
{ {
vector unitArea = Sf[facei]/magSf[facei]; vector unitArea = Sf[facei]/magSf[facei];
vector delta = C[neighbour[facei]] - C[owner[facei]]; vector delta = C[neighbour[facei]] - C[owner[facei]];
corrVecs[facei] = unitArea - delta*DeltaCoeffs[facei]; // If non-orthogonality is over 90 deg, kill correction vector
// HJ, 27/Feb/2011
corrVecs[facei] = pos(unitArea & delta)*
(unitArea - delta*DeltaCoeffs[facei]);
} }
// Boundary correction vectors set to zero for boundary patches // Boundary correction vectors set to zero for boundary patches
// and calculated consistently with internal corrections for // and calculated consistently with internal corrections for
// coupled patches // coupled patches
forAll(corrVecs.boundaryField(), patchI) forAll (corrVecs.boundaryField(), patchI)
{ {
mesh_.boundary()[patchI].makeCorrVecs mesh_.boundary()[patchI].makeCorrVecs
( (
@ -334,8 +337,6 @@ void Foam::surfaceInterpolation::makeCorrectionVectors() const
<< endl; << endl;
} }
//MaxNonOrthog = 0.0;
if (MaxNonOrthog < 5) if (MaxNonOrthog < 5)
{ {
orthogonal_ = true; orthogonal_ = true;