CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

What is neg(s)?

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

Like Tree1Likes
  • 1 Post By henrik

LinkBack Thread Tools Display Modes
Old   July 19, 2009, 21:34
Default What is neg(s)?
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 207
Rep Power: 9
sandy is on a distinguished road
Hi people,

What is the meanings about the operation neg(s)?

If s < 0, neg(s) = s ;
if s = 0, neg(s) = 0 ;
if s > 0, neg(s) = 0 .

Am I right. Pain for it!!
sandy is offline   Reply With Quote

Old   July 20, 2009, 02:43
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 275
Rep Power: 9
henrik is on a distinguished road
Dear Sandy,

Have a look in $FOAM_SRC/OpenFOAM/lnInclude/Scalar.H where is states:

inline Scalar neg(const Scalar s)
    return (s < 0)? 1: 0;
sharonyue likes this.
henrik is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

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