diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/empty/emptyFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/empty/emptyFvPatch.H index c1c52ad51..595c6311a 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/empty/emptyFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/empty/emptyFvPatch.H @@ -74,11 +74,18 @@ public: // Access + //- Return patch size virtual label size() const { return 0; } + //- Return patch slice size + virtual label sliceSize() const + { + return 0; + } + //- Return faceCells of zero size virtual const unallocLabelList& faceCells() const; }; diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index db76e8123..78d06a49c 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -191,12 +191,18 @@ public: return polyPatch_.name(); } - //- Return size + //- Return patch size virtual label size() const { return polyPatch_.size(); } + //- Return patch slice size. Immersed boundary support + virtual label sliceSize() const + { + return size(); + } + //- Return true if this patch is coupled virtual bool coupled() const { @@ -233,11 +239,12 @@ public: { return typename List::subList ( - l, size(), + l, sliceSize(), polyPatch_.start() ); } + //- Slice list to patch template const typename Field::subField patchSlice ( @@ -246,7 +253,7 @@ public: { return typename Field::subField ( - l, size(), + l, sliceSize(), polyPatch_.start() ); } diff --git a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.H b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.H index 0f265c0d1..cceea2361 100644 --- a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.H +++ b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.H @@ -152,6 +152,14 @@ public: //- Return size equal to number of intersected cells virtual label size() const; + //- Return patch slice size + // Note: since the immersed boundary patch keeps the faces + // in a separate list, slicing is not allowed. HJ, 10/Oct/2018 + virtual label sliceSize() const + { + return 0; + } + //- Return faceCells next to the IB surface virtual const unallocLabelList& faceCells() const;