CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

operator overloading ==

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2015, 05:16
Question operator overloading ==
New Member
Join Date: Oct 2014
Posts: 9
Rep Power: 9
xiaofishnus is on a distinguished road
Hi Foamer

For interFoam solver, in pEqn.H, line 62

p == p_rgh + rho*gh

why it use == , but not = ??

can anybody explain this?

thanks a lot!

xiaofishnus is offline   Reply With Quote

Old   March 20, 2015, 03:52
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,875
Rep Power: 30
hjasak will become famous soon enough
operator== enforces assignment, even if the path field is of eg. fixedValue type, which is not changed by operator=

Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote


interfoam, operator overloading, peqn.h

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 02:02.