Loading...
Searching...
No Matches
tree_constants.hpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25#ifndef __BITPIT_PABLO_TREE_CONSTANTS_HPP__
26#define __BITPIT_PABLO_TREE_CONSTANTS_HPP__
27
28// =================================================================================== //
29// INCLUDES //
30// =================================================================================== //
31#include "bitpit_common.hpp"
32
33#include <stdint.h>
34
35#include <array>
36#include <vector>
37
38namespace bitpit {
39
54
55public:
56 // =================================================================================== //
57 // TYPEDEFS
58 // =================================================================================== //
59 typedef std::array<TreeConstants, 4> Instances;
60
61 // =================================================================================== //
62 // STATIC MEMBERS
63 // =================================================================================== //
64 BITPIT_PUBLIC_API static const TreeConstants & instance(uint8_t dim);
65 BITPIT_PUBLIC_API static const Instances & instances();
66
67 // =================================================================================== //
68 // MEMBERS
69 // =================================================================================== //
70 int8_t maxLevel;
72 uint8_t nChildren;
73 uint8_t nFaces;
74 uint8_t nEdges;
75 uint8_t nNodes;
76 uint8_t nNodesPerFace;
78 uint8_t oppositeFace[6];
79 uint8_t nodeFace[8][3];
80 uint8_t nodeEdge[8][3];
81 uint8_t faceNode[6][4];
82 uint8_t edgeFace[12][2];
83 uint8_t edgeNode[12][2];
84 int8_t normals[6][3];
85 int8_t edgeCoeffs[12][3];
86 int8_t nodeCoeffs[8][3];
87 uint8_t parallelEdges[12][3];
89 uint8_t nodeCoordinates[8][3];
90 uint8_t edgeDisplacements[12][3];
91 uint8_t faceDisplacements[6][3];
93 uint8_t nodeFromCoordinates[2][2][2];
95 std::vector<uint32_t> lengths;
96 std::vector<uint64_t> areas;
97 std::vector<uint64_t> volumes;
99private:
100 // =================================================================================== //
101 // METHODS
102 // =================================================================================== //
103 TreeConstants(uint8_t dim);
104
105 void initialize(uint8_t dim);
106
107};
108
109}
110
111#endif /* __BITPIT_PABLO_TREE_CONSTANTS_HPP__ */
Global constants associated to a PABLO tree.
uint8_t edgeDisplacements[12][3]
std::vector< uint64_t > volumes
uint8_t faceDisplacements[6][3]
static BITPIT_PUBLIC_API const Instances & instances()
uint8_t parallelEdges[12][3]
std::vector< uint32_t > lengths
uint8_t nodeFromCoordinates[2][2][2]
static BITPIT_PUBLIC_API const TreeConstants & instance(uint8_t dim)
std::vector< uint64_t > areas
uint8_t nodeCoordinates[8][3]
--- layout: doxygen_footer ---