Skip to content
Snippets Groups Projects
Commit fb6d9096 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

fixes; add a const_cast hack to allow writing of const grids

[[Imported from SVN: r7995]]
parent cee0eda3
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ class CosseratAmiraMeshWriter
public:
static void write(GridType& grid,
static void write(const GridType& grid,
const std::vector<RigidBodyMotion<3> >& configuration,
const std::string& filePrefix)
{
......@@ -72,10 +72,11 @@ public:
DeformationFunction<typename GridType::LeafGridView> deformationFunction(grid.leafView(), configuration);
DeformedGridType deformedGrid(grid, deformationFunction);
// stupid, can't instantiate deformedGrid with a const grid
DeformedGridType deformedGrid(const_cast<GridType&>(grid), deformationFunction);
if (dim==2)
Dune::LeafAmiraMeshWriter<DeformedGridType>::writeSurfaceGrid(deformedGrid.leafView(), "cosseratGrid");
Dune::LeafAmiraMeshWriter<DeformedGridType>::writeSurfaceGrid(deformedGrid.leafView(), filePrefix + "Grid");
else {
Dune::LeafAmiraMeshWriter<DeformedGridType> amiramesh(deformedGrid);
amiramesh.write(filePrefix + "Grid");
......
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