valuePointPatchField: Change assignment to use the object's internalField rather than that of the argument
Avoids dependency on the state of the argument pointPatchField the internalField of which may have been de-allocated
This commit is contained in:
@ -136,11 +136,8 @@ public:
|
|||||||
|
|
||||||
// Disable assignment operators
|
// Disable assignment operators
|
||||||
|
|
||||||
virtual void operator=(const Field<Type>&)
|
virtual void operator=(const Field<Type>&){}
|
||||||
{}
|
virtual void operator=(const Type&){}
|
||||||
|
|
||||||
virtual void operator=(const Type&)
|
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -201,7 +201,7 @@ void Foam::valuePointPatchField<Type>::operator=
|
|||||||
const pointPatchField<Type>& ptf
|
const pointPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Field<Type>::operator=(ptf.patchInternalField());
|
Field<Type>::operator=(this->patchInternalField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ void Foam::valuePointPatchField<Type>::operator==
|
|||||||
const pointPatchField<Type>& ptf
|
const pointPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Field<Type>::operator=(ptf.patchInternalField());
|
Field<Type>::operator=(this->patchInternalField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -432,35 +432,11 @@ public:
|
|||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
virtual void operator=
|
virtual void operator=(const pointPatchField<Type>&){}
|
||||||
(
|
virtual void operator+=(const pointPatchField<Type>&){}
|
||||||
const pointPatchField<Type>&
|
virtual void operator-=(const pointPatchField<Type>&){}
|
||||||
)
|
virtual void operator*=(const pointPatchField<scalar>&){}
|
||||||
{}
|
virtual void operator/=(const pointPatchField<scalar>&){}
|
||||||
|
|
||||||
virtual void operator+=
|
|
||||||
(
|
|
||||||
const pointPatchField<Type>&
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void operator-=
|
|
||||||
(
|
|
||||||
const pointPatchField<Type>&
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void operator*=
|
|
||||||
(
|
|
||||||
const pointPatchField<scalar>&
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void operator/=
|
|
||||||
(
|
|
||||||
const pointPatchField<scalar>&
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void operator=(const Field<Type>&){}
|
virtual void operator=(const Field<Type>&){}
|
||||||
virtual void operator+=(const Field<Type>&){}
|
virtual void operator+=(const Field<Type>&){}
|
||||||
@ -480,12 +456,7 @@ public:
|
|||||||
// By generic these do nothing unless the patch actually has boundary
|
// By generic these do nothing unless the patch actually has boundary
|
||||||
// values
|
// values
|
||||||
|
|
||||||
virtual void operator==
|
virtual void operator==(const pointPatchField<Type>&){}
|
||||||
(
|
|
||||||
const pointPatchField<Type>&
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void operator==(const Field<Type>&){}
|
virtual void operator==(const Field<Type>&){}
|
||||||
virtual void operator==(const Type&){}
|
virtual void operator==(const Type&){}
|
||||||
|
|
||||||
@ -527,7 +498,7 @@ const pointPatchField<Type>& operator+
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||||
addToRunTimeSelectionTable \
|
addToRunTimeSelectionTable \
|
||||||
( \
|
( \
|
||||||
PatchTypeField, \
|
PatchTypeField, \
|
||||||
|
|||||||
Reference in New Issue
Block a user