CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

call of overloaded ‘GeometricField is ambiguous

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2017, 03:32
Default call of overloaded ‘GeometricField is ambiguous
  #1
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
I want to compile this code:

#include "fvCFD.H"
#include "simpleControl.H"
using namespace std;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
#include "setRootCase.H"

#include "createTime.H" //Reading time
#include "createMesh.H" //Reading Mesh
#include "createFields.H" //Reading Parameters

simpleControl simple(mesh); //????

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nCalculating Stream Function\n" << "Enter to Continue\n" << endl;


while (simple.loop()) // do bellow commands until convergence criterion will be satisfied
{
Info<< "Time = " << runTime.timeName() << nl << endl;

while (simple.correctNonOrthogonal())
{
solve(fvm::laplacian(sai) == -omega);
}

#include "write.H"

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info<< "End\n" << endl;
#include "Average.H"


return 0;
}


when I write "wmake" command, this error is shown:
error: call of overloaded ‘GeometricField(Foam::IOobject, Foam::fvMesh&, int)’ is ambiguous
);

I know that the error is related to the #include "Average.H", but I don't know what the problem is.

Thanks
alimea is offline   Reply With Quote

Old   January 31, 2017, 11:30
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
What does the compiler say EXACTLY: which line, which file. I assume you are trying to make a field with an IOobject, a mesh and that an int instead of the dimensionedScalar (guessing).

If you post the code, it will be obvious - PLEASE READ THE ERROR MESSAGE

Hrv
pbachant likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 31, 2017, 23:30
Default
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by hjasak View Post
What does the compiler say EXACTLY: which line, which file. I assume you are trying to make a field with an IOobject, a mesh and that an int instead of the dimensionedScalar (guessing).

If you post the code, it will be obvious - PLEASE READ THE ERROR MESSAGE

Hrv

Dear friend
Thanks for your answer. my problem is solved.
alimea is offline   Reply With Quote

Reply

Tags
programming


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any experts on FFTW? jinhua2015 Main CFD Forum 3 May 22, 2022 19:44
call of overloaded ‘exp(double)’ is ambiguous babakflame OpenFOAM Programming & Development 11 August 27, 2016 00:34
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
2D CFD code using SIMPLE algorithm bfan Main CFD Forum 3 June 22, 2002 22:01


All times are GMT -4. The time now is 04:36.