CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   What is neg(s)? (http://www.cfd-online.com/Forums/openfoam-solving/66579-what-neg-s.html)

sandy July 19, 2009 21:34

What is neg(s)?
 
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!!

henrik July 20, 2009 02:43

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


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