Documentation 6b54b78464
Loading...
Searching...
No Matches
CReorderElements.hpp
Go to the documentation of this file.
1/*!
2 * \file CReorderElements.hpp
3 * \brief Header file for the class CReorderElements.
4 * The implementations are in the <i>CReorderElements.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 <iostream>
32
33using namespace std;
34
35/*!
36 * \class CReorderElements
37 * \brief Class, used to reorder the owned elements after the partitioning.
38 * \author E. van der Weide
39 * \version 8.5.0 "Harrier"
40 */
42 private:
43 unsigned long globalElemID; /*!< \brief Global element ID of the element. */
44 unsigned short timeLevel; /*!< \brief Time level of the element. Only relevant
45 for time accurate local time stepping. */
46 bool commSolution; /*!< \brief Whether or not the solution must be
47 communicated to other ranks. */
48 unsigned short elemType; /*!< \brief Short hand for the element type, Which
49 stored info of the VTK_Type, polynomial
50 degree of the solution and whether or
51 not the Jacobian is constant. */
52 public:
53 /*!
54 * \brief Constructor of the class, set the member variables to the arguments.
55 */
56 CReorderElements(const unsigned long val_GlobalElemID, const unsigned short val_TimeLevel,
57 const bool val_CommSolution, const unsigned short val_VTK_Type, const unsigned short val_nPolySol,
58 const bool val_JacConstant);
59
60 /*!
61 * \brief Default constructor of the class. Disabled.
62 */
63 CReorderElements() = delete;
64
65 /*!
66 * \brief Less than operator of the class. Needed for the sorting.
67 */
68 bool operator<(const CReorderElements& other) const;
69
70 /*!
71 * \brief Function to make available the variable commSolution.
72 * \return Whether or not the solution of the element must be communicated.
73 */
74 inline bool GetCommSolution() const { return commSolution; }
75
76 /*!
77 * \brief Function to make available the element type of the element.
78 * \return The value of elemType, which stores the VTK type, polynomial degree
79 and whether or not the Jacobian is constant.
80 */
81 inline unsigned short GetElemType() const { return elemType; }
82
83 /*!
84 * \brief Function to make available the global element ID.
85 * \return The global element ID of the element.
86 */
87 inline unsigned long GetGlobalElemID() const { return globalElemID; }
88
89 /*!
90 * \brief Function to make available the time level.
91 * \return The time level of the element.
92 */
93 inline unsigned short GetTimeLevel() const { return timeLevel; }
94
95 /*!
96 * \brief Function, which sets the value of commSolution.
97 * \param[in] val_CommSolution - value to which commSolution must be set.
98 */
99 inline void SetCommSolution(const bool val_CommSolution) { commSolution = val_CommSolution; }
100};
Class, used to reorder the owned elements after the partitioning.
Definition CReorderElements.hpp:41
void SetCommSolution(const bool val_CommSolution)
Function, which sets the value of commSolution.
Definition CReorderElements.hpp:99
unsigned short GetElemType() const
Function to make available the element type of the element.
Definition CReorderElements.hpp:81
CReorderElements()=delete
Default constructor of the class. Disabled.
unsigned short GetTimeLevel() const
Function to make available the time level.
Definition CReorderElements.hpp:93
bool operator<(const CReorderElements &other) const
Less than operator of the class. Needed for the sorting.
Definition CReorderElements.cpp:49
bool GetCommSolution() const
Function to make available the variable commSolution.
Definition CReorderElements.hpp:74
unsigned long GetGlobalElemID() const
Function to make available the global element ID.
Definition CReorderElements.hpp:87