diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 6ea997f3fd8e41fc4e1d9ba464744ad40b03574f..a09f5261234463bb14fa78414ab200b5e8f0bb22 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -79,7 +79,12 @@ timeVaryingMappedFixedValueFvPatchField endSampleTime_(-1), endSampledValues_(0), endAverage_(pTraits<Type>::zero), - offset_(ptf.offset_().clone().ptr()) + offset_ + ( + ptf.offset_.valid() + ? ptf.offset_().clone().ptr() + : NULL + ) {} @@ -138,7 +143,12 @@ timeVaryingMappedFixedValueFvPatchField endSampleTime_(ptf.endSampleTime_), endSampledValues_(ptf.endSampledValues_), endAverage_(ptf.endAverage_), - offset_(ptf.offset_().clone().ptr()) + offset_ + ( + ptf.offset_.valid() + ? ptf.offset_().clone().ptr() + : NULL + ) {} @@ -163,7 +173,12 @@ timeVaryingMappedFixedValueFvPatchField endSampleTime_(ptf.endSampleTime_), endSampledValues_(ptf.endSampledValues_), endAverage_(ptf.endAverage_), - offset_(ptf.offset_().clone().ptr()) + offset_ + ( + ptf.offset_.valid() + ? ptf.offset_().clone().ptr() + : NULL + ) {}