| 204 | #compute_grad_upper_bound(mesh); |
| 205 | |
| 206 | def output_to_csv_3D(mesh, csv_file): |
| 207 | with open(csv_file, 'w') as fout: |
| 208 | writer = csv.writer(fout); |
| 209 | writer.writerow(["index", "edge_ratio", "radius_ratio", |
| 210 | "min_dihedral_angle", "max_dihedral_angle", "radius_edge_ratio", |
| 211 | "conformal_amips", "symmetric_dirichlet", "orientation", "grad_bound"]); |
| 212 | |
| 213 | index = np.arange(mesh.num_voxels); |
| 214 | edge_ratio = mesh.get_attribute("voxel_edge_ratio"); |
| 215 | radius_ratio = mesh.get_attribute("radius_ratio"); |
| 216 | min_dihedral = mesh.get_attribute("voxel_min_dihedral_angle"); |
| 217 | max_dihedral = mesh.get_attribute("voxel_max_dihedral_angle"); |
| 218 | re_ratio = mesh.get_attribute("voxel_radius_edge_ratio"); |
| 219 | amips = mesh.get_attribute("conformal_AMIPS"); |
| 220 | dirichlet = mesh.get_attribute("symmetric_Dirichlet"); |
| 221 | orientation = mesh.get_attribute("orientations"); |
| 222 | grad_bound = mesh.get_attribute("grad_bound"); |
| 223 | |
| 224 | for i in range(mesh.num_voxels): |
| 225 | writer.writerow([i, |
| 226 | edge_ratio[i], |
| 227 | radius_ratio[i], |
| 228 | min_dihedral[i], |
| 229 | max_dihedral[i], |
| 230 | re_ratio[i], |
| 231 | amips[i], |
| 232 | dirichlet[i], |
| 233 | orientation[i], |
| 234 | grad_bound[i]]); |
| 235 | |
| 236 | def output_to_csv_2D(mesh, csv_file): |
| 237 | with open(csv_file, 'w') as fout: |