diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 491c50136569867b7af021af9fcfb60d99367674..3104143edc1d80554c97534a3b58922faeeca8fc 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<Type> ( - ptf.uniformValue_ + ptf.uniformValue_, + this->patch().patch() ) ) {} @@ -133,7 +134,8 @@ timeVaryingMappedFixedValueFvPatchField ( new PatchFunction1Types::MappedFile<Type> ( - 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 853502055ae26ece282e3514911e1ff2e9b6e58b..012740f257e1867286fe46522cfb586cd250713a 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<Type>::uniformFixedValueFvPatchField ) : fixedValueFvPatchField<Type>(ptf), - uniformValue_(ptf.uniformValue_.clone()) + uniformValue_(ptf.uniformValue_.clone(this->patch().patch())) {} @@ -103,7 +103,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField ) : fixedValueFvPatchField<Type>(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<Type>::uniformFixedValueFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class Type> +void Foam::uniformFixedValueFvPatchField<Type>::autoMap +( + const fvPatchFieldMapper& mapper +) +{ + fixedValueFvPatchField<Type>::autoMap(mapper); + uniformValue_().autoMap(mapper); +} + + +template<class Type> +void Foam::uniformFixedValueFvPatchField<Type>::rmap +( + const fvPatchField<Type>& ptf, + const labelList& addr +) +{ + fixedValueFvPatchField<Type>::rmap(ptf, addr); + + const uniformFixedValueFvPatchField& tiptf = + refCast<const uniformFixedValueFvPatchField>(ptf); + + uniformValue_().rmap(tiptf.uniformValue_(), addr); +} + + template<class Type> void Foam::uniformFixedValueFvPatchField<Type>::updateCoeffs() { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H index 0e725abdc1bd3ae889eb855b2d31e207fdac5f09..a9c1db49e9a363ab57210f5b6276e982c2fe8ff3 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<Type>&, + const labelList& + ); + + //- Update the coefficients associated with the patch field virtual void updateCoeffs();