Commit b681ab1c authored by Olivier Lantsoght's avatar Olivier Lantsoght
Browse files

[TestProject] Add some examples of error in test errors.

parent b7e74b78
...@@ -59,10 +59,10 @@ int main(int argc, char const *argv[]) ...@@ -59,10 +59,10 @@ int main(int argc, char const *argv[])
// mbs_set_qu(mbs_data, 3); // mbs_set_qu(mbs_data, 3);
// mbs_set_qu(mbs_data, 4); // mbs_set_qu(mbs_data, 4);
// mbs_set_qu(mbs_data, 5); // mbs_set_qu(mbs_data, 5);
// Error: impossible cut // Error: impossible cut
// mbs_data->dpt[3][4] = 10; // mbs_data->dpt[3][4] = 10;
mbs_data->process = 1; mbs_data->process = 1;
mbs_part = mbs_new_part(mbs_data); mbs_part = mbs_new_part(mbs_data);
mbs_part->options->rowperm=1; mbs_part->options->rowperm=1;
...@@ -77,15 +77,42 @@ int main(int argc, char const *argv[]) ...@@ -77,15 +77,42 @@ int main(int argc, char const *argv[])
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
mbs_data->process = 2; mbs_data->process = 2;
mbs_equil = mbs_new_equil(mbs_data); mbs_equil = mbs_new_equil(mbs_data);
// Error: joints have change // Error: joints have change
// mbs_set_qdriven(mbs_data, 2); // mbs_set_qdriven(mbs_data, 2);
// dirdyn options (see documentations for additional options) // dirdyn options (see documentations for additional options)
mbs_equil->options->method = 1; mbs_equil->options->method = 1;
mbs_equil->options->senstol = 1e-2; mbs_equil->options->senstol = 1e-2;
mbs_equil->options->verbose = 1; mbs_equil->options->verbose = 1;
// Error: Mass matrix full of 0.
// Set all mass to 0
// mbs_data->m[1] = 0.0;
// mbs_data->m[3] = 0.0;
// mbs_data->m[4] = 0.0;
// mbs_data->m[5] = 0.0;
// Set all inertia to 0
// mbs_data->In[5][1] = 0.0;
// mbs_data->In[5][4] = 0.0;
// mbs_data->In[5][5] = 0.0;
// Error: impossible cut
// mbs_data->dpt[3][4] = 10;
// Error: no sensitive variables
// Replace all independent joints
// mbs_equil->options->nquch = 3;
// mbs_equil_exchange(mbs_equil->options);
// mbs_equil->options->quch[1] = R2_pendulum_id;
// mbs_equil->options->quch[2] = T3_slider_id;
// mbs_equil->options->quch[3] = R3_slider_id;
// By anchor point coordinates with no symbol
// mbs_equil->options->xch_ptr[1] = &(mbs_data->dpt[2][1]);
// mbs_equil->options->xch_ptr[2] = &(mbs_data->dpt[3][1]);
// mbs_equil->options->xch_ptr[3] = &(mbs_data->dpt[2][2]);
mbs_run_equil(mbs_equil, mbs_data); mbs_run_equil(mbs_equil, mbs_data);
mbs_delete_equil(mbs_equil, mbs_data); mbs_delete_equil(mbs_equil, mbs_data);
...@@ -95,10 +122,10 @@ int main(int argc, char const *argv[]) ...@@ -95,10 +122,10 @@ int main(int argc, char const *argv[])
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
mbs_data->process = 3; mbs_data->process = 3;
mbs_modal = mbs_new_modal(mbs_data); mbs_modal = mbs_new_modal(mbs_data);
// Error: joints have change // Error: joints have change
// mbs_set_qdriven(mbs_data, 2); // mbs_set_qdriven(mbs_data, 2);
// modal options (see documentations for additional options) // modal options (see documentations for additional options)
mbs_modal->options->save_mat = 1; mbs_modal->options->save_mat = 1;
mbs_modal->options->save_result = 1; mbs_modal->options->save_result = 1;
...@@ -114,11 +141,11 @@ int main(int argc, char const *argv[]) ...@@ -114,11 +141,11 @@ int main(int argc, char const *argv[])
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
mbs_data->qd[1] = 1.5; mbs_data->qd[1] = 1.5;
// See error defined in user_dirdyn_loop // See error defined in user_dirdyn_loop
mbs_dirdyn = mbs_new_dirdyn(mbs_data); mbs_dirdyn = mbs_new_dirdyn(mbs_data);
// Error: joints have change // Error: joints have change
// mbs_set_qdriven(mbs_data, 2); // mbs_set_qdriven(mbs_data, 2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment