From 20cefd3b81a1b10ce4e8bb00f29ca524cedfb093 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 30 Jan 2019 11:43:46 +0000 Subject: [PATCH] timeVaryingMappedFixedValueFvPatchField: Corrected rmap of the timeVaryingMappedFvPatchField --- .../timeVaryingMappedFixedValueFvPatchField.C | 9 ++++++++- .../timeVaryingMappedFvPatchField.C | 5 +---- .../timeVaryingMappedFvPatchField.H | 9 +++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 8c795cc662..b004307f48 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -129,7 +129,14 @@ void Foam::timeVaryingMappedFixedValueFvPatchField::rmap ) { fixedValueFvPatchField::rmap(ptf, addr); - fieldMapper_.rmap(ptf, addr); + fieldMapper_.rmap + ( + refCast + < + const timeVaryingMappedFixedValueFvPatchField + >(ptf).fieldMapper_, + addr + ); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.C index 106db4f843..c71e237058 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.C @@ -402,13 +402,10 @@ void Foam::timeVaryingMappedFvPatchField::autoMap template void Foam::timeVaryingMappedFvPatchField::rmap ( - const fvPatchField& ptf, + const timeVaryingMappedFvPatchField& tiptf, const labelList& addr ) { - const timeVaryingMappedFvPatchField& tiptf = - refCast>(ptf); - startSampledValues_.rmap(tiptf.startSampledValues_, addr); endSampledValues_.rmap(tiptf.endSampledValues_, addr); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.H index 2eb406f32e..5ddcb3b80b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField/timeVaryingMappedFvPatchField.H @@ -218,8 +218,13 @@ public: //- Map (and resize as needed) from self given a mapping object void autoMap(const fvPatchFieldMapper&); - //- Reverse map the given fvPatchField onto this fvPatchField - void rmap(const fvPatchField&, const labelList&); + //- Reverse map the given timeVaryingMappedFvPatchField + // onto this timeVaryingMappedFvPatchField + void rmap + ( + const timeVaryingMappedFvPatchField&, + const labelList& + ); // Evaluation functions