OGS 6.2.0-97-g4a610c866
CVodeSolver.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <memory>
13 
14 #include "ODESolverTypes.h"
15 #include "FunctionHandles.h"
16 
17 namespace BaseLib
18 {
19 class ConfigTree;
20 }
21 
22 namespace MathLib
23 {
24 namespace ODE
25 {
28 
29 class CVodeSolverImpl;
30 
45 {
46 protected:
49  CVodeSolver(BaseLib::ConfigTree const& config,
50  unsigned const num_equations);
51 
52  void setTolerance(double const* const abstol, const double reltol);
53  void setTolerance(const double abstol, const double reltol);
54 
55  void setFunction(std::unique_ptr<detail::FunctionHandles>&& f);
56 
57  void setIC(const double t0, double const* const y0);
58 
59  void preSolve();
60  bool solve(const double t_end);
61 
62  double const* getSolution() const;
63  double getTime() const;
64  void getYDot(const double t,
65  double const* const y,
66  double* const y_dot) const;
67 
68  ~CVodeSolver();
69 
70 private:
72  std::unique_ptr<CVodeSolverImpl> _impl;
73 };
74 
76 
77 } // namespace ODE
78 } // namespace MathLib
Build information.
std::unique_ptr< CVodeSolverImpl > _impl
pimpl idiom.
Definition: CVodeSolver.h:72