Skip to content

Commit 4828499

Browse files
fix(tests): Ignore the force on the anchor point because it is not computed
1 parent 5ece656 commit 4828499

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/polyester.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ double get_average_tension(MoorDynLine line,
6868
// not that accurate
6969
double tension = 0.0;
7070
double force[3];
71-
REQUIRE(MoorDyn_GetPointForce(anchor, force) == MOORDYN_SUCCESS);
72-
tension += vec_norm(force);
71+
// REQUIRE(MoorDyn_GetPointForce(anchor, force) == MOORDYN_SUCCESS);
72+
// tension += vec_norm(force);
7373
REQUIRE(MoorDyn_GetPointForce(fairlead, force) == MOORDYN_SUCCESS);
7474
tension += vec_norm(force);
7575
for (unsigned int i = 0; i < n; i++) {
76-
REQUIRE(MoorDyn_GetLineNodeTen(line, i + 1, force) == MOORDYN_SUCCESS);
76+
REQUIRE(MoorDyn_GetLineNodeTen(line, i, force) == MOORDYN_SUCCESS);
7777
tension += vec_norm(force);
7878
}
7979
return tension / (n + 1);

tests/test_poliester.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ def get_average_tension(line, anchor, fairlead):
2525
# connections instead of the line end up nodes, as long as the latter are
2626
# not that accurate
2727
tension = 0.0
28-
force = moordyn.GetPointForce(anchor)
29-
tension += vec_norm(force)
28+
# force = moordyn.GetPointForce(anchor)
29+
# tension += vec_norm(force)
3030
force = moordyn.GetPointForce(fairlead)
3131
tension += vec_norm(force)
3232
for i in range(n):
33-
force = moordyn.GetLineNodeTen(line, i + 1)
33+
force = moordyn.GetLineNodeTen(line, i)
3434
tension += vec_norm(force)
3535
return tension / (n + 1)
3636

0 commit comments

Comments
 (0)