PLaSK library

Loading...
Searching...
No Matches
rectangular.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__RECTANGULAR_H
15#define PLASK__RECTANGULAR_H
16
17#include "axis1d.hpp"
18#include "rectangular2d.hpp"
19#include "rectangular3d.hpp"
20
21#include "ordered1d.hpp"
22#include "regular1d.hpp"
23
24 namespace plask {
25
26 template <int DIM>
27 using RectangularMesh =
28 typename std::conditional<
29 DIM == 2,
30 RectangularMesh2D,
31 typename std::conditional<DIM == 3, RectangularMesh3D, void>::type
32 >::type;
33
34 template <int dim>
35 struct Rectangular_t {
36 typedef RectangularMesh<dim> Rectangular;
37 typedef RectangularMesh<dim> Regular;
38 typedef RectangularMesh<dim> Rectilinear;
39};
40
41 template <>
42 struct Rectangular_t<1> {
43 typedef MeshAxis Rectangular;
44 typedef RegularAxis Regular;
45 typedef OrderedAxis Rectilinear;
46};
47
48} // namespace plask
49
50
51
52#endif // PLASK__RECTANGULAR_H