diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c8b1d6..64583714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [2.7.1] - 2026-06-10 + +### 🐛 Bug Fixes + +- *(core)* Demote anchors below seabed from error to warning +- *(core)* Catch the exceptions when initializing the time integrator, instead of crashing ## [2.7.0] - 2026-06-09 ### 🚀 Features diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a7c7e31..7a8b8b10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) set(MOORDYN_MAJOR_VERSION 2) set(MOORDYN_MINOR_VERSION 7) -set(MOORDYN_PATCH_VERSION 0) +set(MOORDYN_PATCH_VERSION 1) set(MOORDYN_VERSION ${MOORDYN_MAJOR_VERSION}.${MOORDYN_MINOR_VERSION}) project(Moordyn VERSION ${MOORDYN_VERSION}) diff --git a/source/Line.cpp b/source/Line.cpp index 1741a5a4..bcbcc684 100644 --- a/source/Line.cpp +++ b/source/Line.cpp @@ -546,9 +546,8 @@ Line::initialize() // so now we can proceed with figuring out the positions of the nodes along // the line. if (getWaterDepth(r[0][0], r[0][1]) > r[0][2]) { - LOGERR << "Water depth is shallower than Line " << number << " anchor" + LOGWRN << "Water depth is shallower than Line " << number << " anchor" << endl; - throw moordyn::invalid_value_error("Invalid water depth"); } // TODO - determine if F should be for each segment or for each node, diff --git a/source/MoorDyn2.cpp b/source/MoorDyn2.cpp index d9970cbb..5c39c5da 100644 --- a/source/MoorDyn2.cpp +++ b/source/MoorDyn2.cpp @@ -203,7 +203,12 @@ moordyn::MoorDyn::icLegacy() const unsigned int convergence_iters = 9; // 10 iterations, indexed 0-9 ICdt = ICdt / (convergence_iters + 1); - _t_integrator->Init(); + try { + _t_integrator->Init(); + } + MOORDYN_CATCHER(err, err_msg); + if (err != MOORDYN_SUCCESS) + return err; if (ICfile != "") { try { _t_integrator->LoadState(_basepath + ICfile); @@ -371,7 +376,12 @@ moordyn::MoorDyn::icStationary() for (auto obj : LineList) t_integrator.AddLine(obj); t_integrator.SetCFL((std::min)(cfl, 1.0)); - t_integrator.Init(); + try { + t_integrator.Init(); + } + MOORDYN_CATCHER(err, err_msg); + if (err != MOORDYN_SUCCESS) + return err; if (ICfile != "") { try { t_integrator.LoadState(_basepath + ICfile); @@ -574,7 +584,13 @@ moordyn::MoorDyn::Init(const double* x, const double* xd, bool skip_ic) } } else { - _t_integrator->Init(); + try { + _t_integrator->Init(); + } + MOORDYN_CATCHER(err, err_msg); + if (err != MOORDYN_SUCCESS) + return err; + if (ICfile != "") { try { _t_integrator->LoadState(_basepath + ICfile);