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;
1078 template <
int dim,
int spacedim>
1080 std::ostream &out)
const;
1085 template <
int dim,
int spacedim>
1087 std::ostream &out)
const;
1117 template <
int dim,
int spacedim>
1119 const std::string &filename_without_extension,
1120 const bool view_levels=
false,
1121 const bool include_artificial=
false)
const;
1127 template <
int dim,
int spacedim>
1136 template <
int dim,
int spacedim>
1363 template <
int dim,
int spacedim>
1366 const unsigned int next_element_index,
1367 std::ostream &out)
const;
1374 const unsigned int next_element_index,
1375 std::ostream &out)
const;
1382 const unsigned int next_element_index,
1383 std::ostream &out)
const;
1386 const unsigned int next_element_index,
1387 std::ostream &out)
const;
1416 template <
int dim,
int spacedim>
1419 const unsigned int next_element_index,
1420 std::ostream &out)
const;
1427 const unsigned int next_element_index,
1428 std::ostream &out)
const;
1436 const unsigned int next_element_index,
1437 std::ostream &out)
const;
1440 const unsigned int next_element_index,
1441 std::ostream &out)
const;
1447 const unsigned int next_element_index,
1448 std::ostream &out)
const;
1455 const unsigned int next_element_index,
1456 std::ostream &out)
const;
1483 template <
int dim,
int spacedim>
1486 const unsigned int next_element_index,
1487 std::ostream &out)
const;
1494 const unsigned int next_element_index,
1495 std::ostream &out)
const;
1503 const unsigned int next_element_index,
1504 std::ostream &out)
const;
1507 const unsigned int next_element_index,
1508 std::ostream &out)
const;
1536 template <
int dim,
int spacedim>
1539 const unsigned int next_element_index,
1540 std::ostream &out)
const;
1547 const unsigned int next_element_index,
1548 std::ostream &out)
const;
1555 const unsigned int next_element_index,
1556 std::ostream &out)
const;
1559 const unsigned int next_element_index,
1560 std::ostream &out)
const;
1568 const unsigned int next_element_index,
1569 std::ostream &out)
const;
1576 const unsigned int next_element_index,
1577 std::ostream &out)
const;
1594 float camera_focus);
1608 template <
int dim,
int spacedim>
1636 template <
int dim,
int spacedim>
1666 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)
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.
void write_eps(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=0) const
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()
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.
void write_gnuplot(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=0) const
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.
void write(const Triangulation< dim, spacedim > &tria, std::ostream &out, const OutputFormat output_format, const Mapping< dim, spacedim > *mapping=0) const
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)
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...
GridOutFlags::Vtu vtu_flags
unsigned int width
The width of the plot. Computed automatically from height if zero (default)
void write_xfig(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=0) const
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