fvPatchField<Type>::operator==
Howdy Foamers:
Browsing through the uniformFixedValue fvPatchField implementation there is a call to an operator like this in the member function updateCoeffs(): Code:
fvPatchField<Type>::operator == ( uniformValue_->value(t) ); Code:
template<class Type> Thanks in advance, Gerry. |
Howdy Foamers:
I think it is simply used as an assignment, and based on this OpenFOAM will somehow update the solver coefficients. I didn't dig so deep to see if this is the case but my results seems to tell me something is happening in the right direction. Gerry. |
Hi,
We use operator== to indicate forced assignment, in contrast with normal assignment of an fvPatchField. Normal assignment is a virtual overload depending on type, where for example it does nothing for a fixedValue derives class. What the code says is “when forcing assignment, use the op= of the base class for the Field. This is not a virtual hierarchy and it will do the actual assignment job. Hope this helps, Hrv |
Dear Professor Jasak:
Thank you very much for taking your time to explain this. In the end I went (just a little) deeper to the definition of the overloaded Field assignment operator and it confirmed your comments and my observation. In the end I would like to use this to assign a Field to the fvPatchField using this variant of the forced assignment operator, that is: Code:
void Foam::fvPatchField<Type>::operator == ( const Field<Type>& tf ) Code:
void Foam::fvPatchField<Type>::operator == ( const Type& t ) Thank you again, Gerry. |
All times are GMT -4. The time now is 19:11. |