Skip to content
Snippets Groups Projects
Commit 8805d542 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Style

parent d68486a9
No related branches found
No related tags found
No related merge requests found
...@@ -10,19 +10,21 @@ void writeVtk(VertexBasis vertexBasis, VectorType displacement, ...@@ -10,19 +10,21 @@ void writeVtk(VertexBasis vertexBasis, VectorType displacement,
SingletonVectorType state, CellBasis cellBasis, SingletonVectorType state, CellBasis cellBasis,
SingletonVectorType stress, GridView gridView, SingletonVectorType stress, GridView gridView,
std::string filename) { std::string filename) {
Dune::VTKWriter<GridView> writer(gridView);
auto const displacement_ptr = auto const displacement_ptr =
Dune::make_shared<VTKBasisGridFunction<VertexBasis, VectorType> const>( Dune::make_shared<VTKBasisGridFunction<VertexBasis, VectorType> const>(
vertexBasis, displacement, "displacement"); vertexBasis, displacement, "displacement");
writer.addVertexData(displacement_ptr);
auto const state_ptr = Dune::make_shared< auto const state_ptr = Dune::make_shared<
VTKBasisGridFunction<VertexBasis, SingletonVectorType> const>( VTKBasisGridFunction<VertexBasis, SingletonVectorType> const>(
vertexBasis, state, "state"); vertexBasis, state, "state");
writer.addVertexData(state_ptr);
auto const vonmises_ptr = Dune::make_shared< auto const vonmises_ptr = Dune::make_shared<
VTKBasisGridFunction<CellBasis, SingletonVectorType> const>( VTKBasisGridFunction<CellBasis, SingletonVectorType> const>(
cellBasis, stress, "stress"); cellBasis, stress, "stress");
Dune::VTKWriter<GridView> writer(gridView);
writer.addVertexData(state_ptr);
writer.addVertexData(displacement_ptr);
writer.addCellData(vonmises_ptr); writer.addCellData(vonmises_ptr);
writer.write(filename.c_str()); writer.write(filename.c_str());
......
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