CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to access math function (https://www.cfd-online.com/Forums/openfoam-solving/58313-how-access-math-function.html)

hsieh November 19, 2008 17:07

Dear OpenFOAMers: I would l
 
Dear OpenFOAMers:

I would like to revise gen6DoF.C in interDyMFoam/sloshingTank3D6DoF. I tried to use Foam::abs(... Foam::sin(..)), but, got an error saying abs is not a member function of Foam. However, Foam::sin(..) works in the same .C file. Can someone tell me how to access abs function?

Thanks!
Pei

mathieu November 19, 2008 21:52

Hi Pei ! According to the p
 
Hi Pei !

According to the programmer's guide (p. P-23), the Foam::abs() does not seem to exist. I guess that Foam::mag() would do the same job for a scalar...

Mathieu

hsieh November 20, 2008 06:52

Thanks a lot Mathieu! I mis
 
Thanks a lot Mathieu!

I missed this in the Programmer's guide.

Pei


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