From b8e15e24b1aed59180f58fe7268b8c71091673b0 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 3 May 2019 13:06:45 +0100 Subject: [PATCH] fvPatchField: Rationalised autoMap --- .../fvPatchFields/fvPatchField/fvPatchField.C | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 2053cecdf4..21f56ee39f 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -210,59 +210,7 @@ void Foam::fvPatchField::autoMap const fvPatchFieldMapper& mapper ) { - Field& f = *this; - - if (!this->size() && !mapper.distributed()) - { - f.setSize(mapper.size()); - if (f.size()) - { - f = this->patchInternalField(); - } - } - else - { - // Map all faces provided with mapping data - mapper(*this, *this); - - // For unmapped faces set to internal field value (zero-gradient) - if (mapper.hasUnmapped()) - { - Field pif(this->patchInternalField()); - - if - ( - mapper.direct() - && notNull(mapper.directAddressing()) - && mapper.directAddressing().size() - ) - { - const labelList& mapAddressing = mapper.directAddressing(); - - forAll(mapAddressing, i) - { - if (mapAddressing[i] < 0) - { - f[i] = pif[i]; - } - } - } - else if (!mapper.direct() && mapper.addressing().size()) - { - const labelListList& mapAddressing = mapper.addressing(); - - forAll(mapAddressing, i) - { - const labelList& localAddrs = mapAddressing[i]; - - if (!localAddrs.size()) - { - f[i] = pif[i]; - } - } - } - } - } + mapper(*this, *this); }