From 7bc0c8b3d8fdfd4ca6f5abb365fa835fc612301a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 4 Jul 2019 11:27:14 +0100 Subject: [PATCH] Bugfix: addes support for dealing with zero-sized patch fields (immersed boundary) --- .../finiteVolume/fvFieldDecomposerDecomposeFields.C | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/fvFieldDecomposerDecomposeFields.C b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/fvFieldDecomposerDecomposeFields.C index 80d92197e..5611b07bd 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/fvFieldDecomposerDecomposeFields.C +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/fvFieldDecomposerDecomposeFields.C @@ -158,9 +158,17 @@ fvFieldDecomposer::decomposeField const label patchStart = field.mesh().boundaryMesh()[patchI].start(); - forAll (p, i) + // Bugfix + // Special patches soch as overset and immersed boundary have + // their faces and values in a separate list; the list of + // values does not correspond to faces. Skip such patches. + // HJ, 4/Jul/2019 + if (p.size() == field.mesh().boundaryMesh()[patchI].size()) { - allFaceField[patchStart + i] = p[i]; + forAll (p, i) + { + allFaceField[patchStart + i] = p[i]; + } } }