Documentation 6b54b78464
Loading...
Searching...
No Matches
CCGNSMeshReaderFEM.hpp
Go to the documentation of this file.
1/*!
2 * \file CCGNSMeshReaderFEM.hpp
3 * \brief Header file for the class CCGNSMeshReaderFEM.
4 * The implementations are in the <i>CCGNSMeshReaderFEM.cpp</i> file.
5 * \author T. Economon
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
32
33/*!
34 * \class CCGNSMeshReaderFEM
35 * \brief Reads a CGNS zone into linear partitions for the finite element solver (FEM).
36 * \author: T. Economon
37 */
39 private:
40 /*!
41 * \brief Communicates the grid points to the MPI rank where they are needed.
42 */
43 void CommPointCoordinates();
44
45#ifdef HAVE_CGNS
46
47 /*!
48 * \brief Reads the connectivity range from a CGNS section and convert it to the internal format.
49 * \param[in] val_section - CGNS section index.
50 * \param[in] val_firstIndex - Global index of the first element to be stored on this rank.
51 * \param[in] val_lastIndex - Global index of the last element (not included) to be stored on this rank.
52 * \param[inout] elemCount - Counter, which keeps track how many global elements are stored.
53 * \param[inout] localElemCount - Counter, which keeps track how many local elements are stored.
54 * \param[inout] localConn - Vector where the connectivity must be stored.
55 */
56 void ReadCGNSConnectivityRangeSection(const int val_section, const unsigned long val_firstIndex,
57 const unsigned long val_lastIndex, unsigned long& elemCount,
58 unsigned long& localElemCount, vector<unsigned long>& localConn);
59
60 /*!
61 * \brief Reads the interior volume elements from one section of a CGNS zone into linear partitions across all ranks.
62 */
63 void ReadCGNSVolumeElementConnectivity();
64
65 /*!
66 * \brief Reads the surface (boundary) elements from one section of a CGNS zone into linear partitions across all
67 * ranks.
68 */
69 void ReadCGNSSurfaceElementConnectivity();
70
71 /*!
72 * \brief Reads the connectivity from a CGNS surface section and select the relevant faces.
73 * \param[in] val_section - CGNS section index.
74 * \param[in] localFaces - The faces of the locally stored volume elements.
75 * \param[out] nSurfElem - Number of local surface elements stored for this surface section.
76 * \param[out] surfConn - Vector to store the connectivity of the surface elements to be stored.
77 */
78 void ReadCGNSSurfaceSection(const int val_section, const vector<CFaceOfElement>& localFaces, unsigned long& nSurfElem,
79 vector<unsigned long>& surfConn);
80#endif
81
82 public:
83 /*!
84 * \brief Constructor of the CCGNSMeshReaderFEM class.
85 */
86 CCGNSMeshReaderFEM(const CConfig* val_config, unsigned short val_iZone, unsigned short val_nZone);
87
88 /*!
89 * \brief Destructor of the CCGNSMeshReaderFEM class.
90 */
91 ~CCGNSMeshReaderFEM(void) override;
92};
Header file for the class CCGNSMeshReaderBase. The implementations are in the CCGNSMeshReaderBase....
Base class for the reading of a CGNS zone.
Definition CCGNSMeshReaderBase.hpp:42
Reads a CGNS zone into linear partitions for the finite element solver (FEM).
Definition CCGNSMeshReaderFEM.hpp:38
~CCGNSMeshReaderFEM(void) override
Destructor of the CCGNSMeshReaderFEM class.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64