]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Adapted the new changes in GridOut.
authorschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 1999 14:51:02 +0000 (14:51 +0000)
committerschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 1999 14:51:02 +0000 (14:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@1523 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/chapter-1.elements/output.html

index f46f737a51cdfe91658c1dd8ed4f20ccb88786eb..04f07f0b37d09715d0f010b36a95dc1271bf8d22 100644 (file)
@@ -57,6 +57,9 @@ The graphics formats available in <code>DataOut</code> are:
 The graphics formats available in <code>GridOut</code> are:
 </p>
 <ul>
+  <li><a href="#grid_ucd">Unstructured Cell Data (ucd)</a>
+  </li>
+
   <li><a href="#grid_gnuplot">Gnuplot</a>
   </li>
 
@@ -90,9 +93,9 @@ to a file if you want to use the data later on.
 <tr>
   <td><b>Step</b>
   </td>
-  <td><b>Function</b>
+  <td><b>What to do</b>
   </td>
-  <td><b>Call</b>
+  <td><b>Function call</b>
   </td>
 </tr>
 <tr>
@@ -143,14 +146,14 @@ to a file if you want to use the data later on.
   <td>Generate an <code>ostream</code> (and, normally, attach it to a file).
   </td>
   <td><code>
-      ostream out;
+      ofstream out("filename");
       </code>
   </td>
 </tr>
 <tr>
   <td>6.
   </td>
-  <td>Write your data to this ostream. The second parameter denotes the 
+  <td>Write your data to this ofstream. The second parameter denotes the 
       output format to be used. It must be one of <code>ucd, gnuplot, 
       gnuplot_draft,
       povray_mesh, eps, epsgrid, gmv</code>.
@@ -310,19 +313,70 @@ What exactly it is you need to do in order to make use of the
 <code>GridOut</code> 
 class is described in the table below. Note that data is written to an 
 <code>ostream</code>. That means you have to attach your <code>ostream</code>
-to a file if you want to use the data later on. Note also that all the
-methods are static. There is no need to create a
-<code>GridOut</code> object.
+to a file if you want to use the data later on.
+</p>
+
+<p>
+There are essentially two ways to use <code>GridOut</code>: If you don't need
+to change any of the default parameters (which will be explained along with 
+the graphics formats) you can use the class almost as if its methods
+were static. There is no need to create a <code>GridOut</code> object
+in advance.
+</p>
+
+<p>
+The second method requires the creation of a <code>GridOut</code> object
+to which parameters can be passed. 
 </p>
 
 <table>
-<caption><b>Usage of the <code>GridOut</code> class</b></caption>
+<caption><b>Usage of the <code>GridOut</code> class with the default parameters<b></caption>
 <tr>
   <td><b>Step</b>
   </td>
-  <td><b>Function</b>
+  <td><b>What to do</b>
   </td>
-  <td><b>Call</b>
+  <td><b>Function call</b>
+  </td>
+</tr>
+<tr>
+  <td>1.</td>
+  <td>Use the correct include-file.
+  </td>
+  <td><code>#include &lt;basic/grid_out.h&gt;</code>
+  </td>
+</tr>
+<tr>
+  <td>2.
+  </td>
+  <td>Generate an <code>ostream</code> (and, normally, attach it to a file).
+  </td>
+  <td><code>
+      ofstream out("filename");
+      </code>
+  </td>
+</tr>
+<tr>
+  <td>3.
+  </td>
+  <td>Write your data to the ofstream by calling the appropriate 
+      <code>write</code> method giving your triangulation object and
+      the output file type as parameters. <code>output_format</code>
+      is one of {ucd,gnuplot, eps}.
+  </td>
+  <td><code>void GridOut().write(const Triangulation&lt;dim&gt; &amp; tria,ostream &amp;out, const OutputFormat output_format)</code><br>        
+  </td>
+</tr>
+</table>
+
+<table>
+<caption><b>Usage of the <code>GridOut</code> class with new parameters<b></caption>
+<tr>
+  <td><b>Step</b>
+  </td>
+  <td><b>What to do</b>
+  </td>
+  <td><b>Function call</b>
   </td>
 </tr>
 <tr>
@@ -345,22 +399,73 @@ methods are static. There is no need to create a
 <tr>
   <td>3.
   </td>
-  <td>Write your data to this ostream by calling the appropriate 
+  <td>Generate a <code>GridOut&lt;dim&gt;</code> object.
+  </td>
+  <td><code>GridOut&lt;dim&gt; my_grid_out;</code><br>   
+  </td>
+</tr>
+<tr>
+  <td>4.
+  </td>
+  <td>Set your parameters (in this example for ucd).
+  </td>
+  <td><code>GridOut::UcdFlags ucd_flags;<br> 
+      ucd_flags.write_preamble = 1;<br>
+      my_grid_out.set_flags(ucd_flags);
+      </code>
+  </td>
+</tr>
+<tr>
+  <td>5.
+  </td>
+  <td>Write your data to the ostream by calling the appropriate 
       <code>write</code> method giving your triangulation object and
       the output file type as parameters. <code>output_format</code>
-      is one of {gnuplot, eps}.
+      is one of {ucd,gnuplot, eps}.
   </td>
-  <td><code>void GridOut&lt;dim&gt;::write(const Triangulation&lt;dim&gt; &amp; tria,ostream &amp;out, cont OutputFormat output_format)</code><br>       
+  <td><code>void my_grid_out.write(const Triangulation&lt;dim&gt; &amp; tria,ostream &amp;out, const OutputFormat output_format)</code><br>      
   </td>
 </tr>
 </table>
 
 <h2><a name="gridout_formats"><code>GridOut</code> data formats</a></h2>
 
+
+<h3><a name="grid_ucd">ucd data format</a></h3>
+
+<p>
+The ucd data format is described in the AVS developer's guide. There
+are a binary and a ASCII version of this format. <acronym>deal.II</acronym>
+uses the ASCII ucd format.
+</p>
+
+<p>
+The ucd data format is special because it can not only be written but
+also read by <acronym>deal.II</acronym>. I.e. you can use a triangulation
+written to a ucd-file as a starting triangulation for 
+<acronym>deal.II</acronym>. In order to be able to reuse your triangulation
+you will need to explicitly write all of your boundary indicators that
+are not zero to the output file. Otherwise, upon reloading the triangulation,
+all your boundaries will be labelled with the default value, zero.
+There is a flag controlling <code>GridOut</code> with respect to whether
+boundary indicators are explicitly written: 
+<code>bool GridOut::UcdFlags::write_preamble</code>. It defaults to true, i.e.
+boundary indicators are written by default and you can use the first,
+simpler method for writing ucd-files.
+</p>
+
 <h3><a name="grid_gnuplot">Gnuplot data format</a></h3>
 
+<p>
+</p>
+
 <h3><a name="grid_eps">Encapsulated Postscript</a></h3>
 
+<p>
+</p>
+
+
+
 <!-- Page Foot -->
 <hr>
 <table class="navbar">      

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.