Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/Line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
22 changes: 19 additions & 3 deletions source/MoorDyn2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Loading