Newer
Older
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "vtk.hh"
template <class VertexBasis, class CellBasis, class VectorType,
class SingletonVectorType, class GridView>
void writeVtk(VertexBasis const &vertexBasis, VectorType const &displacement,
SingletonVectorType const &state, CellBasis const &cellBasis,
SingletonVectorType const &stress, GridView const &gridView,
std::string const &filename) {
auto const displacement_ptr =
Dune::make_shared<VTKBasisGridFunction<VertexBasis, VectorType> const>(
vertexBasis, displacement, "displacement");
auto const state_ptr = Dune::make_shared<
VTKBasisGridFunction<VertexBasis, SingletonVectorType> const>(
vertexBasis, state, "state");
auto const vonmises_ptr = Dune::make_shared<
VTKBasisGridFunction<CellBasis, SingletonVectorType> const>(
cellBasis, stress, "stress");
writer.addCellData(vonmises_ptr);
writer.write(filename.c_str());
}
#include "vtk_tmpl.cc"