LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
write_tikz.h
1/***************************************************************************
2 * LehrFEM++ - A simple C++ finite element libray for teaching
3 * Developed from 2018 at the Seminar of Applied Mathematics of ETH Zurich,
4 * lead developers Dr. R. Casagrande and Prof. R. Hiptmair
5 ***************************************************************************/
6
7#ifndef WRITE_TIKZ_H
8#define WRITE_TIKZ_H
9
10#include <lf/mesh/mesh.h>
11
12#include <string>
13#include <vector>
14
15#include "lf/mesh/hybrid2d/hybrid2d.h"
16
17namespace lf::io {
18
24enum class TikzOutputCtrl : unsigned int {
25 RenderCells = 1,
26 CellNumbering = 2,
28 NodeNumbering = 8,
29 EdgeNumbering = 16,
30 ArrowTips = 32,
31 WithPreamble = 64
32};
33
36
130bool writeTikZ(const lf::mesh::Mesh &mesh, const std::string &filename,
131 std::function<bool(const lf::mesh::Entity &)> &&selector,
133
141bool writeTikZ(const lf::mesh::Mesh &mesh, const std::string &filename,
143
144} // namespace lf::io
145
146#endif // WRITE_TIKZ_H
Interface class representing a topological entity in a cellular complex
Definition: entity.h:39
Abstract interface for objects representing a single mesh.
Mesh input (from file) and output (in various formats) facilities.
Definition: gmsh_file_v2.cc:35
TikzOutputCtrl
Enum flags: TikzOutputCtrl for output control of mesh drawn in TikZ.
Definition: write_tikz.h:24
bool writeTikZ(const lf::mesh::Mesh &mesh, const std::string &filename, std::function< bool(const lf::mesh::Entity &)> &&selector, TikzOutputCtrl output_ctrl)
Writes mesh to file in TikZ Graphics format. File as input in LaTeX will draw the mesh.
Definition: write_tikz.cc:23
TikzOutputCtrl operator&(const TikzOutputCtrl &lhs, const TikzOutputCtrl &rhs)
Definition: write_tikz.cc:18
TikzOutputCtrl operator|(const TikzOutputCtrl &lhs, const TikzOutputCtrl &rhs)
Definition: write_tikz.cc:13