Documentation 6b54b78464
Loading...
Searching...
No Matches
CFaceOfElement.hpp
Go to the documentation of this file.
1/*!
2 * \file CFaceOfElement.hpp
3 * \brief Header file for the class CFaceOfElement.
4 * The implementations are in the <i>CFaceOfElement.cpp</i> file.
5 * \author E. van der Weide
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include "../../code_config.hpp"
32#include "../../option_structure.hpp"
33#include <iostream>
34#include <algorithm>
35#include <climits>
36
37/*!
38 * \class CFaceOfElement
39 * \brief Class used in the partitioning of the FEM grid as well as the building of
40 the faces of DG. It stores a face of an element.
41 */
43 public:
44 unsigned short nCornerPoints; /*!< \brief Number of corner points of the face. */
45 unsigned long cornerPoints[4]; /*!< \brief Global ID's of ther corner points. */
46 unsigned long elemID0, elemID1; /*!< \brief Element ID's to the left and right. */
47 unsigned short nPolyGrid0, nPolyGrid1; /*!< \brief Polynomial degrees of the grid of the elements
48 to the left and right. */
49 unsigned short nPolySol0, nPolySol1; /*!< \brief Polynomial degrees of the solution of the elements
50 to the left and right. */
51 unsigned short nDOFsElem0, nDOFsElem1; /*!< \brief Number of DOFs of the elements to the left and right. */
52 unsigned short elemType0, elemType1; /*!< \brief Type of the elements to the left and right. */
53 unsigned short faceID0, faceID1; /*!< \brief The local face ID in the corresponding elements
54 to the left and right of the face. */
55 unsigned short periodicIndex; /*!< \brief Periodic indicator of the face. A value of 0 means no
56 periodic face. A value larger than 0 gives the index of
57 the periodic boundary + 1. */
58 unsigned short periodicIndexDonor; /*!< \brief Periodic indicator of the donor face. A value of 0 means no
59 periodic donor face. A value larger than 0 gives the index of
60 the periodic donor boundary + 1. */
61 short faceIndicator; /*!< \brief The corresponding boundary marker if this face is on a
62 boundary. For an internal face the value is -1,
63 while an invalidated face has the value -2. */
64 bool JacFaceIsConsideredConstant; /*!< \brief Whether or not the Jacobian of the transformation
65 to the standard element is considered constant. */
66 bool elem0IsOwner; /*!< \brief Whether or not the neighboring element 0 is the owner
67 of the face. If false, element 1 is the owner. */
68
69 /* Constructor. Initialize the member variables. */
71
72 /* Alternative constructor to set the corner points. */
73 CFaceOfElement(const unsigned short VTK_Type, const unsigned short nPoly, const unsigned long* Nodes);
74
75 /* Copy constructor and assignment operator. */
76 inline CFaceOfElement(const CFaceOfElement& other) { Copy(other); }
77
78 inline CFaceOfElement& operator=(const CFaceOfElement& other) {
79 Copy(other);
80 return (*this);
81 }
82
83 /* Less than operator. Needed for the sorting and searching. */
84 bool operator<(const CFaceOfElement& other) const;
85
86 /* Equal operator. Needed for removing double entities. */
87 bool operator==(const CFaceOfElement& other) const;
88
89 /*--- Member function, which creates a unique numbering for the corner points.
90 A sort in increasing order is OK for this purpose. ---*/
92
93 /*--- Member function, which creates a unique numbering for the corner points
94 while the orientation is taken into account. ---*/
96
97 private:
98 /*--- Copy function, which copies the data of the given object into the current object. ---*/
99 void Copy(const CFaceOfElement& other);
100};
Class used in the partitioning of the FEM grid as well as the building of the faces of DG....
Definition CFaceOfElement.hpp:42
unsigned short nDOFsElem1
Number of DOFs of the elements to the left and right.
Definition CFaceOfElement.hpp:51
unsigned long cornerPoints[4]
Global ID's of ther corner points.
Definition CFaceOfElement.hpp:45
unsigned short nPolyGrid1
Polynomial degrees of the grid of the elements to the left and right.
Definition CFaceOfElement.hpp:47
CFaceOfElement & operator=(const CFaceOfElement &other)
Definition CFaceOfElement.hpp:78
unsigned short nPolyGrid0
Definition CFaceOfElement.hpp:47
unsigned short nCornerPoints
Number of corner points of the face.
Definition CFaceOfElement.hpp:44
bool elem0IsOwner
Whether or not the neighboring element 0 is the owner of the face. If false, element 1 is the owner.
Definition CFaceOfElement.hpp:66
unsigned short periodicIndexDonor
Periodic indicator of the donor face. A value of 0 means no periodic donor face. A value larger than ...
Definition CFaceOfElement.hpp:58
short faceIndicator
The corresponding boundary marker if this face is on a boundary. For an internal face the value is -1...
Definition CFaceOfElement.hpp:61
unsigned short nPolySol1
Polynomial degrees of the solution of the elements to the left and right.
Definition CFaceOfElement.hpp:49
unsigned long elemID1
Element ID's to the left and right.
Definition CFaceOfElement.hpp:46
void CreateUniqueNumberingWithOrientation()
Definition CFaceOfElement.cpp:145
unsigned short faceID0
Definition CFaceOfElement.hpp:53
unsigned short periodicIndex
Periodic indicator of the face. A value of 0 means no periodic face. A value larger than 0 gives the ...
Definition CFaceOfElement.hpp:55
unsigned long elemID0
Definition CFaceOfElement.hpp:46
unsigned short elemType0
Definition CFaceOfElement.hpp:52
bool operator<(const CFaceOfElement &other) const
Definition CFaceOfElement.cpp:100
unsigned short faceID1
The local face ID in the corresponding elements to the left and right of the face.
Definition CFaceOfElement.hpp:53
void CreateUniqueNumbering()
Definition CFaceOfElement.hpp:91
CFaceOfElement()
Definition CFaceOfElement.cpp:31
bool JacFaceIsConsideredConstant
Whether or not the Jacobian of the transformation to the standard element is considered constant.
Definition CFaceOfElement.hpp:64
CFaceOfElement(const CFaceOfElement &other)
Definition CFaceOfElement.hpp:76
unsigned short elemType1
Type of the elements to the left and right.
Definition CFaceOfElement.hpp:52
unsigned short nPolySol0
Definition CFaceOfElement.hpp:49
unsigned short nDOFsElem0
Definition CFaceOfElement.hpp:51
bool operator==(const CFaceOfElement &other) const
Definition CFaceOfElement.cpp:109