ENH: uniformFixedValue: avoid unallocated autoPtr error
This commit is contained in:
parent
ddf9d528e2
commit
bd1e1ec9c7
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -130,7 +130,11 @@ void Foam::uniformFixedValueFvPatchField<Type>::autoMap
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchField<Type>::autoMap(mapper);
|
||||
|
||||
if (refValueFunc_)
|
||||
{
|
||||
refValueFunc_().autoMap(mapper);
|
||||
}
|
||||
|
||||
if (refValueFunc_().constant())
|
||||
{
|
||||
@ -152,7 +156,10 @@ void Foam::uniformFixedValueFvPatchField<Type>::rmap
|
||||
const uniformFixedValueFvPatchField& tiptf =
|
||||
refCast<const uniformFixedValueFvPatchField>(ptf);
|
||||
|
||||
if (refValueFunc_)
|
||||
{
|
||||
refValueFunc_().rmap(tiptf.refValueFunc_(), addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -174,7 +181,12 @@ template<class Type>
|
||||
void Foam::uniformFixedValueFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<Type>::write(os);
|
||||
|
||||
if (refValueFunc_)
|
||||
{
|
||||
refValueFunc_->writeData(os);
|
||||
}
|
||||
|
||||
fvPatchField<Type>::writeValueEntry(os);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user