$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_GNUPLOT_IO_H 00021 #define LIBMESH_GNUPLOT_IO_H 00022 00023 // Local includes 00024 #include "libmesh/mesh_output.h" 00025 00026 // C++ includes 00027 #include <cstddef> 00028 00029 00030 namespace libMesh 00031 { 00032 00033 // forward declaration 00034 class MeshBase; 00035 00043 // ------------------------------------------------------------ 00044 // GnuPlotIO class definition 00045 class GnuPlotIO : public MeshOutput<MeshBase> 00046 { 00047 public: 00048 00052 enum PlottingProperties { GRID_ON = 1, 00053 PNG_OUTPUT = 2}; 00054 00061 explicit 00062 GnuPlotIO (const MeshBase&, 00063 const std::string& = std::string("FE 1D Solution"), 00064 int properties=0); 00065 00069 virtual void write(const std::string&); 00070 00075 virtual void write_nodal_data (const std::string&, 00076 const std::vector<Number>&, 00077 const std::vector<std::string>&); 00078 00082 void set_title(const std::string& title) { _title = title; } 00083 00087 void use_grid(bool grid) { _grid = grid; } 00088 00089 00093 void set_png_output(bool png_output) { _png_output = png_output; } 00094 00103 std::string axes_limits; 00104 00105 private: 00111 void write_solution (const std::string&, 00112 const std::vector<Number>* = NULL, 00113 const std::vector<std::string>* = NULL); 00114 00115 std::string _title; 00116 00117 bool _grid; 00118 bool _png_output; 00119 }; 00120 00121 } // namespace libMesh 00122 00123 00124 #endif // LIBMESH_GNUPLOT_IO_H