Guest User

Untitled

a guest
Jan 4th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. ForwardEulerSolver(ODEInterface& anODESystem, const Vector& initialState,
  2. const double initialTime, const double finalTime, const double stepSize,
  3. Vector (*pFunction)(double time, Vector u), const std::string outputFileName
  4. = "output.dat", const int saveGap = 1, const int printGap = 1);
  5.  
  6. Vector FunctionToSolve(double time, Vector U)
  7. {
  8. Vector Output(1);
  9. Output[0] = 1/(1 + pow(time,2));
  10.  
  11. return Output;
  12. }
  13.  
  14. Vector (*pfunction)(double, Vector);
  15. pfunction = &FunctionToSolve;
  16.  
  17. ForwardEulerSolver* EulerSystem(*pODESystem, *initialVector, 0, 10, 0.01, *pfunction);
  18.  
  19. error: cannot convert 'Vector (*)(double, Vector)' to 'ForwardEulerSolver*' in initialization
  20.  
  21. warning: right operand of comma operator has no effect [-Wunused-value]
  22.  
  23. warning: value computed is not used [-Wunused-value]
  24.  
  25. error: expression list treated as compound expression in initializer [-fpermissive]
Add Comment
Please, Sign In to add comment