|
[Sponsors] |
April 6, 2014, 16:00 |
Problems with including "cmath"
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
I am using OpenFOAM with QtCreator. Currently I have to implement some Integralfunctions with several input parameters like: Code:
class IntegralFunctionB { private: double x; double y; public: IntegralFunctionB(double a, double b) { x = a; y = b; } double operator()(double d) const { return pow(y,4)*(6.4/d)*exp(-(4.5*pow(2.0*pow(d,3.0)-pow(x,3.0),2.0))/pow(x,2.0)); } }; Code:
/home/USER/SolverNEW/NEW/SourceTermIntegralFunctions/IntegralFunctionB.H:16: error: call of overloaded ‘pow(double&, const double&)’ is ambiguous candidates are: /usr/include/i386-linux-gnu/bits/mathcalls.h:155: double pow(double, double) ... the Make/options file: Code:
-Iusr/include/i386-linux-gnu/bits Code:
/usr/include/i386-linux-gnu/bits Code:
#include "mathcalls.h" #include <mathcalls.h> Code:
/home/USER/SolverNEW/multiphaseEulerFoamNEW.C:46: error: mathcalls.h: No such file or directory How can I solve this problem since I need to use the "pow(double,double)" method? EDIT: If I use Foam:ow(....) the code compiles fine, but I ve only found some kind of Foam:ow(double,double) here: https://github.com/OpenFOAM/OpenFOAM.../doubleFloat.H Is this the method called when doing Foam:ow(...) and will it work for Foam:ow(double,double)? Last edited by maybee; April 7, 2014 at 06:15. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 12:12 |
[mesh manipulation] Problems with rotational cyclic boundaries | TReviol | OpenFOAM Meshing & Mesh Conversion | 8 | July 11, 2014 04:45 |
Needed Benchmark Problems for FSI | Mechstud | Main CFD Forum | 4 | July 26, 2011 13:13 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 06:44 |
Help required to solve Hydraulic related problems | aero | CFX | 0 | October 30, 2006 12:00 |