Skip to content
Snippets Groups Projects
Commit 8cc4b42c authored by webmanue's avatar webmanue
Browse files

specify exported names in output example

parent c6c61840
No related branches found
No related tags found
No related merge requests found
Pipeline #104333 passed
......@@ -113,10 +113,13 @@ int main(int argc, char **argv) {
cpppetsc::writeToViewer(coordinates, &viewer); // dimension 3
// Note that Paraview supports both "point arrays" and "cell arrays"
cpppetsc::writeToViewer(
Mesh::vector_type::fromGlobalMesh(mesh.cloneWithDofs(1, 0)), &viewer);
cpppetsc::writeToViewer(
Mesh::vector_type::fromGlobalMesh(mesh.cloneWithDofs(0, 1)), &viewer);
auto point_array =
Mesh::vector_type::fromGlobalMesh(mesh.cloneWithDofs(1, 0));
cpppetsc::setName("point_array", &point_array);
cpppetsc::writeToViewer(point_array, &viewer);
auto cell_array = Mesh::vector_type::fromGlobalMesh(mesh.cloneWithDofs(0, 1));
cpppetsc::setName("cell_array", &cell_array);
cpppetsc::writeToViewer(cell_array, &viewer);
fprintf(stderr, "The data has been written to the file \"output.ae108\".\n");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment