struct UcdFlags
{
/**
- * Write a comment at the beginning
- * of the file stating the date of
- * creation and some other data.
- * While this is supported by the
- * UCD format and @ref SoftwareAVS,
- * some other programs get confused
- * by this, so you can switch it off
- * this way.
+ * Write a comment at the
+ * beginning of the file
+ * stating the date of
+ * creation and some other
+ * data. While this is
+ * supported by the UCD
+ * format and @ref
+ * SoftwareAVS, some other
+ * programs get confused by
+ * this, so the default is to
+ * not write a
+ * preamble. However, a
+ * preamble can be written
+ * using this flag.
*
- * Default: <tt>true</tt>.
+ * Default: <code>false</code>.
*/
bool write_preamble;
/**
* Constructor.
*/
- UcdFlags (const bool write_preamble = true);
+ UcdFlags (const bool write_preamble = false);
/**
* Declare all flags with name
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
struct Ucd
{
/**
- * Write a comment at the beginning
- * of the file stating the date of
- * creation and some other data.
- * While this is supported by the
- * UCD format (and the AVS program),
- * some other programs get confused
- * by this, so you can switch it off
- * this way.
+ * Write a comment at the
+ * beginning of the file
+ * stating the date of creation
+ * and some other data. While
+ * this is supported by the UCD
+ * format (and the AVS
+ * program), some other
+ * programs get confused by
+ * this, so the default is to
+ * not write a
+ * preamble. However, a
+ * preamble can be written
+ * using this flag.
*
- * Default: @p true.
+ * Default: <code>false</code>.
*/
bool write_preamble;
/**
* Constructor.
*/
- Ucd (const bool write_preamble = true,
+ Ucd (const bool write_preamble = false,
const bool write_faces = false,
const bool write_lines = false);
</p>
<ol>
+ <li> <p>Changed: When writing output files in UCD format using either the
+ DataOutBase or the GridOut class, we used to write a preamble at the
+ beginning of the file that included the date and time the file was created.
+ However, several visualization programs get confused when confronted with
+ comments at the beginning of UCD files. Rather than printing a sensible
+ error message, they usually simply refuse to show any output, making it
+ very hard to track down the actual cause.
+ <br>
+ The classes mentioned above previously allowed to suppress writing a preamble
+ by setting a flag in the DataOutBase::UcdFlags or GridOutFlags::Ucd
+ structures. Given how complicated it is to find the actual
+ source of trouble, the default for these flags has been changed to not
+ produce this preamble any more. If desired, the flag can be used to still
+ produce a preamble.
+ <br>
+ (WB 2007/10/30)
+ </p>
+
<li> <p>Changed: The version number of the deal.II intermediate format written by
DataOutBase::write_deal_II_intermediate has been increased to 3 to accomodate the fact that
we now support writing vector-valued data to output files in at least some output formats.
DataOutBase::GnuplotFlags gnuplotflags;
DataOutBase::GmvFlags gmvflags;
DataOutBase::PovrayFlags povrayflags;
- DataOutBase::UcdFlags ucdflags;
+ DataOutBase::UcdFlags ucdflags(true);
DataOutBase::VtkFlags vtkflags;
DataOutBase::Deal_II_IntermediateFlags deal_II_intermediateflags;
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2003, 2004, 2005, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out.build_patches ();
data_out.write_dx (deallog.get_file_stream());
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (deallog.get_file_stream());
data_out.write_gmv (deallog.get_file_stream());
data_out.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004 by the deal.II authors
+// Copyright (C) 2003, 2004, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out.build_patches ();
data_out.write_dx (deallog.get_file_stream());
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (deallog.get_file_stream());
data_out.write_gmv (deallog.get_file_stream());
data_out.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2006 by the deal.II authors
+// Copyright (C) 2003, 2004, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_faces.build_patches ();
data_out_faces.write_dx (deallog.get_file_stream());
+ data_out_faces.set_flags (DataOutBase::UcdFlags(true));
data_out_faces.write_ucd (deallog.get_file_stream());
data_out_faces.write_gmv (deallog.get_file_stream());
data_out_faces.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2006 by the deal.II authors
+// Copyright (C) 2003, 2004, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_faces.build_patches ();
data_out_faces.write_dx (deallog.get_file_stream());
+ data_out_faces.set_flags (DataOutBase::UcdFlags(true));
data_out_faces.write_ucd (deallog.get_file_stream());
data_out_faces.write_gmv (deallog.get_file_stream());
data_out_faces.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2006 by the deal.II authors
+// Copyright (C) 2003, 2004, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_rotation.build_patches (4);
data_out_rotation.write_dx (deallog.get_file_stream());
+ data_out_rotation.set_flags (DataOutBase::UcdFlags(true));
data_out_rotation.write_ucd (deallog.get_file_stream());
data_out_rotation.write_gmv (deallog.get_file_stream());
data_out_rotation.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2006 by the deal.II authors
+// Copyright (C) 2003, 2004, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_rotation.build_patches (4);
data_out_rotation.write_dx (deallog.get_file_stream());
+ data_out_rotation.set_flags (DataOutBase::UcdFlags(true));
data_out_rotation.write_ucd (deallog.get_file_stream());
data_out_rotation.write_gmv (deallog.get_file_stream());
data_out_rotation.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004 by the deal.II authors
+// Copyright (C) 2003, 2004, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_stack.finish_parameter_value ();
data_out_stack.write_dx (deallog.get_file_stream());
+ data_out_stack.set_flags (DataOutBase::UcdFlags(true));
data_out_stack.write_ucd (deallog.get_file_stream());
data_out_stack.write_gmv (deallog.get_file_stream());
data_out_stack.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004 by the deal.II authors
+// Copyright (C) 2003, 2004, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out_stack.finish_parameter_value ();
data_out_stack.write_dx (deallog.get_file_stream());
+ data_out_stack.set_flags (DataOutBase::UcdFlags(true));
data_out_stack.write_ucd (deallog.get_file_stream());
data_out_stack.write_gmv (deallog.get_file_stream());
data_out_stack.write_tecplot (deallog.get_file_stream());
// $Id$
// Version: $Name$
//
-// Copyright (C) 2005, 2006 by the deal.II authors
+// Copyright (C) 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
deallog <<"moebius, no rotation" << std::endl;
Triangulation<dim> tr;
GridGenerator::moebius(tr, 20, 0, 10.0, 2.0);
- GridOut().write_ucd(tr, out);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tr, out);
}
// loop with quarter rotation (1 * pi/2)
<< "moebius, quarter rotation (1* Pi/2)" << std::endl;
Triangulation<dim> tr;
GridGenerator::moebius(tr, 20, 1, 10.0, 2.0);
- GridOut().write_ucd(tr, out);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tr, out);
}
// loop with half rotation (2 * pi/2)
<< "moebius, half rotation (2* Pi/2)" << std::endl;
Triangulation<dim> tr;
GridGenerator::moebius(tr, 20, 2, 10.0, 2.0);
- GridOut().write_ucd(tr, out);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tr, out);
}
// loop with three quarter rotation (3 * pi/2)
<< "moebius, three quarter rotation (3* Pi/2)" << std::endl;
Triangulation<dim> tr;
GridGenerator::moebius(tr, 20, 3, 10.0, 2.0);
- GridOut().write_ucd(tr, out);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tr, out);
}
// loop with full rotation (1 * pi/2)
<< "moebius, full rotation (2* Pi)" << std::endl;
Triangulation<dim> tr;
GridGenerator::moebius(tr, 20, 4, 10.0, 2.0);
- GridOut().write_ucd(tr, out);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tr, out);
}
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
data_out.write_dx (logfile);
data_out.write_gmv (logfile);
data_out.write_gnuplot (logfile);
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (logfile);
data_out.write_povray (logfile);
data_out.write_eps (logfile);
data_out.write_dx (logfile);
data_out.write_gmv (logfile);
data_out.write_gnuplot (logfile);
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (logfile);
};
}
data_out.write_dx (logfile);
data_out.write_gmv (logfile);
data_out.write_gnuplot (logfile);
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (logfile);
};
data_out.write_dx (logfile);
data_out.write_gmv (logfile);
data_out.write_gnuplot (logfile);
+ data_out.set_flags (DataOutBase::UcdFlags(true));
data_out.write_ucd (logfile);
};
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
gi.read_ucd (in);
GridOut grid_out;
+ grid_out.set_flags (GridOutFlags::Ucd(true));
grid_out.write_ucd (tria, logfile);
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
<<"output for grid in "<<infilename<<std::endl;
GridOut grid_out;
+ grid_out.set_flags (GridOutFlags::Ucd(true));
grid_out.write_ucd (tria, logfile);
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
<<std::endl<<std::endl;
GridOut grid_out;
+ grid_out.set_flags (GridOutFlags::Ucd(true));
grid_out.write_ucd (tria, logfile);
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
if (dim != 1)
grid_out.write_eps (tria, logfile);
grid_out.write_gnuplot (tria, logfile);
+ grid_out.set_flags (GridOutFlags::Ucd(true));
grid_out.write_ucd (tria, logfile);
if (dim != 1)
grid_out.write_dx (tria, logfile);
}
}
- GridOut().write_ucd (tria, logfile);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd (tria, logfile);
deallog << " Total number of cells = " << tria.n_cells() << std::endl
<< " Total number of active cells = " << tria.n_active_cells() << std::endl;
cell->set_refine_flag();
tria.execute_coarsening_and_refinement ();
// write grid to file
- GridOut().write_ucd(tria,logfile);
+ GridOut go;
+ go.set_flags (GridOutFlags::Ucd(true));
+ go.write_ucd(tria,logfile);
// coarsen the first cell again
cell=tria.begin_active(1);
for (unsigned int c=0;c<8; ++c)
}
tria.execute_coarsening_and_refinement ();
- GridOut().write_ucd(tria,logfile);
+ go.write_ucd(tria,logfile);
}