Skip to content

Commit ed5735f

Browse files
committed
Fix issue in Debug.
1 parent 246bdb8 commit ed5735f

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

OpenSim/Simulation/Test/testForces.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,21 +2256,25 @@ void testBlankevoort1991Ligament() {
22562256

22572257
//Check that potential energy and spring and damping forces are zero
22582258
//when the ligament is slack
2259-
ASSERT(results.getDependentColumn("strain")(0) < 0.0, __FILE__, __LINE__,
2259+
ASSERT(results.getDependentColumn("strain").getElt(0, 0) < 0.0,
2260+
__FILE__, __LINE__,
22602261
"Expected Blankevoort1991Ligament to be slack at first time step of "
22612262
"test case.");
22622263

2263-
ASSERT_EQUAL(results.getDependentColumn("potential_energy")(0), 0.0, 1e-3,
2264+
ASSERT_EQUAL(results.getDependentColumn("potential_energy").getElt(0, 0),
2265+
0.0, 1e-3,
22642266
__FILE__, __LINE__,
22652267
"Expected potential energy in Blankevoort1991Ligament to be "
22662268
"equal to zero when the ligament is slack");
22672269

2268-
ASSERT_EQUAL(results.getDependentColumn("spring_force")(0), 0.0, 1e-3,
2270+
ASSERT_EQUAL(results.getDependentColumn("spring_force").getElt(0, 0),
2271+
0.0, 1e-3,
22692272
__FILE__, __LINE__,
22702273
"Expected spring_force in Blankevoort1991Ligament to be"
22712274
"equal to zero when the ligament is slack");
22722275

2273-
ASSERT_EQUAL(results.getDependentColumn("damping_force")(0), 0.0, 1e-3,
2276+
ASSERT_EQUAL(results.getDependentColumn("damping_force").getElt(0, 0),
2277+
0.0, 1e-3,
22742278
__FILE__, __LINE__,
22752279
"Expected damping_force in Blankevoort1991Ligament to be"
22762280
"equal to zero when the ligament is slack");
@@ -2283,24 +2287,26 @@ void testBlankevoort1991Ligament() {
22832287

22842288
double transition_strain = lig->get_transition_strain();
22852289

2286-
ASSERT(results.getDependentColumn("strain")(toe_index) <
2290+
ASSERT(results.getDependentColumn("strain").getElt(toe_index, 0) <
22872291
transition_strain, __FILE__, __LINE__,
22882292
"Expected strain at the toe_index to be less than the "
22892293
"transition_strain property in Blankevoort1991Ligament test.");
22902294

2291-
ASSERT(results.getDependentColumn("strain")(linear_index) >
2295+
ASSERT(results.getDependentColumn("strain").getElt(linear_index, 0) >
22922296
transition_strain, __FILE__, __LINE__,
22932297
"Expected strain at the linear_index to be greater than the "
22942298
"transition_strain property in Blankevoort1991Ligament test.");
22952299

2296-
ASSERT(results.getDependentColumn("potential_energy")(linear_index) >
2297-
results.getDependentColumn("potential_energy")(toe_index),
2300+
ASSERT(results.getDependentColumn("potential_energy")
2301+
.getElt(linear_index, 0) >
2302+
results.getDependentColumn("potential_energy")
2303+
.getElt(toe_index, 0),
22982304
__FILE__, __LINE__,
22992305
"Expexted potential_energy in the Blankevoort1991Ligament to be "
23002306
"greater in the linear region compared to the toe region");
23012307

2302-
ASSERT(results.getDependentColumn("spring_force")(linear_index) >
2303-
results.getDependentColumn("spring_force")(toe_index),
2308+
ASSERT(results.getDependentColumn("spring_force").getElt(linear_index, 0) >
2309+
results.getDependentColumn("spring_force").getElt(toe_index, 0),
23042310
__FILE__, __LINE__,
23052311
"Expected the spring_force in the Blankevoort1991Ligament to be "
23062312
" greater in the linear region compared to the toe region");
@@ -2375,4 +2381,4 @@ void testBlankevoort1991Ligament() {
23752381
"Expected the strain in the Blankevoort1991Ligament at the input "
23762382
"reference state be equal to the strain value input "
23772383
"to setSlackLengthFromReferenceStrain().");
2378-
}
2384+
}

0 commit comments

Comments
 (0)