diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C index 5bbad239ef..e7f1095996 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C @@ -38,10 +38,8 @@ bool Foam::valuePointPatchField::readValueEntry IOobjectOption::readOption readOpt ) { - const auto& p = pointPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = pointPatchFieldBase::patch(); const auto* eptr = dict.findEntry("value", keyType::LITERAL); diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C index 36defc1d88..bcc81e72e7 100644 --- a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C @@ -37,10 +37,8 @@ bool Foam::mixedFaPatchField::readMixedEntries IOobjectOption::readOption readOpt ) { - const auto& p = faPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = faPatchFieldBase::patch(); // If there is a 'refValue', also require all others diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C index c1ba7ffb4f..6441d0a4fc 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C @@ -39,10 +39,8 @@ bool Foam::faPatchField::readValueEntry IOobjectOption::readOption readOpt ) { - const auto& p = faPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = faPatchFieldBase::patch(); const auto* eptr = dict.findEntry("value", keyType::LITERAL); diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C index 45c84aae51..b843d9fe41 100644 --- a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C @@ -38,10 +38,8 @@ bool Foam::faePatchField::readValueEntry IOobjectOption::readOption readOpt ) { - const auto& p = faePatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = faePatchFieldBase::patch(); const auto* eptr = dict.findEntry("value", keyType::LITERAL); diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C index e8f4c61efb..80dd0a9718 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C @@ -37,10 +37,8 @@ bool Foam::mixedFvPatchField::readMixedEntries IOobjectOption::readOption readOpt ) { - const auto& p = fvPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = fvPatchFieldBase::patch(); // If there is a 'refValue', also require all others diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 5803bce2d3..99e4a31719 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -41,10 +41,8 @@ bool Foam::fvPatchField::readValueEntry IOobjectOption::readOption readOpt ) { - const auto& p = fvPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = fvPatchFieldBase::patch(); const auto* eptr = dict.findEntry("value", keyType::LITERAL); diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C index 07854658fb..9154558752 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C @@ -41,10 +41,8 @@ bool Foam::fvsPatchField::readValueEntry IOobjectOption::readOption readOpt ) { - const auto& p = fvsPatchFieldBase::patch(); - - if (!p.size()) return true; // Can be exceptionally lazy if (!IOobjectOption::isAnyRead(readOpt)) return false; + const auto& p = fvsPatchFieldBase::patch(); const auto* eptr = dict.findEntry("value", keyType::LITERAL);