|
[Sponsors] |
September 26, 2012, 04:27 |
problem with using exp() function
|
#1 |
New Member
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 13 |
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. |
|
September 26, 2012, 04:43 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
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 |
|
October 1, 2012, 12:19 |
|
#3 |
New Member
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 13 |
dear Niels
very thanks to help me, I try that and it worked. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 12:21 |
OpenFoam 14 installation problem | gfcoppola | OpenFOAM Installation | 20 | November 2, 2007 13:38 |
Problem in CFX5POST Chart function. | windhair | CFX | 2 | September 20, 2004 07:49 |