problem with using exp() function
Hi
Im new user, and i use OpenFoam2.01 I want to make a new solver and when I use exp function every where in my program such as this: forAll( Utot , celli ) { if (Utot[celli] < exp(0.1) ) { ...... } } where Utot is a volScalarField, I got this error when I want to wmake it : pEqn.H:100: error:call of overloaded 'exp(double)' is ambiguous but if I remove exp() or use sqr() function i got no error ! I need exp in my solver and I cant use the answer of exp(0.1) and I don't know how to use it. very thanks to help me. |
Hi Reza,
It is because your compiler is confused, whether you want to use std::exp or Foam::exp versions of the exponential. Merely replace "exp" with "Foam::exp" and it will compile. Kind regards, Niels |
dear Niels
very thanks to help me, I try that and it worked:). |
All times are GMT -4. The time now is 00:47. |