]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New function: DataOutBase::write_visit_record.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Feb 2011 15:14:59 +0000 (15:14 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Feb 2011 15:14:59 +0000 (15:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@23383 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/base/data_out_base.h
deal.II/source/base/data_out_base.cc

index 02fc43c6027b36786307374611a063ec339965ec..105eb1abeb4340ca4b0f221ac117e7450280781d 100644 (file)
@@ -78,6 +78,14 @@ should be fixed now.
 <h3>Specific improvements</h3>
 
 <ol>
+<li> 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.
+<br>
+(Wolfgang Bangerth, 2011/02/16)
+</li>
+
 <li> New: There is now a function TrilinosWrappers::VectorBase::minimal_value.
 <br>
 (Wolfgang Bangerth, 2011/02/16)
index 6daf55ce8f02a1800700df8b3ab2544fc76331ed..52235e9100cc4aa9c161297d98e9e7f10af63911 100644 (file)
@@ -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 <code>.pvtu</code> 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 <code>.pvtu</code> 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
+                                     * <code>.pvtu</code> 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 <code>pvtu</code>
+                                     * 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<std::string> &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<std::string> &piece_names) const;
 
                                     /**
                                      * Obtain data through get_patches()
index d51d72482eda7dfdea40b08ade0debc3b9312db8..12c772830c6bb498f80101423eadda70746bbc9d 100644 (file)
@@ -5342,6 +5342,19 @@ DataOutInterface<dim,spacedim>::write_pvtu_record (std::ostream &out,
 }
 
 
+
+template <int dim, int spacedim>
+void
+DataOutInterface<dim,spacedim>::write_visit_record (std::ostream &out,
+                                                  const std::vector<std::string> &piece_names) const
+{
+  out << "!NBLOCKS " << piece_names.size() << std::endl;
+  for (unsigned int i=0; i<piece_names.size(); ++i)
+    out << piece_names[i] << std::endl;
+}
+
+
+
 template <int dim, int spacedim>
 void DataOutInterface<dim,spacedim>::
 write_deal_II_intermediate (std::ostream &out) const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.