message: modified:   ex9p.cpp
diff: @@ -95,6 +95,7 @@ int main(int argc, char *argv[])
  double dt = 0.01;
  bool visualization = true;
  bool visit = false;
  + bool paraview = false;
  bool binary = false;
  int vis_steps = 5;
  @@ -125,6 +126,9 @@ int main(int argc, char *argv[])
  args.AddOption(&visit, "-visit", "--visit-datafiles", "-no-visit",
  "--no-visit-datafiles",
  "Save data files for VisIt (visit.llnl.gov) visualization.");
  + args.AddOption(&paraview, "-paraview", "--paraview-datafiles", "-no-paraview",
  + "--no-paraview-datafiles",
  + "Save data files for ParaView (www.paraview.org) visualization.");
  args.AddOption(&binary, "-binary", "--binary-datafiles", "-ascii",
  "--ascii-datafiles",
  "Use binary (Sidre) or ascii format for VisIt data files.");
  @@ -281,6 +285,17 @@ int main(int argc, char *argv[])
  dc->Save();
  }
  + ParaViewDataCollection *pd = NULL;
  + if(paraview)
  + {
  + pd = new ParaViewDataCollection("PVExample9", mesh);
  + pd->RegisterField("solution", u);
  + pd->SetLevelsOfDetail(2);
  + pd->SetCycle(0);
  + pd->SetTime(0.0);
  + pd->Save();
  + }
  +
  socketstream sout;
  if (visualization)
  {
  @@ -352,6 +367,13 @@ int main(int argc, char *argv[])
  dc->SetTime(t);
  dc->Save();
  }
  +
  + if(paraview)
  + {
  + pd->SetCycle(ti);
  + pd->SetTime(t);
  + pd->Save();
  + }
  }
  }
  @@ -378,6 +400,7 @@ int main(int argc, char *argv[])
  delete fes;
  delete pmesh;
  delete ode_solver;
  + delete pd;
  delete dc;
  MPI_Finalize();
  