16 #ifndef dealii_grid_out_h 17 #define dealii_grid_out_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/base/data_out_base.h> 28 DEAL_II_NAMESPACE_OPEN
32 template <
int dim,
int spacedim>
class Mapping;
254 Gnuplot (
const bool write_cell_number =
false,
349 const unsigned int size = 300,
392 const unsigned int size = 300,
393 const double line_width = 0.5,
394 const bool color_lines_on_user_flag =
false,
395 const unsigned int n_boundary_face_points = 2);
444 const unsigned int size = 300,
445 const double line_width = 0.5,
446 const bool color_lines_on_user_flag =
false,
447 const unsigned int n_boundary_face_points = 2,
448 const bool write_cell_numbers =
false,
449 const bool write_cell_number_level =
true,
450 const bool write_vertex_numbers =
false,
451 const bool color_lines_level =
false);
492 const unsigned int size = 300,
493 const double line_width = 0.5,
494 const bool color_lines_on_user_flag =
false,
495 const unsigned int n_boundary_face_points = 2,
496 const double azimut_angle = 60,
497 const double turn_angle = 30);
884 template <
int dim,
int spacedim>
886 std::ostream &out)
const;
919 template <
int dim,
int spacedim>
942 template <
int dim,
int spacedim>
944 std::ostream &out)
const;
965 template <
int dim,
int spacedim>
967 std::ostream &out)
const;
998 template <
int dim,
int spacedim>
1021 template <
int dim,
int spacedim>
1045 std::ostream &out)
const;
1052 template <
int dim,
int spacedim>
1054 std::ostream &out)
const;
1071 template <
int dim,
int spacedim>
1073 std::ostream &out)
const;
1092 template <
int dim,
int spacedim>
1094 std::ostream &out)
const;
1113 template <
int dim,
int spacedim>
1115 std::ostream &out)
const;
1145 template <
int dim,
int spacedim>
1147 const std::string &filename_without_extension,
1148 const bool view_levels=
false,
1149 const bool include_artificial=
false)
const;
1155 template <
int dim,
int spacedim>
1164 template <
int dim,
int spacedim>
1391 template <
int dim,
int spacedim>
1394 const unsigned int next_element_index,
1395 std::ostream &out)
const;
1402 const unsigned int next_element_index,
1403 std::ostream &out)
const;
1410 const unsigned int next_element_index,
1411 std::ostream &out)
const;
1414 const unsigned int next_element_index,
1415 std::ostream &out)
const;
1444 template <
int dim,
int spacedim>
1447 const unsigned int next_element_index,
1448 std::ostream &out)
const;
1455 const unsigned int next_element_index,
1456 std::ostream &out)
const;
1464 const unsigned int next_element_index,
1465 std::ostream &out)
const;
1468 const unsigned int next_element_index,
1469 std::ostream &out)
const;
1475 const unsigned int next_element_index,
1476 std::ostream &out)
const;
1483 const unsigned int next_element_index,
1484 std::ostream &out)
const;
1511 template <
int dim,
int spacedim>
1514 const unsigned int next_element_index,
1515 std::ostream &out)
const;
1522 const unsigned int next_element_index,
1523 std::ostream &out)
const;
1531 const unsigned int next_element_index,
1532 std::ostream &out)
const;
1535 const unsigned int next_element_index,
1536 std::ostream &out)
const;
1564 template <
int dim,
int spacedim>
1567 const unsigned int next_element_index,
1568 std::ostream &out)
const;
1575 const unsigned int next_element_index,
1576 std::ostream &out)
const;
1583 const unsigned int next_element_index,
1584 std::ostream &out)
const;
1587 const unsigned int next_element_index,
1588 std::ostream &out)
const;
1596 const unsigned int next_element_index,
1597 std::ostream &out)
const;
1604 const unsigned int next_element_index,
1605 std::ostream &out)
const;
1622 float camera_focus);
1636 template <
int dim,
int spacedim>
1664 template <
int dim,
int spacedim>
1694 DEAL_II_NAMESPACE_CLOSE
void parse_parameters(ParameterHandler ¶m)
void parse_parameters(ParameterHandler ¶m)
unsigned int n_boundary_faces(const Triangulation< dim, spacedim > &tria) const
OutputFormat default_format
DX(const bool write_cells=true, const bool write_faces=false, const bool write_diameter=false, const bool write_measure=false, const bool write_all_faces=true)
static OutputFormat parse_output_format(const std::string &format_name)
bool margin
Margin around the plotted area.
Gnuplot(const bool write_cell_number=false, const unsigned int n_boundary_face_points=2, const bool curved_inner_cells=false)
void write_xfig(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=nullptr) const
unsigned int n_boundary_face_points
static void declare_parameters(ParameterHandler ¶m)
GridOutFlags::Eps< 2 > eps_flags_2
unsigned int height
Height of the plot in SVG units, computed from width if zero. Defaults to 1000.
bool draw_legend
Draw a legend next to the plotted grid, explaining the label of the cells.
void write_vtu(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
Use transparent value of SVG.
void parse_parameters(ParameterHandler ¶m)
void write_mesh_per_processor_as_vtu(const Triangulation< dim, spacedim > &tria, const std::string &filename_without_extension, const bool view_levels=false, const bool include_artificial=false) const
static void declare_parameters(ParameterHandler ¶m)
Convert the level number into the cell color.
write() calls write_eps()
unsigned int line_thickness
Thickness of the lines between cells.
unsigned int n_boundary_face_points
bool convert_level_number_to_height
Interpret the level number of the cells as altitude over the x-y-plane (useful in the perspective vie...
static Point< 2 > svg_project_point(Point< 3 > point, Point< 3 > camera_position, Point< 3 > camera_direction, Point< 3 > camera_horizontal, float camera_focus)
void write_mathgl(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
unsigned int boundary_line_thickness
Thickness of lines at the boundary.
unsigned int write_msh_faces(const Triangulation< dim, spacedim > &tria, const unsigned int next_element_index, std::ostream &out) const
void parse_parameters(ParameterHandler ¶m)
write() calls write_ucd()
void write_gnuplot(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=nullptr) const
unsigned int n_boundary_lines(const Triangulation< dim, spacedim > &tria) const
GridOutFlags::Vtk vtk_flags
bool label_cell_index
Write cell index into each cell. Defaults to true.
GridOutFlags::Gnuplot gnuplot_flags
void write_svg(const Triangulation< 2, 2 > &tria, std::ostream &out) const
Convert the global subdomain id into the cell color.
Convert the material id into the cell color.
static void declare_parameters(ParameterHandler ¶m)
std::size_t memory_consumption() const
GridOutFlags::MathGL mathgl_flags
write() calls write_mathgl()
GridOutFlags::DX dx_flags
GridOutFlags::Msh msh_flags
GridOutFlags::Eps< 1 > eps_flags_1
write() calls write_gnuplot()
bool write_cell_number_level
bool label_material_id
Write material id of each cell. Defaults to false.
EpsFlagsBase(const SizeType size_type=width, const unsigned int size=300, const double line_width=0.5, const bool color_lines_on_user_flag=false, const unsigned int n_boundary_face_points=2, const bool color_lines_level=false)
Abstract base class for mapping classes.
GridOutFlags::XFig xfig_flags
bool label_subdomain_id
Write subdomain id of each cell. Defaults to false.
#define DeclException0(Exception0)
Ucd(const bool write_preamble=false, const bool write_faces=false, const bool write_lines=false)
static void declare_parameters(ParameterHandler ¶m)
bool label_level_subdomain_id
Write level subdomain id of each cell. Defaults to false.
static std::string get_output_format_names()
Convert the subdomain id into the cell color.
Msh(const bool write_faces=false, const bool write_lines=false)
void write_vtk(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
GridOutFlags::Ucd ucd_flags
static void declare_parameters(ParameterHandler ¶m)
static void declare_parameters(ParameterHandler ¶m)
float cell_font_scaling
Scaling of the font for cell annotations. Defaults to 1.
Convert the level subdomain id into the cell color.
write() calls write_xfig()
bool write_vertex_numbers
Convert the level subdomain id into the cell color.
Convert the level into the cell color.
void parse_parameters(ParameterHandler ¶m)
unsigned int n_boundary_face_points
static void declare_parameters(ParameterHandler ¶m)
unsigned int write_ucd_faces(const Triangulation< dim, spacedim > &tria, const unsigned int next_element_index, std::ostream &out) const
write() calls write_msh()
void write_ucd(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
unsigned int write_ucd_lines(const Triangulation< dim, spacedim > &tria, const unsigned int next_element_index, std::ostream &out) const
write() calls write_svg()
unsigned int write_msh_lines(const Triangulation< dim, spacedim > &tria, const unsigned int next_element_index, std::ostream &out) const
GridOutFlags::Svg svg_flags
Svg(const unsigned int line_thickness=2, const unsigned int boundary_line_thickness=4, bool margin=true, const Background background=white, const int azimuth_angle=0, const int polar_angle=0, const Coloring coloring=level_number, const bool convert_level_number_to_height=false, const bool label_level_number=true, const bool label_cell_index=true, const bool label_material_id=false, const bool label_subdomain_id=false, const bool draw_colorbar=true, const bool draw_legend=true)
bool color_lines_on_user_flag
void parse_parameters(ParameterHandler ¶m)
void write_eps(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=nullptr) const
Convert the material id into the cell color (default)
float level_height_factor
The factor determining the vertical distance between levels (default = 0.3)
GridOutFlags::Eps< 3 > eps_flags_3
static ::ExceptionBase & ExcInvalidState()
write() calls write_vtu()
static void declare_parameters(ParameterHandler ¶m)
void set_flags(const GridOutFlags::DX &flags)
bool label_level_number
Write level number into each cell. Defaults to true.
void parse_parameters(ParameterHandler ¶m)
void write_dx(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
bool draw_colorbar
Draw a colorbar next to the plotted grid with respect to the chosen coloring of the cells...
void write(const Triangulation< dim, spacedim > &tria, std::ostream &out, const OutputFormat output_format, const Mapping< dim, spacedim > *mapping=nullptr) const
GridOutFlags::Vtu vtu_flags
unsigned int width
The width of the plot. Computed automatically from height if zero (default)
write() calls write_vtk()
void parse_parameters(ParameterHandler ¶m)
void write_msh(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
std::string default_suffix() const