PLaSK library

Loading...
Searching...
No Matches
equilateral3d.cpp
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#include "equilateral3d.hpp"
15#include "equilateral3d.hpp"
16
17 namespace plask {
18
19 EquilateralMesh3D::EquilateralMesh3D(IterationOrder iterationOrder, Vec<3> vec0, Vec<3> vec1, Vec<3> vec2):
20 RectilinearMesh3D(iterationOrder), trans{vec0.c0, vec1.c0, vec2.c0, vec0.c1, vec1.c1, vec2.c1, vec0.c2, vec1.c2, vec2.c2} {
21 findInverse();
22 }
23
24 EquilateralMesh3D::EquilateralMesh3D(shared_ptr<MeshAxis> mesh0, shared_ptr<MeshAxis> mesh1, shared_ptr<MeshAxis> mesh2, IterationOrder iterationOrder,
25 Vec<3> vec0, Vec<3> vec1, Vec<3> vec2):
26 RectilinearMesh3D(std::move(mesh0), std::move(mesh1), std::move(mesh2), iterationOrder),
27 trans{vec0.c0, vec1.c0, vec2.c0, vec0.c1, vec1.c1, vec2.c1, vec0.c2, vec1.c2, vec2.c2} {
28 findInverse();
29 }
30
31 shared_ptr<EquilateralMesh3D::ElementMesh> EquilateralMesh3D::getElementMesh() const {
32 return plask::make_shared<EquilateralMesh3D::ElementMesh>(this, axis[0]->getMidpointAxis(), axis[1]->getMidpointAxis(), axis[2]->getMidpointAxis(),
33 getIterationOrder(), getVec0(), getVec1(), getVec2());
34}
35
36} // namespace plask