CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

What is neg(s)?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By henrik

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2009, 21:34
Default What is neg(s)?
  #1
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
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
Default
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dear Sandy,

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

Code:
inline Scalar neg(const Scalar s)
{
    return (s < 0)? 1: 0;
}
Henrik
sharonyue, palmera2 and lpz456 like this.
henrik is offline   Reply With Quote

Reply


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 03:28.