#include <ffea_test.h>
Static Public Member Functions | |
static int | do_ffea_test (std::string filename) |
static int | connection_test () |
static int | arbitrary_equilibrium_twist () |
static int | connection_orientation_test () |
static int | arbitrary_equilibrium_bend () |
static int | identify_face () |
static int | connection_energy () |
static int | connection_energy_2 () |
static int | jacobian_rotate () |
static int | connection_energy_3 () |
static int | connection_propagation_every_way () |
static int | connection_propagation (int mode, bool ends_at_rod) |
static int | recover_normal () |
static int | dump_twist_info () |
static int | euler_beam () |
static int | twist_bend_coil () |
static int | lower_sphere () |
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
World *mirror_world; mirror_world = new World(); if(mirror_world->init("realistic_reversed.ffea", 0, 0, 1) == FFEA_ERROR) { FFEA_error_text(); cout << "Errors during initialisation mean World cannot be constructed properly." << endl; } std::cout << "Mirror world initialised... oooo! \n";
rod::Rod_blob_interface *mirror_interface = mirror_world->rod_blob_interface_array[0]; float mirror_attachment_node[3]; float mirror_attachment_node_pos[3]; float mirror_attachment_material_axis[3]; mirror_interface->get_attachment_node(mirror_attachment_node, mirror_attachment_node_pos); mirror_interface->get_attachment_material_axis(mirror_attachment_node, mirror_attachment_material_axis); mirror_interface->update_internal_state(true, true); int mirror_node_index = 1; float mirror_displacement = 0; float mirror_energy[6] = {0,0,0,0,0,0}; mirror_interface->get_node_energy(mirror_node_index, mirror_attachment_node, mirror_attachment_material_axis, mirror_displacement, mirror_energy); rod::print_array("mirror_energy", mirror_energy, 6);
for (int i=0; i<6; i++){ if (mirror_energy[i] > 0.0001){ std::cout << "The rod-blob interface has a non-zero equilibrium energy!\n"; return 1; } }
for rod-to-blob, these energies are now all zero-ish next move: make sure they're all zero-ish for blob-to-rod maybe come up with a sensible test for non-zero like seeing if, in a cold simulation, things relax to equilibrium
Referenced by do_ffea_test().
|
static |
float attachment_node[3]; float attachment_node_pos[3]; float attachment_material_axis[3];
current_interface->get_attachment_node(attachment_node, attachment_node_pos); current_interface->get_attachment_material_axis(attachment_node, attachment_material_axis);
rod::print_array("Attachment node", attachment_node, 3); rod::print_array("Attachment material axis", attachment_material_axis, 3);
current_interface->update_internal_state(true, true);
float displacement = 0; float energy[2][6] = {{0,0,0,0,0,0},{0,0,0,0,0,0}};
std::cout << "Attachment node acquired.\n";
current_interface->get_rod_energy(attachment_node, attachment_material_axis, displacement, energy);
std::cout << "Rod energy at equilibrium:\n"; std::cout << "r0 : [" << energy[0][0] << ", " << energy[0][1] << ", " << energy[0][2] << ", " << energy[0][3] << ", " << energy[0][4] << ", " << energy[0][5] << "]\n"; std::cout << "r1 : [" << energy[1][0] << ", " << energy[1][1] << ", " << energy[1][2] << ", " << energy[1][3] << ", " << energy[1][4] << ", " << energy[1][5] << "]\n";
world->print_trajectory_and_measurement_files(1, 1); world->print_trajectory_and_measurement_files(2, 2);
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by connection_propagation_every_way().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by main().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().
|
static |
Referenced by do_ffea_test().