From 97472406607188ef90e9fd922897f2246b184a66 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 29 Dec 2017 20:27:13 +0000 Subject: [PATCH] Decomposition/reconstruction bug fixes --- .../immersedBoundaryFvPatchField.C | 4 ++-- .../immersedBoundaryFvsPatchField.C | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.C b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.C index 2b61988be..ca0f85a14 100644 --- a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.C +++ b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.C @@ -166,8 +166,8 @@ void immersedBoundaryFvPatchField::rmap const labelList& ) { - // Use internal values - Field::operator=(this->patchInternalField()); + // Base fields do not rmap + this->setSize(this->patch().size(), pTraits::zero); } diff --git a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.C b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.C index 13dfe77f4..f7eba54f2 100644 --- a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.C +++ b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.C @@ -66,9 +66,11 @@ immersedBoundaryFvsPatchField::immersedBoundaryFvsPatchField const dictionary& dict ) : - fvsPatchField(p, iF, dict), + fvsPatchField(p, iF), // Do not read base data ibPatch_(refCast(p)) -{} +{ + operator=(pTraits::zero); +} template @@ -80,7 +82,7 @@ immersedBoundaryFvsPatchField::immersedBoundaryFvsPatchField const fvPatchFieldMapper& mapper ) : - fvsPatchField(ptf, p, iF, mapper), + fvsPatchField(p, iF), // Do not map base data ibPatch_(refCast(p)) {} @@ -153,7 +155,9 @@ template void immersedBoundaryFvsPatchField::write(Ostream& os) const { fvsPatchField::write(os); - this->writeEntry("value", os); + // The value entry needs to be written with zero size + Field::null().writeEntry("value", os); + // this->writeEntry("value", os); }