|
[Sponsors] |
call of overloaded ‘exp(double)’ is ambiguous |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 24, 2016, 15:56 |
call of overloaded ‘exp(double)’ is ambiguous
|
#1 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Dear Fellows
I am trying to add a variable called rhoE into my createFields.H file and assign a value to it based on location in the grid. I have added the following lines into my createFields.H file: Code:
volScalarField yPos = mesh.C().component(vector::Y); volScalarField xPos = mesh.C().component(vector::X); Info<< "Reading field electric density rhoE\n" << endl; volScalarField rhoE ( IOobject ( "rhoE", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); forAll(rhoE.internalField(), patchi) { if (xPos [patchi] < 10) { rhoE.internalField()[patchi]=exp(-yPos[patchi]); } else { rhoE.internalField()[patchi]= 0; } } Code:
createFields.H: In function ‘int main(int, char**)’: createFields.H:183:49: error: call of overloaded ‘exp(double)’ is ambiguous createFields.H:183:49: note: candidates are: In file included from /usr/include/math.h:69:0, from /usr/include/c++/4.7/cmath:46, |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any experts on FFTW? | jinhua2015 | Main CFD Forum | 3 | May 22, 2022 19:44 |
Compiling User Fortran with CFX 14.0 on Win64 | Raijin Thunderkeg | CFX | 29 | March 9, 2016 11:45 |
File format - binary? (plot3d) | Joachim | Main CFD Forum | 15 | January 14, 2015 18:21 |
writing link between two CGNS files | t.teschner | Main CFD Forum | 1 | February 4, 2014 10:26 |
2D CFD code using SIMPLE algorithm | bfan | Main CFD Forum | 3 | June 22, 2002 22:01 |