Documentation 6b54b78464
Loading...
Searching...
No Matches
CFVMDataSorter.hpp
Go to the documentation of this file.
1/*!
2 * \file CFVMDataSorter.hpp
3 * \brief Headers fo the FVM data sorter class.
4 * \author T. Albring
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
31#include <vector>
32
34
35private:
36
37 vector<int> Local_Halo; //!< Array containing the flag whether a point is a halo node
38
39public:
40 /*!
41 * \brief Constructor
42 * \param[in] config - Pointer to the current config structure
43 * \param[in] geometry - Pointer to the current geometry
44 * \param[in] valFieldNames - Vector containing the field names
45 */
46 CFVMDataSorter(CConfig *config, CGeometry *geometry, const vector<string> &valFieldNames);
47
48 /*!
49 * \brief Sort the connectivities (volume and surface) into data structures used for output file writing.
50 * \param[in] config - Definition of the particular problem.
51 * \param[in] geometry - Geometrical definition of the problem.
52 * \param[in] val_sort - boolean controlling whether the elements are sorted or simply loaded by their owning rank.
53 */
54 void SortConnectivity(CConfig *config, CGeometry *geometry, bool val_sort) override;
55
56 /*!
57 * \brief Get the global index of a point.
58 * \input iPoint - the point ID.
59 * \return Global index of a specific point.
60 */
61 unsigned long GetGlobalIndex(unsigned long iPoint) const override {
63 }
64
65 /*!
66 * \brief Get the boolean whether a point is a halo node
67 * \param[in] iPoint - ID of the point
68 * \return <TRUE> if the point is a halo node.
69 */
70 bool GetHalo(unsigned long iPoint) const {return Local_Halo[iPoint];}
71
72private:
73
74 /*!
75 * \brief Initialize the halo point flags
76 * \param[in] geometry - Pointer to the current geometry
77 * \param[in] config - Pointer to the current config structure
78 */
79 void SetHaloPoints(CGeometry *geometry, CConfig *config);
80
81 /*!
82 * \brief Sort the connectivity for a single volume element type into a linear partitioning across all processors.
83 * \param[in] config - Definition of the particular problem.
84 * \param[in] geometry - Geometrical definition of the problem.
85 * \param[in] Elem_Type - VTK index of the element type being merged.
86 * \param[in] val_sort - boolean controlling whether the elements are sorted or simply loaded by their owning rank.
87 */
88 void SortVolumetricConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type, bool val_sort);
89
90};
Headers fo the data sorter class.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Definition CFVMDataSorter.hpp:33
void SortConnectivity(CConfig *config, CGeometry *geometry, bool val_sort) override
Sort the connectivities (volume and surface) into data structures used for output file writing.
Definition CFVMDataSorter.cpp:100
bool GetHalo(unsigned long iPoint) const
Get the boolean whether a point is a halo node.
Definition CFVMDataSorter.hpp:70
unsigned long GetGlobalIndex(unsigned long iPoint) const override
Get the global index of a point. \input iPoint - the point ID.
Definition CFVMDataSorter.hpp:61
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
unsigned long GetFirstIndexOnRank(int rank) const
Get the first index of the current rank's linear partition.
Definition CLinearPartitioner.hpp:86
Definition CParallelDataSorter.hpp:39
CLinearPartitioner linearPartitioner
Linear partitioner based on the global number of points.
Definition CParallelDataSorter.hpp:92
const int rank
The MPI rank.
Definition CParallelDataSorter.hpp:45