| 99 | |
| 100 | |
| 101 | void MSHWriter::write_surface_mesh(Mesh& mesh) { |
| 102 | MshSaver saver(m_filename, !m_in_ascii); |
| 103 | |
| 104 | size_t dim = mesh.get_dim(); |
| 105 | size_t num_vertices = mesh.get_num_vertices(); |
| 106 | size_t num_faces = mesh.get_num_faces(); |
| 107 | size_t vertex_per_face = mesh.get_vertex_per_face(); |
| 108 | |
| 109 | saver.save_mesh(mesh.get_vertices(), mesh.get_faces(), dim, |
| 110 | get_face_type(vertex_per_face)); |
| 111 | |
| 112 | for (AttrNames::const_iterator itr = m_attr_names.begin(); |
| 113 | itr != m_attr_names.end(); itr++) { |
| 114 | if (!mesh.has_attribute(*itr)) { |
| 115 | std::cerr << "Error: Attribute \"" << *itr<< "\" does not exist." |
| 116 | << std::endl; |
| 117 | continue; |
| 118 | } |
| 119 | |
| 120 | VectorF& attr = mesh.get_attribute(*itr); |
| 121 | write_attribute(saver, *itr, attr, dim, num_vertices, num_faces); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | void MSHWriter::write_volume_mesh(Mesh& mesh) { |
| 126 | MshSaver saver(m_filename, !m_in_ascii); |
nothing calls this directly
no test coverage detected