cannot convert 'dolfin::real' to 'double' for argument '1' to 'double cos(double)
Asked by
Murtazo Nazarov
In example in /demo/ode/
void f(const real* u, real t, real* y)
{
y[0] = -1000.0 * u[0] + cos(t);
}
But I get a compilation error:
In file included from main.cpp:12:
TestProblem1.h: In member function 'virtual void TestProblem1:
TestProblem1.h:27: error: cannot convert 'dolfin::real' to 'double' for argument '1' to 'double cos(double)'
scons: *** [main.o] Error 1
It seems dolfin::real is not double by default for the latest dolfin. Is it bug or I can fix it easily in my code?
Any suggestion?
Thanks,
Murtazo
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anders Logg
- Solved:
- Last query:
- Last reply:
To post a message you must log in.