From 140a0f45e2088c60828aa935da41cabb8e23ed66 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 30 Nov 2017 23:03:28 +0000 Subject: [PATCH] Immersed boundary updates in fvMesh and patches --- .../fvPatches/basic/coupled/coupledFvPatch.C | 3 +- .../fvPatches/basic/coupled/coupledFvPatch.H | 6 +-- .../constraint/cyclic/cyclicFvPatch.C | 21 +++++++-- .../constraint/cyclic/cyclicFvPatch.H | 17 +++++-- .../constraint/cyclicGgi/cyclicGgiFvPatch.C | 35 ++++++++++++-- .../constraint/cyclicGgi/cyclicGgiFvPatch.H | 16 +++++-- .../fvPatches/constraint/ggi/ggiFvPatch.C | 36 ++++++++++----- .../fvPatches/constraint/ggi/ggiFvPatch.H | 10 ++-- .../mixingPlane/mixingPlaneFvPatch.C | 29 ++++++++---- .../mixingPlane/mixingPlaneFvPatch.H | 10 ++-- .../constraint/overlapGgi/overlapGgiFvPatch.C | 25 +++++++--- .../constraint/overlapGgi/overlapGgiFvPatch.H | 13 +++--- .../constraint/processor/processorFvPatch.C | 9 ++-- .../constraint/processor/processorFvPatch.H | 4 +- .../regionCouple/regionCoupleFvPatch.C | 31 +++++++++---- .../regionCouple/regionCoupleFvPatch.H | 10 ++-- .../constraint/symmetry/symmetryFvPatch.C | 3 +- .../constraint/symmetry/symmetryFvPatch.H | 2 +- .../fvPatches/constraint/wedge/wedgeFvPatch.C | 3 +- .../fvPatches/constraint/wedge/wedgeFvPatch.H | 2 +- .../derived/cohesive/cohesiveFvPatch.C | 5 +- .../derived/cohesive/cohesiveFvPatch.H | 2 +- .../directMapped/directMappedFvPatch.C | 3 +- .../directMapped/directMappedFvPatch.H | 2 +- .../directMapped/directMappedWallFvPatch.C | 3 +- .../directMapped/directMappedWallFvPatch.H | 2 +- .../fvPatches/derived/wall/wallFvPatch.C | 3 +- .../fvPatches/derived/wall/wallFvPatch.H | 2 +- .../fvMesh/fvPatches/fvPatch/fvPatch.C | 10 ++-- .../fvMesh/fvPatches/fvPatch/fvPatch.H | 46 +++++++++++++++---- 30 files changed, 252 insertions(+), 111 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C index 5941b76a2..b03ce690c 100644 --- a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ #include "coupledFvPatch.H" +#include "fvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +48,7 @@ coupledFvPatch::~coupledFvPatch() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void coupledFvPatch::makeCorrVecs(vectorField& cv) const +void coupledFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { // Calculate correction vectors on coupled patches const scalarField& patchDeltaCoeffs = deltaCoeffs(); diff --git a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.H index bf96c2f24..77e0b4d05 100644 --- a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.H @@ -64,13 +64,13 @@ protected: // Protected Member Functions //- Make patch weighting factors - virtual void makeWeights(scalarField&) const = 0; + virtual void makeWeights(fvsPatchScalarField&) const = 0; //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const = 0; + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const = 0; //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C index 2ccc8f38f..90db4947c 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C @@ -24,8 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "cyclicFvPatch.H" -#include "addToRunTimeSelectionTable.H" #include "fvMesh.H" +#include "fvPatchFields.H" +#include "fvsPatchFields.H" +#include "slicedSurfaceFields.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,8 +43,18 @@ addToRunTimeSelectionTable(fvPatch, cyclicFvPatch, polyPatch); // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// Make mesh cell centres. Moved from fvMeshGeometry +void cyclicFvPatch::makeC(slicedSurfaceVectorField& C) const +{ + C.boundaryField()[index()].UList::operator= + ( + patchSlice(cyclicPolyPatch_.boundaryMesh().mesh().faceCentres()) + ); +} + + // Make patch weighting factors -void cyclicFvPatch::makeWeights(scalarField& w) const +void cyclicFvPatch::makeWeights(fvsPatchScalarField& w) const { const scalarField& magFa = magSf(); @@ -89,7 +102,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const { scalar avFa = (magFa[errorFace] + magFa[errorFace + sizeby2])/2.0; - FatalErrorIn("cyclicFvPatch::makeWeights(scalarField& w) const") + FatalErrorIn("cyclicFvPatch::makeWeights(fvsPatchScalarField& w) const") << "face " << errorFace << " and " << errorFace + sizeby2 << " areas do not match by " << 100*mag(magFa[errorFace] - magFa[errorFace + sizeby2])/avFa @@ -102,7 +115,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const // Make patch face - neighbour cell distances -void cyclicFvPatch::makeDeltaCoeffs(scalarField& dc) const +void cyclicFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { vectorField d = delta(); vectorField n = nf(); diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H index ffe1615e4..6616e5d08 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H @@ -55,6 +55,7 @@ class cyclicFvPatch { // Private data + //- Reference to cyclicPolyPatch const cyclicPolyPatch& cyclicPolyPatch_; @@ -62,11 +63,19 @@ protected: // Protected Member functions - //- Make patch weighting factors - void makeWeights(scalarField&) const; + // Geometry correction functions - //- Make patch face - neighbour cell distances - void makeDeltaCoeffs(scalarField&) const; + //- Make mesh cell centres. Moved from fvMeshGeometry + virtual void makeC(slicedSurfaceVectorField&) const; + + + // Discretisation correction functions + + //- Make patch weighting factors + void makeWeights(fvsPatchScalarField&) const; + + //- Make patch face - neighbour cell distances + void makeDeltaCoeffs(fvsPatchScalarField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.C index 24b70e4a8..849b9394d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.C @@ -30,8 +30,12 @@ Contributor \*---------------------------------------------------------------------------*/ #include "cyclicGgiFvPatch.H" +#include "fvMesh.H" +#include "fvPatchFields.H" +#include "fvPatchFields.H" +#include "fvsPatchFields.H" +#include "slicedSurfaceFields.H" #include "addToRunTimeSelectionTable.H" -#include "fvBoundaryMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,8 +48,18 @@ namespace Foam // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // +// Make mesh cell centres. Moved from fvMeshGeometry +void Foam::cyclicGgiFvPatch::makeC(slicedSurfaceVectorField& C) const +{ + C.boundaryField()[index()].UList::operator= + ( + patchSlice(cyclicGgiPolyPatch_.boundaryMesh().mesh().faceCentres()) + ); +} + + // Make patch weighting factors -void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const +void Foam::cyclicGgiFvPatch::makeWeights(fvsPatchScalarField& w) const { // Calculation of weighting factors is performed from the master // position, using reconstructed shadow cell centres @@ -77,7 +91,12 @@ void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const else { // Pick up weights from the master side - scalarField masterWeights(shadow().size()); + fvsPatchScalarField masterWeights + ( + shadow(), + w.dimensionedInternalField() + ); + shadow().makeWeights(masterWeights); w = interpolate(1 - masterWeights); @@ -93,7 +112,7 @@ void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const // Make patch face - neighbour cell distances -void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (cyclicGgiPolyPatch_.master()) { @@ -111,8 +130,14 @@ void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const } else { - scalarField masterDeltas(shadow().size()); + fvsPatchScalarField masterDeltas + ( + shadow(), + dc.dimensionedInternalField() + ); + shadow().makeDeltaCoeffs(masterDeltas); + dc = interpolate(masterDeltas); if (bridgeOverlap()) diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.H index 35f550a39..1a2ad1118 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicGgi/cyclicGgiFvPatch.H @@ -67,11 +67,19 @@ protected: // Protected Member functions - //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + // Geometry correction functions - //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + //- Make mesh cell centres. Moved from fvMeshGeometry + virtual void makeC(slicedSurfaceVectorField&) const; + + + // Discretisation correction functions + + //- Make patch weighting factors + void makeWeights(fvsPatchScalarField&) const; + + //- Make patch face - neighbour cell distances + void makeDeltaCoeffs(fvsPatchScalarField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.C index fff0ecb3b..e2c3f5118 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.C @@ -34,8 +34,9 @@ Contributor \*---------------------------------------------------------------------------*/ #include "ggiFvPatch.H" -#include "addToRunTimeSelectionTable.H" +#include "fvPatchFields.H" #include "fvBoundaryMesh.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +56,7 @@ Foam::ggiFvPatch::~ggiFvPatch() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // Make patch weighting factors -void Foam::ggiFvPatch::makeWeights(scalarField& w) const +void Foam::ggiFvPatch::makeWeights(fvsPatchScalarField& w) const { // Calculation of weighting factors is performed from the master // position, using reconstructed shadow cell centres @@ -84,7 +85,12 @@ void Foam::ggiFvPatch::makeWeights(scalarField& w) const else { // Pick up weights from the master side - scalarField masterWeights(shadow().size()); + fvsPatchScalarField masterWeights + ( + shadow(), + w.dimensionedInternalField() + ); + shadow().makeWeights(masterWeights); scalarField oneMinusW = 1 - masterWeights; @@ -102,7 +108,7 @@ void Foam::ggiFvPatch::makeWeights(scalarField& w) const // Make patch face - neighbour cell distances -void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::ggiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (ggiPolyPatch_.master()) { @@ -120,8 +126,14 @@ void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const } else { - scalarField masterDeltas(shadow().size()); + fvsPatchScalarField masterDeltas + ( + shadow(), + dc.dimensionedInternalField() + ); + shadow().makeDeltaCoeffs(masterDeltas); + dc = interpolate(masterDeltas); if (bridgeOverlap()) @@ -135,7 +147,7 @@ void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const // Make patch face non-orthogonality correction vectors -void Foam::ggiFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::ggiFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { // Non-orthogonality correction on a ggi interface // MB, 7/April/2009 @@ -239,7 +251,7 @@ const Foam::labelList& Foam::ggiFvPatch::zoneAddressing() const } -const Foam::labelListList& Foam::ggiFvPatch::addressing() const +const Foam::labelListList& Foam::ggiFvPatch::ggiAddressing() const { if (ggiPolyPatch_.master()) { @@ -264,7 +276,7 @@ const Foam::mapDistribute& Foam::ggiFvPatch::map() const } -const Foam::scalarListList& Foam::ggiFvPatch::weights() const +const Foam::scalarListList& Foam::ggiFvPatch::ggiWeights() const { if (ggiPolyPatch_.master()) { @@ -325,7 +337,7 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const { nZoneEntries += zoneColsFF[zfI].size(); } - + // Reconstruct matrix labelList zoneRowStart(zoneSize() + 1); labelList zoneCols(nZoneEntries); @@ -334,12 +346,12 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const zoneRowStart[0] = 0; // Reset nZoneEntries for use as a counter nZoneEntries = 0; - + forAll(zoneColsFF, zfI) { const labelField& curCols = zoneColsFF[zfI]; const scalarField& corCoeffs = zoneCoeffsFF[zfI]; - + zoneRowStart[zfI + 1] = zoneRowStart[zfI] + curCols.size(); forAll (curCols, coeffI) @@ -358,7 +370,7 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const ); // Set coeffs - patchP.coeffs() = zoneCoeffs; + patchP.coeffs() = zoneCoeffs; } } diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.H index 44a112903..66e9f4322 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/ggi/ggiFvPatch.H @@ -67,13 +67,13 @@ protected: // Protected Member functions //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + virtual void makeWeights(fvsPatchScalarField&) const; //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const; //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: @@ -180,7 +180,7 @@ public: //- Return addressing. Master side returns own addressing and // slave side returns addressing from master - virtual const labelListList& addressing() const; + virtual const labelListList& ggiAddressing() const; //- Is the patch localised on a single processor virtual bool localParallel() const; @@ -190,7 +190,7 @@ public: //- Return weights. Master side returns own weights and // slave side returns weights from master - virtual const scalarListList& weights() const; + virtual const scalarListList& ggiWeights() const; //- Return face transformation tensor virtual const tensorField& forwardT() const diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.C index 4b376e6f1..1f159dc76 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.C @@ -34,8 +34,10 @@ Contributor \*---------------------------------------------------------------------------*/ #include "mixingPlaneFvPatch.H" -#include "addToRunTimeSelectionTable.H" +#include "fvPatchFields.H" +#include "fvsPatchFields.H" #include "fvBoundaryMesh.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +57,7 @@ Foam::mixingPlaneFvPatch::~mixingPlaneFvPatch() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // Make patch weighting factors -void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const +void Foam::mixingPlaneFvPatch::makeWeights(fvsPatchScalarField& w) const { // Calculation of weighting factors is performed from the master // position, using reconstructed shadow cell centres @@ -76,7 +78,12 @@ void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const else { // Pick up weights from the master side - scalarField masterWeights(shadow().size()); + fvsPatchScalarField masterWeights + ( + shadow(), + w.dimensionedInternalField() + ); + shadow().makeWeights(masterWeights); scalarField oneMinusW = 1 - masterWeights; @@ -86,7 +93,7 @@ void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const } -void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (mixingPlanePolyPatch_.master()) { @@ -97,14 +104,20 @@ void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(scalarField& dc) const } else { - scalarField masterDeltas(shadow().size()); + fvsPatchScalarField masterDeltas + ( + shadow(), + dc.dimensionedInternalField() + ); + shadow().makeDeltaCoeffs(masterDeltas); + dc = interpolate(masterDeltas); } } -void Foam::mixingPlaneFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::mixingPlaneFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; #if 0 @@ -171,7 +184,7 @@ Foam::mixingPlaneFvPatch::shadowInterface() const } -const Foam::labelListList& Foam::mixingPlaneFvPatch::addressing() const +const Foam::labelListList& Foam::mixingPlaneFvPatch::ggiAddressing() const { if (mixingPlanePolyPatch_.master()) { @@ -184,7 +197,7 @@ const Foam::labelListList& Foam::mixingPlaneFvPatch::addressing() const } -const Foam::scalarListList& Foam::mixingPlaneFvPatch::weights() const +const Foam::scalarListList& Foam::mixingPlaneFvPatch::ggiWeights() const { if (mixingPlanePolyPatch_.master()) { diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.H index 5f4348b4a..89d94bb25 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/mixingPlane/mixingPlaneFvPatch.H @@ -70,13 +70,13 @@ protected: // Protected Member functions //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + virtual void makeWeights(fvsPatchScalarField&) const; //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const; //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: @@ -219,11 +219,11 @@ public: //- Return addressing. Master side returns own addressing and // slave side returns addressing from master - virtual const labelListList& addressing() const; + virtual const labelListList& ggiAddressing() const; //- Return weights. Master side returns own weights and // slave side returns weights from master - virtual const scalarListList& weights() const; + virtual const scalarListList& ggiWeights() const; //- Return face transformation tensor virtual const tensorField& forwardT() const diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.C index 5ac8eb665..28925c667 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.C @@ -27,8 +27,10 @@ Author \*---------------------------------------------------------------------------*/ #include "overlapGgiFvPatch.H" -#include "addToRunTimeSelectionTable.H" +#include "fvPatchFields.H" +#include "fvsPatchFields.H" #include "fvBoundaryMesh.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +44,7 @@ namespace Foam // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // Make patch weighting factors -void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const +void Foam::overlapGgiFvPatch::makeWeights(fvsPatchScalarField& w) const { // Calculation of weighting factors is performed from the master // position, using reconstructed shadow cell centres @@ -64,7 +66,12 @@ void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const else { // Pick up weights from the master side - scalarField masterWeights(shadow().size()); + fvsPatchScalarField masterWeights + ( + shadow(), + w.dimensionedInternalField() + ); + shadow().makeWeights(masterWeights); w = interpolate(1 - masterWeights); @@ -73,7 +80,7 @@ void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const // Make patch face - neighbour cell distances -void Foam::overlapGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::overlapGgiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (overlapGgiPolyPatch_.master()) { @@ -84,14 +91,20 @@ void Foam::overlapGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const } else { - scalarField masterDeltas(shadow().size()); + fvsPatchScalarField masterDeltas + ( + shadow(), + dc.dimensionedInternalField() + ); + shadow().makeDeltaCoeffs(masterDeltas); + dc = interpolate(masterDeltas); } } -void Foam::overlapGgiFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::overlapGgiFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { // Non-orthogonality correction on a ggi interface // MB, 7/April/2009 diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.H index 40465c259..7058b5207 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/overlapGgi/overlapGgiFvPatch.H @@ -74,13 +74,13 @@ protected: // Protected Member functions //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + virtual void makeWeights(fvsPatchScalarField&) const; //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const; //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: @@ -99,10 +99,9 @@ public: {} - // Destructor - - virtual ~overlapGgiFvPatch() - {} + //- Destructor + virtual ~overlapGgiFvPatch() + {} // Member functions diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C index 851ae5fb1..7241f62d0 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C @@ -24,9 +24,10 @@ License \*---------------------------------------------------------------------------*/ #include "processorFvPatch.H" -#include "addToRunTimeSelectionTable.H" -#include "transformField.H" #include "crMatrix.H" +#include "transformField.H" +#include "fvPatchFields.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, processorFvPatch, polyPatch); // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void processorFvPatch::makeWeights(scalarField& w) const +void processorFvPatch::makeWeights(fvsPatchScalarField& w) const { if (Pstream::parRun()) { @@ -75,7 +76,7 @@ void processorFvPatch::makeWeights(scalarField& w) const } -void processorFvPatch::makeDeltaCoeffs(scalarField& dc) const +void processorFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (Pstream::parRun()) { diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.H index 2172da00f..3294b3e20 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.H @@ -64,10 +64,10 @@ protected: // Protected Member functions //- Make patch weighting factors - void makeWeights(scalarField&) const; + void makeWeights(fvsPatchScalarField&) const; //- Make patch face - neighbour cell distances - void makeDeltaCoeffs(scalarField&) const; + void makeDeltaCoeffs(fvsPatchScalarField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.C index 251c49b3e..88fdccbf7 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.C @@ -30,11 +30,13 @@ Author \*---------------------------------------------------------------------------*/ #include "regionCoupleFvPatch.H" -#include "addToRunTimeSelectionTable.H" +#include "foamTime.H" #include "fvMesh.H" #include "fvBoundaryMesh.H" -#include "foamTime.H" #include "mapDistribute.H" +#include "fvPatchFields.H" +#include "fvsPatchFields.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,7 +56,7 @@ Foam::regionCoupleFvPatch::~regionCoupleFvPatch() // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Make patch weighting factors -void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const +void Foam::regionCoupleFvPatch::makeWeights(fvsPatchScalarField& w) const { if (rcPolyPatch_.coupled()) { @@ -82,7 +84,12 @@ void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const else { // Pick up weights from the master side - scalarField masterWeights(shadow().size()); + fvsPatchScalarField masterWeights + ( + shadow(), + w.dimensionedInternalField() + ); + shadow().makeWeights(masterWeights); scalarField oneMinusW = 1 - masterWeights; @@ -105,7 +112,7 @@ void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const // Make patch face - neighbour cell distances -void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::regionCoupleFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { if (rcPolyPatch_.coupled()) { @@ -125,8 +132,14 @@ void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const } else { - scalarField masterDeltas(shadow().size()); + fvsPatchScalarField masterDeltas + ( + shadow(), + dc.dimensionedInternalField() + ); + shadow().makeDeltaCoeffs(masterDeltas); + dc = interpolate(masterDeltas); if (bridgeOverlap()) @@ -145,7 +158,7 @@ void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const // Make patch face non-orthogonality correction vectors -void Foam::regionCoupleFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::regionCoupleFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { if (rcPolyPatch_.coupled()) { @@ -284,7 +297,7 @@ const Foam::labelList& Foam::regionCoupleFvPatch::zoneAddressing() const } -const Foam::labelListList& Foam::regionCoupleFvPatch::addressing() const +const Foam::labelListList& Foam::regionCoupleFvPatch::ggiAddressing() const { if (rcPolyPatch_.master()) { @@ -309,7 +322,7 @@ const Foam::mapDistribute& Foam::regionCoupleFvPatch::map() const } -const Foam::scalarListList& Foam::regionCoupleFvPatch::weights() const +const Foam::scalarListList& Foam::regionCoupleFvPatch::ggiWeights() const { if (rcPolyPatch_.master()) { diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.H index 0ef589970..e78f8c004 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/regionCouple/regionCoupleFvPatch.H @@ -70,13 +70,13 @@ protected: // Protected Member functions //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + virtual void makeWeights(fvsPatchScalarField&) const; //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const; //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: @@ -189,7 +189,7 @@ public: //- Return addressing. Master side returns own addressing and // slave side returns addressing from master - virtual const labelListList& addressing() const; + virtual const labelListList& ggiAddressing() const; //- Is the patch localised on a single processor virtual bool localParallel() const; @@ -199,7 +199,7 @@ public: //- Return weights. Master side returns own weights and // slave side returns weights from master - virtual const scalarListList& weights() const; + virtual const scalarListList& ggiWeights() const; //- Return face transformation tensor virtual const tensorField& forwardT() const diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.C index eed89e003..4dbf93c94 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.C @@ -26,6 +26,7 @@ Description \*---------------------------------------------------------------------------*/ #include "symmetryFvPatch.H" +#include "fvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,7 +41,7 @@ addToRunTimeSelectionTable(fvPatch, symmetryFvPatch, polyPatch); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void symmetryFvPatch::makeCorrVecs(vectorField& cv) const +void symmetryFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { // Non-orthogonal correction not allowed. HJ, 16/Apr/2009 cv = vector::zero; diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H index 3376fdb63..b0a3fee9d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H @@ -57,7 +57,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C index d73fbc3ac..b1c21bc84 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C @@ -26,6 +26,7 @@ Description \*---------------------------------------------------------------------------*/ #include "wedgeFvPatch.H" +#include "fvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, wedgeFvPatch, polyPatch); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void wedgeFvPatch::makeCorrVecs(vectorField& cv) const +void wedgeFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { // Non-orthogonal correction not allowed. HJ, 16/Apr/2009 cv = vector::zero; diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H index 06b11d02f..d711d6b27 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H @@ -60,7 +60,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.C index 9ae5da95d..d9c23f56d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.C @@ -24,8 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "cohesiveFvPatch.H" -#include "addToRunTimeSelectionTable.H" #include "fvMesh.H" +#include "fvsPatchFields.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -39,7 +40,7 @@ namespace Foam // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -void Foam::cohesiveFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::cohesiveFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; } diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.H index adfb3316c..334d205d8 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/derived/cohesive/cohesiveFvPatch.H @@ -62,7 +62,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.C index 1ffa79e75..6025b86fe 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "directMappedFvPatch.H" +#include "fvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,7 +37,7 @@ namespace Foam // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -void Foam::directMappedFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::directMappedFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; } diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.H index 2f7a5f66a..5b36fe255 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedFvPatch.H @@ -57,7 +57,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.C index ff4e48513..75468a37b 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "directMappedWallFvPatch.H" +#include "fvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,7 +37,7 @@ namespace Foam // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -void Foam::directMappedWallFvPatch::makeCorrVecs(vectorField& cv) const +void Foam::directMappedWallFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; } diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.H index 36535c8f2..1bd6feb19 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/derived/directMapped/directMappedWallFvPatch.H @@ -57,7 +57,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.C index 1111a9c42..30116b36e 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.C @@ -26,6 +26,7 @@ Description \*---------------------------------------------------------------------------*/ #include "wallFvPatch.H" +#include "fvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, wallFvPatch, polyPatch); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -void wallFvPatch::makeCorrVecs(vectorField& cv) const +void wallFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; } diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.H index 525d2b18d..876980cfc 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/derived/wall/wallFvPatch.H @@ -56,7 +56,7 @@ protected: // Protected Member Functions //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + virtual void makeCorrVecs(fvsPatchVectorField&) const; public: diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index 768fbbc66..2ec012d4a 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -115,7 +115,9 @@ tmp fvPatch::Cn() const const unallocLabelList& faceCells = this->faceCells(); // Get reference to global cell centres - const vectorField& gcc = boundaryMesh().mesh().cellCentres(); + // Bugfix: access cell centres from fvMesh data, not polyMesh. + // HJ, 30/Nov/2017 + const vectorField& gcc = boundaryMesh().mesh().C().internalField(); forAll (faceCells, faceI) { @@ -150,19 +152,19 @@ tmp fvPatch::delta() const } -void fvPatch::makeWeights(scalarField& w) const +void fvPatch::makeWeights(fvsPatchScalarField& w) const { w = 1.0; } -void fvPatch::makeDeltaCoeffs(scalarField& dc) const +void fvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const { dc = 1.0/(nf() & delta()); } -void fvPatch::makeCorrVecs(vectorField& cv) const +void fvPatch::makeCorrVecs(fvsPatchVectorField& cv) const { cv = vector::zero; } diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index 6041b8774..c1530b72e 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -44,6 +44,9 @@ SourceFiles #include "primitiveFields.H" #include "SubField.H" #include "fvPatchFieldsFwd.H" +#include "fvsPatchFieldsFwd.H" +#include "slicedVolFieldsFwd.H" +#include "slicedSurfaceFieldsFwd.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -52,6 +55,7 @@ SourceFiles namespace Foam { +class fvMesh; class fvBoundaryMesh; class surfaceInterpolation; @@ -83,26 +87,48 @@ protected: // Protected Member Functions - //- Make patch weighting factors - virtual void makeWeights(scalarField&) const; + // Geometry correction functions - //- Make patch face - neighbour cell distances - virtual void makeDeltaCoeffs(scalarField&) const; + //- Make mesh face centres + virtual void makeCf(slicedSurfaceVectorField&) const + {} - //- Make patch face non-orthogonality correction vectors - virtual void makeCorrVecs(vectorField&) const; + //- Make mesh face areas + virtual void makeSf(slicedSurfaceVectorField&) const + {} - //- Initialise the patches for moving points - virtual void initMovePoints(); + //- Make mesh cell centres + virtual void makeC(slicedVolVectorField&) const + {} - //- Correct patches after moving points - virtual void movePoints(); + //- Make mesh cell volumes + virtual void makeV(scalarField&) const + {} + + + // Discretisation correction functions + + //- Make patch weighting factors + virtual void makeWeights(fvsPatchScalarField&) const; + + //- Make patch face - neighbour cell distances + virtual void makeDeltaCoeffs(fvsPatchScalarField&) const; + + //- Make patch face non-orthogonality correction vectors + virtual void makeCorrVecs(fvsPatchVectorField&) const; + + //- Initialise the patches for moving points + virtual void initMovePoints(); + + //- Correct patches after moving points + virtual void movePoints(); public: typedef fvBoundaryMesh BoundaryMesh; + friend class fvMesh; friend class fvBoundaryMesh; friend class surfaceInterpolation;