diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 491c501365..3104143edc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -114,7 +114,8 @@ timeVaryingMappedFixedValueFvPatchField ( new PatchFunction1Types::MappedFile ( - ptf.uniformValue_ + ptf.uniformValue_, + this->patch().patch() ) ) {} @@ -133,7 +134,8 @@ timeVaryingMappedFixedValueFvPatchField ( new PatchFunction1Types::MappedFile ( - ptf.uniformValue_ + ptf.uniformValue_, + this->patch().patch() ) ) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C index 853502055a..012740f257 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -91,7 +91,7 @@ Foam::uniformFixedValueFvPatchField::uniformFixedValueFvPatchField ) : fixedValueFvPatchField(ptf), - uniformValue_(ptf.uniformValue_.clone()) + uniformValue_(ptf.uniformValue_.clone(this->patch().patch())) {} @@ -103,7 +103,7 @@ Foam::uniformFixedValueFvPatchField::uniformFixedValueFvPatchField ) : fixedValueFvPatchField(ptf, iF), - uniformValue_(ptf.uniformValue_.clone()) + uniformValue_(ptf.uniformValue_.clone(this->patch().patch())) { // Evaluate the profile if defined if (uniformValue_.valid()) @@ -115,6 +115,33 @@ Foam::uniformFixedValueFvPatchField::uniformFixedValueFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void Foam::uniformFixedValueFvPatchField::autoMap +( + const fvPatchFieldMapper& mapper +) +{ + fixedValueFvPatchField::autoMap(mapper); + uniformValue_().autoMap(mapper); +} + + +template +void Foam::uniformFixedValueFvPatchField::rmap +( + const fvPatchField& ptf, + const labelList& addr +) +{ + fixedValueFvPatchField::rmap(ptf, addr); + + const uniformFixedValueFvPatchField& tiptf = + refCast(ptf); + + uniformValue_().rmap(tiptf.uniformValue_(), addr); +} + + template void Foam::uniformFixedValueFvPatchField::updateCoeffs() { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H index 0e725abdc1..a9c1db49e9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -162,6 +162,22 @@ public: // Member functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& + ); + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchField&, + const labelList& + ); + + //- Update the coefficients associated with the patch field virtual void updateCoeffs();