CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   cannot find function definition in openfoam (https://www.cfd-online.com/Forums/openfoam/105890-cannot-find-function-definition-openfoam.html)

conceptone August 11, 2012 20:39

cannot find function definition in openfoam
 
Hi everyone, I am running the sprayFoam case and set the mass equal to one particle(very small mass) to see some problem. However, I met the floating error problem and by debug version I found it was caused by parcelsToInject fuction:
return floor((time1 - time0)*parcelsPerSecond_);

so I want to see the definition of floor function, however I didn't find the definition under src directory using the linux command:find .|xargs grep "floor".
This command can find any file including the word "floor".So how can I find the function definition?
Thanks

Horus August 12, 2012 09:32

It's probably the C++ stdlib function, included from cmath:

http://www.cplusplus.com/reference/c...y/cmath/floor/

conceptone August 12, 2012 18:18

Ok , I got it. Thanks very much!


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