PLaSK library
Loading...
Searching...
No Matches
generator_triangular.hpp
Go to the documentation of this file.
1/*
2 * This file is part of PLaSK (https://plask.app) by Photonics Group at TUL
3 * Copyright (c) 2022 Lodz University of Technology
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef PLASK__GENERATOR_TRIANGULAR_H
15#define PLASK__GENERATOR_TRIANGULAR_H
16
17#include "mesh.hpp"
18
19namespace plask {
20
32
33 shared_ptr<MeshD<2>> generate(const shared_ptr<GeometryObjectD<DIM>>& geometry) override;
34
38 optional<double> maxTriangleArea;
39
41 void setMaxTriangleArea(double area) {
42 maxTriangleArea.reset(area);
43 fireChanged();
44 }
45
48 maxTriangleArea.reset();
49 fireChanged();
50 }
51
55 optional<double> minTriangleAngle;
56
59 minTriangleAngle.reset(angle);
60 fireChanged();
61 }
62
65 minTriangleAngle.reset();
66 fireChanged();
67 }
68
72 bool delaunay = true;
73
77 bool full = false;
78
80 void setFull(bool value) {
81 full = value;
82 fireChanged();
83 }
84
85private:
86
91 std::string getSwitches() const;
92
93
94};
95
96} // namespace plask
97
98#endif // PLASK__GENERATOR_TRIANGULAR_H