double test_compute_distance2continuum(void){ rpacket_t rp; storage_model_t sm; init_rpacket(&rp); init_storage_model(&sm); compute_distance2continuum(&rp, &sm); dealloc_storage_model(&sm); return rp.d_cont; }
static void montecarlo_compute_distances (rpacket_t * packet, storage_model_t * storage) { // Check if the last line was the same nu as the current line. if (rpacket_get_close_line (packet)) { // If so set the distance to the line to 0.0 rpacket_set_d_line (packet, 0.0); // Reset close_line. rpacket_set_close_line (packet, false); } else { compute_distance2boundary(packet, storage); compute_distance2line (packet, storage); // FIXME MR: return status of compute_distance2line() is ignored compute_distance2continuum (packet, storage); } }