From e6a208328194186ee73b44e2892fbc54c69f3b5a Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 16 May 2019 10:30:55 +0100 Subject: [PATCH] ENH: overset: allow use in non-dynamicMesh applications This is to avoid overset interpolation in the calculation of the stencil itself since this triggers a loop. --- .../cellVolumeWeightCellCellStencil.C | 22 ++++++++++++++++--- .../inverseDistanceCellCellStencil.C | 20 ++++++++++++++--- .../trackingInverseDistanceCellCellStencil.C | 15 +++++++++++-- .../dynamicOversetFvMesh.H | 18 +++++++-------- .../dynamicOversetFvMeshTemplates.C | 3 +-- 5 files changed, 59 insertions(+), 19 deletions(-) diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 121c8c7244..4f02c9d466 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -35,6 +35,7 @@ License #include "oversetFvPatch.H" #include "zeroGradientFvPatchFields.H" #include "syncTools.H" +#include "dynamicOversetFvMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -1116,7 +1117,12 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() { patchTypes[cellI] = allPatchTypes[cellI]; } - patchTypes.correctBoundaryConditions(); + //patchTypes.correctBoundaryConditions(); + dynamicOversetFvMesh::correctBoundaryConditions + < + volScalarField, + oversetFvPatchField + >(patchTypes.boundaryFieldRef(), false); patchTypes.write(); } if (debug) @@ -1141,7 +1147,12 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() { volTypes[cellI] = allCellTypes[cellI]; } - volTypes.correctBoundaryConditions(); + //volTypes.correctBoundaryConditions(); + dynamicOversetFvMesh::correctBoundaryConditions + < + volScalarField, + oversetFvPatchField + >(volTypes.boundaryFieldRef(), false); volTypes.write(); } @@ -1185,7 +1196,12 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() cellStencil_.transfer(allStencil); cellInterpolationWeights_.transfer(allWeights); cellInterpolationWeight_.transfer(allWeight); - cellInterpolationWeight_.correctBoundaryConditions(); + //cellInterpolationWeight_.correctBoundaryConditions(); + dynamicOversetFvMesh::correctBoundaryConditions + < + volScalarField, + oversetFvPatchField + >(cellInterpolationWeight_.boundaryFieldRef(), false); DynamicList