Commit 438f38bb authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

ENH: surfaceInterpolation: extended patch override of geometry calculation.

parent 7c1c9fee
......@@ -167,6 +167,18 @@ void Foam::fvPatch::makeWeights(scalarField& w) const
}
void Foam::fvPatch::makeDeltaCoeffs(scalarField& w) const
{}
void Foam::fvPatch::makeNonOrthoDeltaCoeffs(scalarField& w) const
{}
void Foam::fvPatch::makeNonOrthoCorrVectors(vectorField& w) const
{}
void Foam::fvPatch::initMovePoints()
{}
......
......@@ -81,6 +81,15 @@ protected:
//- Make patch weighting factors
virtual void makeWeights(scalarField&) const;
//- Correct patch deltaCoeffs
virtual void makeDeltaCoeffs(scalarField&) const;
//- Correct patch non-ortho deltaCoeffs
virtual void makeNonOrthoDeltaCoeffs(scalarField&) const;
//- Correct patch non-ortho correction vectors
virtual void makeNonOrthoCorrVectors(vectorField&) const;
//- Initialise the patches for moving points
virtual void initMovePoints();
......
......@@ -246,7 +246,11 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const
forAll(deltaCoeffsBf, patchi)
{
deltaCoeffsBf[patchi] = 1.0/mag(mesh_.boundary()[patchi].delta());
const fvPatch& p = mesh_.boundary()[patchi];
deltaCoeffsBf[patchi] = 1.0/mag(p.delta());
// Optionally correct
p.makeDeltaCoeffs(deltaCoeffsBf[patchi]);
}
}
......@@ -329,6 +333,9 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const
patchDeltaCoeffs[patchFacei] =
1.0/max(unitArea & delta, 0.05*mag(delta));
}
// Optionally correct
p.makeNonOrthoDeltaCoeffs(patchDeltaCoeffs);
}
}
......@@ -385,6 +392,8 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
{
fvsPatchVectorField& patchCorrVecs = corrVecsBf[patchi];
const fvPatch& p = patchCorrVecs.patch();
if (!patchCorrVecs.coupled())
{
patchCorrVecs = Zero;
......@@ -394,8 +403,6 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
const fvsPatchScalarField& patchNonOrthDeltaCoeffs =
NonOrthDeltaCoeffs.boundaryField()[patchi];
const fvPatch& p = patchCorrVecs.patch();
const vectorField patchDeltas(mesh_.boundary()[patchi].delta());
forAll(p, patchFacei)
......@@ -410,6 +417,9 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei];
}
}
// Optionally correct
p.makeNonOrthoCorrVectors(patchCorrVecs);
}
if (debug)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment