<div dir="ltr"><div><div><div>Hi Christoph and Oliver,<br><br></div>Thank you very much for your reply. It helped me to solve the problem. Actually, I had to remove the "true" variable in the initialization of subsampling. I don't know why, but it worked in this way.<br>
<br></div>Best regards,<br></div>Arya<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 7:47 AM, Christoph Grüninger <span dir="ltr"><<a href="mailto:christoph.grueninger@iws.uni-stuttgart.de" target="_blank">christoph.grueninger@iws.uni-stuttgart.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Arya,<br>
do you use dune-grid directly or through an abstraction level like<br>
PDELab or dune-FEM? From PDELab it works for me, so in general it is<br>
working:<br>
<br>
> StaggeredQ0DGF staggeredQ0DGF(vsub, x);<br>
> P0DGF p0dgf(psub, x);<br>
> Dune::SubsamplingVTKWriter<GV> vtkwriter(gv, 1);<br>
> vtkwriter.addCellData(new Dune::PDELab::VTKGridFunctionAdapter<P0DGF>(p0dgf, "pressure"));<br>
> vtkwriter.addCellData(new Dune::PDELab::VTKGridFunctionAdapter<StaggeredQ0DGF>(staggeredQ0DGF, "velocity"));<br>
> sprintf(fname, "test_k-%04d", gridCells);<br>
> vtkwriter.write(fname, Dune::VTK::ascii);<br>
<br>
Maybe have a look at testsgrid in dune/grid/io/file/dgfparser/test.<br>
With these changes the subsampling writer seems to work (at least the<br>
output was not the same) for the grid, there was no data attached:<br>
<br>
--- a/dune/grid/io/file/dgfparser/test/main.cc<br>
+++ b/dune/grid/io/file/dgfparser/test/main.cc<br>
@@ -51,12 +51,12 @@ void display ( const std::string &name,<br>
disp.display();<br>
}<br>
#endif // #if HAVE_GRAPE<br>
- VTKWriter<GridView> vtkWriter(view);<br>
- // SubsamplingVTKWriter<GridView> vtkWriter(view,6);<br>
+ //VTKWriter<GridView> vtkWriter(view);<br>
+ SubsamplingVTKWriter<GridView> vtkWriter(view,3);<br>
if( nofElParams + nofVtxParams > 0 )<br>
{<br>
vtkWriter.addCellData( elDat, "el. Parameters", nofElParams );<br>
- vtkWriter.addVertexData( vtxDat, "vtx. Parameters", nofVtxParams );<br>
+ //vtkWriter.addVertexData( vtxDat, "vtx. Parameters", nofVtxParams );<br>
}<br>
vtkWriter.write( name );<br>
}<br>
<br>
Bye<br>
<span class="HOEnZb"><font color="#888888">Christoph<br>
<br>
--<br>
Une science n'était vraiment développée que quand elle<br>
pouvait utiliser les mathématiques. (Paul Lafargue)<br>
*********************************************<br>
CMWR 2014: 10th - 13th June 2014 in Stuttgart<br>
Please visit <a href="http://www.cmwr14.de" target="_blank">www.cmwr14.de</a><br>
*********************************************<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Dune mailing list<br>
<a href="mailto:Dune@dune-project.org">Dune@dune-project.org</a><br>
<a href="http://lists.dune-project.org/mailman/listinfo/dune" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
</div></div></blockquote></div><br></div>