4 #ifndef DUNE_VTKSEQUENCE_HH
5 #define DUNE_VTKSEQUENCE_HH
19 template<
class Gr
idView >
23 std::string name_,path_,extendpath_;
25 std::ofstream seqFile_;
28 const std::string& name,
29 const std::string& path,
30 const std::string& extendpath,
33 name_(name), path_(path),
34 extendpath_(extendpath),
38 if (gridView.
comm().rank()==0) {
39 std::stringstream pvdname;
40 pvdname << name <<
".pvd";
41 seqFile_.open(pvdname.str().c_str());
42 seqFile_ <<
"<?xml version=\"1.0\"?> \n"
43 <<
"<VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"LittleEndian\"> \n"
44 <<
"<Collection> \n" << std::flush;
48 if (seqFile_.is_open()) {
49 seqFile_ <<
"</Collection> \n"
50 <<
"</VTKFile> \n" << std::flush;
55 std::stringstream name;
57 name << name_ <<
"-" << std::setw(5) << count_;
59 path_.c_str(),extendpath_.c_str(),ot);
60 if (seqFile_.is_open()) {
61 seqFile_ <<
"<DataSet timestep=\"" << time
62 <<
"\" group=\"\" part=\"0\" name=\"\" file=\""
63 << pvtuName <<
"\"/> \n" << std::flush;