1 const pointField& points = mesh.points();
2 label nPoints = points.size();
3 const cellShapeList& cells = mesh.cellShapes();
5 gmvFile << "gmvinput " << format << nl;
6 gmvFile << "nodes " << nPoints << nl;
7 for(label indx=0;indx<nPoints;indx++)
9 gmvFile << points[indx].x() << " ";
12 for(label indx=0;indx<nPoints;indx++)
14 gmvFile << points[indx].y() << " ";
17 for(label indx=0;indx<nPoints;indx++)
19 gmvFile << points[indx].z() << " ";
22 gmvFile << "cells " << cells.size() << nl;
23 for(label indx=0;indx<cells.size();indx++)
25 label nNodes = cells[indx].size();
28 gmvFile << "hex " << 8 << " ";
29 for(label ip=0; ip<nNodes; ip++)
31 gmvFile << cells[indx][ip] + 1 << " ";
37 gmvFile << "tet " << 4 << " ";
38 for(label ip=0; ip<nNodes; ip++)
40 gmvFile << cells[indx][ip] + 1 << " ";
46 gmvFile << "prism " << 6 << " ";
47 for(label ip=0; ip<nNodes; ip++)
49 gmvFile << cells[indx][ip] + 1 << " ";