| 42 | } |
| 43 | |
| 44 | void MshSaver::save_header() { |
| 45 | if (!m_binary) { |
| 46 | fout << "$MeshFormat" << std::endl; |
| 47 | fout << "2.2 0 " << sizeof(double) << std::endl; |
| 48 | fout << "$EndMeshFormat" << std::endl; |
| 49 | } else { |
| 50 | fout << "$MeshFormat" << std::endl; |
| 51 | fout << "2.2 1 " << sizeof(double) << std::endl; |
| 52 | int one = 1; |
| 53 | fout.write((char*)&one, sizeof(int)); |
| 54 | fout << "$EndMeshFormat" << std::endl; |
| 55 | } |
| 56 | fout.flush(); |
| 57 | } |
| 58 | |
| 59 | void MshSaver::save_nodes(const VectorF& nodes) { |
| 60 | // Save nodes. |