diff --git a/MathLib/ODE/CVodeSolver.cpp b/MathLib/ODE/CVodeSolver.cpp
index 4c8d14069e0480389e5fa0345029b3bc4f75466e..5132cd5c6e12193e8f7be7ea35668b703f71f1eb 100644
--- a/MathLib/ODE/CVodeSolver.cpp
+++ b/MathLib/ODE/CVodeSolver.cpp
@@ -71,6 +71,8 @@ void printStats(void* cvode_mem)
 
 namespace MathLib
 {
+namespace ODE
+{
 //! \addtogroup ExternalODESolverInterface
 //! @{
 
@@ -359,6 +361,7 @@ double CVodeSolver::getTime() const
 
 CVodeSolver::~CVodeSolver() = default;
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // CVODE_FOUND
diff --git a/MathLib/ODE/CVodeSolver.h b/MathLib/ODE/CVodeSolver.h
index 5aa5b739c54e0d1ea02be4e0922fe3a370fc89a0..c6f77b74500e0d548b6dbedb54580d57e6627581 100644
--- a/MathLib/ODE/CVodeSolver.h
+++ b/MathLib/ODE/CVodeSolver.h
@@ -22,6 +22,8 @@ class ConfigTree;
 
 namespace MathLib
 {
+namespace ODE
+{
 //! \addtogroup ExternalODESolverInterface
 //! @{
 
@@ -73,6 +75,7 @@ private:
 
 //! @}}
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_CVODESOLVER_H
diff --git a/MathLib/ODE/ConcreteODESolver.h b/MathLib/ODE/ConcreteODESolver.h
index b46f2afa909db0e5c1d2029dafe79a5efe5922d6..169c02d9cba25e23d62a75afe10443656b99ebe8 100644
--- a/MathLib/ODE/ConcreteODESolver.h
+++ b/MathLib/ODE/ConcreteODESolver.h
@@ -22,6 +22,8 @@ class ConfigTree;
 
 namespace MathLib
 {
+namespace ODE
+{
 template <unsigned NumEquations>
 std::unique_ptr<ODESolver<NumEquations>> createODESolver(
     BaseLib::ConfigTree const& config);
@@ -115,6 +117,7 @@ private:
 
 //! @}
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_ODE_CONCRETEODESOLVER_H
diff --git a/MathLib/ODE/FunctionHandles.h b/MathLib/ODE/FunctionHandles.h
index a765c9a899ab123e1ae3afb298cd7382826d88e6..2e1bf60bd65f4bd77d7f494cb552b0321c1b0d8c 100644
--- a/MathLib/ODE/FunctionHandles.h
+++ b/MathLib/ODE/FunctionHandles.h
@@ -14,6 +14,8 @@
 
 namespace MathLib
 {
+namespace ODE
+{
 namespace detail
 {
 //! \addtogroup ExternalODESolverInterface
@@ -107,6 +109,7 @@ struct FunctionHandlesImpl final : public FunctionHandles
 //! @}
 
 }  // namespace detail
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_ODE_HANDLES_H
diff --git a/MathLib/ODE/ODESolver.h b/MathLib/ODE/ODESolver.h
index 6f6c777c702fcac371cc563375d47af329d53b86..e951a1f625914725eb1e32c48a5439347a3bb040 100644
--- a/MathLib/ODE/ODESolver.h
+++ b/MathLib/ODE/ODESolver.h
@@ -16,6 +16,8 @@
 
 namespace MathLib
 {
+namespace ODE
+{
 //! \addtogroup ExternalODESolverInterface
 //! @{
 
@@ -132,6 +134,7 @@ public:
 
 //! @}
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_ODESOLVER_H
diff --git a/MathLib/ODE/ODESolverBuilder.h b/MathLib/ODE/ODESolverBuilder.h
index 91d94bb4c53a81b5e0950d6a8f914dd01278cde6..88212814c972e98642030191d7a7904546b5a31b 100644
--- a/MathLib/ODE/ODESolverBuilder.h
+++ b/MathLib/ODE/ODESolverBuilder.h
@@ -26,6 +26,8 @@ class ConfigTree;
 
 namespace MathLib
 {
+namespace ODE
+{
 //! \addtogroup ExternalODESolverInterface
 //! @{
 
@@ -51,6 +53,7 @@ std::unique_ptr<ODESolver<NumEquations>> createODESolver(
 
 //! @}
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_ODE_ODESOLVERBUILDER_H
diff --git a/MathLib/ODE/ODESolverTypes.h b/MathLib/ODE/ODESolverTypes.h
index 3a63a0484e2f16024527fac1fcbaea56e9290cb1..2fbfbc9530dd159000931e5a79c967244faa8113 100644
--- a/MathLib/ODE/ODESolverTypes.h
+++ b/MathLib/ODE/ODESolverTypes.h
@@ -15,6 +15,8 @@
 
 namespace MathLib
 {
+namespace ODE
+{
 //! \addtogroup ExternalODESolverInterface
 //! @{
 
@@ -66,6 +68,7 @@ using JacobianFunction = std::function<bool(const double t,
 
 //! @}
 
+}  // namespace ODE
 }  // namespace MathLib
 
 #endif  // MATHLIB_ODE_ODESOLVERTYPES_H
diff --git a/Tests/MathLib/TestODESolver.cpp b/Tests/MathLib/TestODESolver.cpp
index 78493a3c747d7476916e478c080f9e686b6e00a8..29b79a3413a34cf0b504fe87f4926db25ff7bc29 100644
--- a/Tests/MathLib/TestODESolver.cpp
+++ b/Tests/MathLib/TestODESolver.cpp
@@ -17,8 +17,8 @@ const double abs_tol = 1e-8;
 const double rel_tol = 1e-8;
 
 bool f(const double,
-       MathLib::MappedConstVector<1> const& y,
-       MathLib::MappedVector<1>& ydot)
+       MathLib::ODE::MappedConstVector<1> const& y,
+       MathLib::ODE::MappedVector<1>& ydot)
 {
 	if (y[0] <= 0.0) return false;
 
@@ -27,9 +27,9 @@ bool f(const double,
 }
 
 bool df(const double /*t*/,
-        MathLib::MappedConstVector<1> const& y,
-        MathLib::MappedConstVector<1> const& /*ydot*/,
-        MathLib::MappedMatrix<1, 1>& jac)
+        MathLib::ODE::MappedConstVector<1> const& y,
+        MathLib::ODE::MappedConstVector<1> const& /*ydot*/,
+        MathLib::ODE::MappedMatrix<1, 1>& jac)
 {
 	if (y[0] <= 0.0) return false;
 
@@ -43,8 +43,8 @@ struct ExtraData
 };
 
 bool f_extra(const double,
-             MathLib::MappedConstVector<1> const& y,
-             MathLib::MappedVector<1>& ydot,
+             MathLib::ODE::MappedConstVector<1> const& y,
+             MathLib::ODE::MappedVector<1>& ydot,
              ExtraData& data)
 {
 	if (y[0] <= 0.0) return false;
@@ -63,7 +63,7 @@ bool any_ode_solver_libs_available()
 }
 
 template <unsigned NumEquations>
-std::unique_ptr<MathLib::ODESolver<NumEquations>> make_ode_solver(
+std::unique_ptr<MathLib::ODE::ODESolver<NumEquations>> make_ode_solver(
     boost::property_tree::ptree const& conf)
 {
 	// Make sure testrunner does not crash if we haven't built with support for
@@ -78,13 +78,13 @@ std::unique_ptr<MathLib::ODESolver<NumEquations>> make_ode_solver(
 
 	BaseLib::ConfigTree config(conf, "", BaseLib::ConfigTree::onerror,
 	                           BaseLib::ConfigTree::onwarning);
-	return MathLib::createODESolver<NumEquations>(config);
+	return MathLib::ODE::createODESolver<NumEquations>(config);
 }
 
 // There is no definition of this function in order to prevent passing temporary
 // property trees! There will be linker errors if you do so anyway.
 template <unsigned NumEquations>
-std::unique_ptr<MathLib::ODESolver<NumEquations>> make_ode_solver(
+std::unique_ptr<MathLib::ODE::ODESolver<NumEquations>> make_ode_solver(
     boost::property_tree::ptree&&);
 
 void check(const double time_reached, const double y, const double y_dot,
@@ -164,15 +164,15 @@ TEST(MathLibCVodeTest, ExponentialExtraData)
 
 	ExtraData data;
 	auto f_lambda = [&](double t,
-	                    MathLib::MappedConstVector<1> const& y,
-	                    MathLib::MappedVector<1>& ydot)
+	                    MathLib::ODE::MappedConstVector<1> const& y,
+	                    MathLib::ODE::MappedVector<1>& ydot)
 	{
 		return f_extra(t, y, ydot, data);
 	};
 
 	ode_solver->setFunction(f_lambda, nullptr);
-	ode_solver->setTolerance(abs_tol, rel_tol);
 
+	ode_solver->setTolerance(abs_tol, rel_tol);
 	ode_solver->setIC(t0, {y0});
 	ode_solver->preSolve();