From: bangerth Date: Thu, 17 Feb 2011 15:14:59 +0000 (+0000) Subject: New function: DataOutBase::write_visit_record. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e24f7454c99f3b26cb0a9b987c6c6c862392311;p=dealii-svn.git New function: DataOutBase::write_visit_record. git-svn-id: https://svn.dealii.org/trunk@23383 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 02fc43c602..105eb1abeb 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -78,6 +78,14 @@ should be fixed now.

Specific improvements

    +
  1. New: There is now a function DataOutBase::write_visit_record that does +the equivalent for VisIt that DataOutBase::write_pvtu_record does for ParaView: +generate a file that contains a list of all other VTK or VTU files of which the +current parallel simulation consists. +
    +(Wolfgang Bangerth, 2011/02/16) +
  2. +
  3. New: There is now a function TrilinosWrappers::VectorBase::minimal_value.
    (Wolfgang Bangerth, 2011/02/16) diff --git a/deal.II/include/deal.II/base/data_out_base.h b/deal.II/include/deal.II/base/data_out_base.h index 6daf55ce8f..52235e9100 100644 --- a/deal.II/include/deal.II/base/data_out_base.h +++ b/deal.II/include/deal.II/base/data_out_base.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -1712,7 +1712,8 @@ class DataOutBase * separate VTU files to parallelize visualization. In that case, you * need a .pvtu file that describes which VTU files form * a group. The DataOutInterface::write_pvtu_record() function can - * generate such a master record. + * generate such a master record. Likewise, + * DataOutInterface::write_visit_record() does the same for VisIt. * * The use of this function is explained in step-40. */ @@ -2234,16 +2235,19 @@ class DataOutInterface : private DataOutBase * in Vtu (VTK's XML) format. See * DataOutBase::write_vtu. * - * Some visualization programs, such as - * ParaView, can read several separate - * VTU files to parallelize - * visualization. In that case, you need - * a .pvtu file that - * describes which VTU files form a - * group. The + * Some visualization programs, + * such as ParaView, can read + * several separate VTU files to + * parallelize visualization. In + * that case, you need a + * .pvtu file that + * describes which VTU files form + * a group. The * DataOutInterface::write_pvtu_record() - * function can generate such a master - * record. + * function can generate such a + * master record. Likewise, + * DataOutInterface::write_visit_record() + * does the same for VisIt. */ void write_vtu (std::ostream &out) const; @@ -2281,10 +2285,37 @@ class DataOutInterface : private DataOutBase * * @note The use of this function is * explained in step-40. + * + * @note At the time of writing, + * the other big VTK-based + * visualization program, VisIt, + * can not read pvtu + * records. However, it can read + * visit records as written by + * the write_visit_record() + * function. */ void write_pvtu_record (std::ostream &out, const std::vector &piece_names) const; + /** + * This function is the exact + * equivalent of the + * write_pvtu_record() function + * but for the VisIt + * visualization program. See + * there for the purpose of this + * function. + * + * This function is documented + * in the "Creating a master file + * for parallel" section (section 5.7) + * of the "Getting data into VisIt" + * report that can be found here: + * https://wci.llnl.gov/codes/visit/2.0.0/GettingDataIntoVisIt2.0.0.pdf + */ + void write_visit_record (std::ostream &out, + const std::vector &piece_names) const; /** * Obtain data through get_patches() diff --git a/deal.II/source/base/data_out_base.cc b/deal.II/source/base/data_out_base.cc index d51d72482e..12c772830c 100644 --- a/deal.II/source/base/data_out_base.cc +++ b/deal.II/source/base/data_out_base.cc @@ -5342,6 +5342,19 @@ DataOutInterface::write_pvtu_record (std::ostream &out, } + +template +void +DataOutInterface::write_visit_record (std::ostream &out, + const std::vector &piece_names) const +{ + out << "!NBLOCKS " << piece_names.size() << std::endl; + for (unsigned int i=0; i void DataOutInterface:: write_deal_II_intermediate (std::ostream &out) const