Skip to content

Commit

Permalink
fix(tests): Ignore the force on the anchor point because it is not co…
Browse files Browse the repository at this point in the history
…mputed
  • Loading branch information
sanguinariojoe committed Dec 12, 2024
1 parent 5ece656 commit 4828499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/polyester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ double get_average_tension(MoorDynLine line,
// not that accurate
double tension = 0.0;
double force[3];
REQUIRE(MoorDyn_GetPointForce(anchor, force) == MOORDYN_SUCCESS);
tension += vec_norm(force);
// REQUIRE(MoorDyn_GetPointForce(anchor, force) == MOORDYN_SUCCESS);
// tension += vec_norm(force);
REQUIRE(MoorDyn_GetPointForce(fairlead, force) == MOORDYN_SUCCESS);
tension += vec_norm(force);
for (unsigned int i = 0; i < n; i++) {
REQUIRE(MoorDyn_GetLineNodeTen(line, i + 1, force) == MOORDYN_SUCCESS);
REQUIRE(MoorDyn_GetLineNodeTen(line, i, force) == MOORDYN_SUCCESS);
tension += vec_norm(force);
}
return tension / (n + 1);
Expand Down
6 changes: 3 additions & 3 deletions tests/test_poliester.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ def get_average_tension(line, anchor, fairlead):
# connections instead of the line end up nodes, as long as the latter are
# not that accurate
tension = 0.0
force = moordyn.GetPointForce(anchor)
tension += vec_norm(force)
# force = moordyn.GetPointForce(anchor)
# tension += vec_norm(force)
force = moordyn.GetPointForce(fairlead)
tension += vec_norm(force)
for i in range(n):
force = moordyn.GetLineNodeTen(line, i + 1)
force = moordyn.GetLineNodeTen(line, i)
tension += vec_norm(force)
return tension / (n + 1)

Expand Down

0 comments on commit 4828499

Please sign in to comment.