From bc6f4bd3191f47ebf77110237ff8fa4a76d58d13 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 18 May 2021 16:25:03 +0100 Subject: [PATCH] fixedValueFvPatchField, fvsPatchField: Added support for fvMeshDistribute --- .../basic/fixedValue/fixedValueFvPatchField.C | 14 ++------------ .../fvsPatchFields/fvsPatchField/fvsPatchField.H | 13 ++++++++++--- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C index b9515f709e..f0f2e13017 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,17 +62,7 @@ Foam::fixedValueFvPatchField::fixedValueFvPatchField ) : fvPatchField(ptf, p, iF, mapper, mappingRequired) -{ - if (mappingRequired && notNull(iF) && mapper.hasUnmapped()) - { - WarningInFunction - << "On field " << iF.name() << " patch " << p.name() - << " patchField " << this->type() - << " : mapper does not map all values." << nl - << " To avoid this warning fully specify the mapping in derived" - << " patch fields." << endl; - } -} +{} template diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 4ff4bdd35c..09bb975d1c 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -185,8 +185,15 @@ public: //- Disallow clone without setting internal field reference tmp> clone() const { - NotImplemented; - return tmp>(nullptr); + // Temporarily reinstate the clone() function pending a rewrite of + // the mapping of surfaceFields in fvMeshDistribute + return tmp> + ( + new fvsPatchField(*this, internalField_) + ); + + // NotImplemented; + // return tmp>(nullptr); } //- Copy constructor setting internal field reference