Skip to content
Snippets Groups Projects
Commit 08caa966 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MaL] Rename CVodeSolverInternal class to CVodeSolver.

parent 61a022ce
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ namespace MathLib ...@@ -69,7 +69,7 @@ namespace MathLib
* | * |
* | Forward calls, disable bounds checking, no need for templates anymore * | Forward calls, disable bounds checking, no need for templates anymore
* v * v
* Implementation = CVodeSolverInternal (no templates) * Implementation = CVodeSolver (no templates)
* | * |
* | Pimpl (hide implementation, do not include 3rd party libs in header) * | Pimpl (hide implementation, do not include 3rd party libs in header)
* v * v
...@@ -300,59 +300,58 @@ CVodeSolverImpl::~CVodeSolverImpl() ...@@ -300,59 +300,58 @@ CVodeSolverImpl::~CVodeSolverImpl()
} }
} }
CVodeSolverInternal::CVodeSolverInternal(BaseLib::ConfigTree const& config, CVodeSolver::CVodeSolver(BaseLib::ConfigTree const& config,
unsigned const num_equations) unsigned const num_equations)
: _impl{new CVodeSolverImpl{config, num_equations}} : _impl{new CVodeSolverImpl{config, num_equations}}
{ {
} }
void CVodeSolverInternal::setTolerance(const double* abstol, void CVodeSolver::setTolerance(const double* abstol, const double reltol)
const double reltol)
{ {
_impl->setTolerance(abstol, reltol); _impl->setTolerance(abstol, reltol);
} }
void CVodeSolverInternal::setTolerance(const double abstol, const double reltol) void CVodeSolver::setTolerance(const double abstol, const double reltol)
{ {
_impl->setTolerance(abstol, reltol); _impl->setTolerance(abstol, reltol);
} }
void CVodeSolverInternal::setFunction(std::unique_ptr<FunctionHandles>&& f) void CVodeSolver::setFunction(std::unique_ptr<FunctionHandles>&& f)
{ {
_impl->setFunction(std::move(f)); _impl->setFunction(std::move(f));
} }
void CVodeSolverInternal::setIC(const double t0, double const* const y0) void CVodeSolver::setIC(const double t0, double const* const y0)
{ {
_impl->setIC(t0, y0); _impl->setIC(t0, y0);
} }
void CVodeSolverInternal::preSolve() void CVodeSolver::preSolve()
{ {
_impl->preSolve(); _impl->preSolve();
} }
void CVodeSolverInternal::solve(const double t_end) void CVodeSolver::solve(const double t_end)
{ {
_impl->solve(t_end); _impl->solve(t_end);
} }
double const* CVodeSolverInternal::getSolution() const double const* CVodeSolver::getSolution() const
{ {
return _impl->getSolution(); return _impl->getSolution();
} }
void CVodeSolverInternal::getYDot(const double t, double const* const y, void CVodeSolver::getYDot(const double t, double const* const y,
double* const y_dot) const double* const y_dot) const
{ {
_impl->getYDot(t, y, y_dot); _impl->getYDot(t, y, y_dot);
} }
double CVodeSolverInternal::getTime() const double CVodeSolver::getTime() const
{ {
return _impl->getTime(); return _impl->getTime();
} }
CVodeSolverInternal::~CVodeSolverInternal() = default; CVodeSolver::~CVodeSolver() = default;
} // namespace MathLib } // namespace MathLib
...@@ -24,11 +24,11 @@ class CVodeSolverImpl; ...@@ -24,11 +24,11 @@ class CVodeSolverImpl;
* *
* For internal use only. * For internal use only.
*/ */
class CVodeSolverInternal class CVodeSolver
{ {
protected: protected:
CVodeSolverInternal(BaseLib::ConfigTree const& config, CVodeSolver(BaseLib::ConfigTree const& config,
unsigned const num_equations); unsigned const num_equations);
void setTolerance(double const* const abstol, const double reltol); void setTolerance(double const* const abstol, const double reltol);
void setTolerance(const double abstol, const double reltol); void setTolerance(const double abstol, const double reltol);
...@@ -46,7 +46,7 @@ protected: ...@@ -46,7 +46,7 @@ protected:
double const* const y, double const* const y,
double* const y_dot) const; double* const y_dot) const;
~CVodeSolverInternal(); ~CVodeSolver();
private: private:
std::unique_ptr<CVodeSolverImpl> std::unique_ptr<CVodeSolverImpl>
......
...@@ -202,8 +202,8 @@ std::unique_ptr<OdeSolver<NumEquations, FunctionArguments...>> createOdeSolver( ...@@ -202,8 +202,8 @@ std::unique_ptr<OdeSolver<NumEquations, FunctionArguments...>> createOdeSolver(
BaseLib::ConfigTree const& config) BaseLib::ConfigTree const& config)
{ {
return std::unique_ptr<OdeSolver<NumEquations, FunctionArguments...>>( return std::unique_ptr<OdeSolver<NumEquations, FunctionArguments...>>(
new ConcreteOdeSolver<NumEquations, CVodeSolverInternal, new ConcreteOdeSolver<NumEquations, CVodeSolver, FunctionArguments...>(
FunctionArguments...>(config)); config));
} }
} // namespace MathLib } // namespace MathLib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment