]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix my incorrect understanding of the AVS UCD format for cell data.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 1999 08:42:45 +0000 (08:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 1999 08:42:45 +0000 (08:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@1014 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/data_io.cc

index e286f45a1c14c496edee9a07565b130d054c250d..c2c54446e398588a0acab431ed88e6a242f0b05d 100644 (file)
@@ -426,6 +426,27 @@ void DataOut<dim>::write_ucd (ostream &out) const {
            out << (*cell_data[i].data)(index) << ' ';
          out << endl;
        };
+
+                                      // strange enough, but true: the ucd
+                                      // format requires that the number of
+                                      // cell data entries be the same as
+                                      // there were cells. cells however
+                                      // include those boundary faces with
+                                      // an indicator other than zero, so
+                                      // we may have printed faces as well
+                                      // in the above list of cells. we
+                                      // have to give respective values
+                                      // here as well. since faces have no
+                                      // natural value when cell data is
+                                      // concerned, we assign a zero.
+      for (unsigned int i=0; i<n_boundary_faces(); ++i, ++index)
+       {
+         out << index << "  ";
+         for (unsigned int j=0; j!=cell_data.size(); ++j)
+           out << "0 ";
+         out << endl;
+       };
+      
     };
   
                                   // no model data

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.