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); }