Skip to content

Commit 434af2f

Browse files
Merge branch 'develop' into feature_conductivity
2 parents e4ab3e6 + 5db56f9 commit 434af2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4069
-3510
lines changed

Common/include/CConfig.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ class CConfig {
804804
nRefOriginMoment_Z; /*!< \brief Number of Z-coordinate moment computation origins. */
805805
unsigned short nMesh_Box_Size;
806806
short *Mesh_Box_Size; /*!< \brief Array containing the number of grid points in the x-, y-, and z-directions for the analytic RECTANGLE and BOX grid formats. */
807+
unsigned short Mesh_Box_PSolFEM; /*!< \brief FEM polynomial degree of the solution for the RECTANGLE and BOX grid formats. */
807808
string Mesh_FileName, /*!< \brief Mesh input file. */
808809
Mesh_Out_FileName, /*!< \brief Mesh output file. */
809810
Solution_FileName, /*!< \brief Flow solution input file. */
@@ -9606,6 +9607,12 @@ class CConfig {
96069607
*/
96079608
su2double GetMeshBoxOffset(unsigned short val_iDim) const { return mesh_box_offset[val_iDim]; }
96089609

9610+
/*!
9611+
* \brief Get the polynomial degree of the FEM solution for the analytic RECTANGLE or BOX.
9612+
* \return The polynomial degree of the FEM solution.
9613+
*/
9614+
unsigned short GetMeshBoxPSolFEM(void) const { return Mesh_Box_PSolFEM; }
9615+
96099616
/*!
96109617
* \brief Get the number of screen output variables requested (maximum 6)
96119618
*/

Common/include/fem/fem_cgns_elements.hpp

Lines changed: 0 additions & 198 deletions
This file was deleted.

Common/include/fem/fem_geometry_structure.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030

3131
#include "../geometry/CGeometry.hpp"
3232
#include "fem_standard_element.hpp"
33-
#ifdef HAVE_CGNS
34-
#include "fem_cgns_elements.hpp"
35-
#endif
3633
#include "../wall_model.hpp"
3734
#include "../linear_algebra/blas_structure.hpp"
3835

Common/include/geometry/CPhysicalGeometry.hpp

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#pragma once
2929

3030
#include "CGeometry.hpp"
31-
#include "meshreader/CMeshReaderFVM.hpp"
31+
#include "meshreader/CMeshReaderBase.hpp"
3232
#include "../containers/C2DContainer.hpp"
3333

3434
/*!
@@ -285,51 +285,49 @@ class CPhysicalGeometry final : public CGeometry {
285285
* \param[in] val_iZone - Domain to be read from the grid file.
286286
* \param[in] val_nZone - Total number of domains in the grid file.
287287
*/
288-
void Read_Mesh_FVM(CConfig* config, const string& val_mesh_filename, unsigned short val_iZone,
289-
unsigned short val_nZone);
288+
void Read_Mesh(CConfig* config, const string& val_mesh_filename, unsigned short val_iZone, unsigned short val_nZone);
290289

291290
/*!
292-
* \brief Reads for the FEM solver the geometry of the grid and adjust the boundary
293-
* conditions with the configuration file in parallel (for parmetis).
294-
* \param[in] config - Definition of the particular problem.
295-
* \param[in] val_mesh_filename - Name of the file with the grid information.
296-
* \param[in] val_iZone - Domain to be read from the grid file.
297-
* \param[in] val_nZone - Total number of domains in the grid file.
298-
*/
299-
void Read_SU2_Format_Parallel_FEM(CConfig* config, const string& val_mesh_filename, unsigned short val_iZone,
300-
unsigned short val_nZone);
301-
302-
/*!
303-
* \brief Reads for the FEM solver the geometry of the grid and adjust the boundary
304-
* conditions with the configuration file in parallel (for parmetis).
305-
* \param[in] config - Definition of the particular problem.
306-
* \param[in] val_mesh_filename - Name of the file with the grid information.
307-
* \param[in] val_iZone - Domain to be read from the grid file.
308-
* \param[in] val_nZone - Total number of domains in the grid file.
291+
* \brief Routine to load the CGNS grid points from a single zone into the proper SU2 data structures.
292+
* \param[in] config - definition of the particular problem.
293+
* \param[in] mesh - mesh reader object containing the current zone data.
309294
*/
310-
void Read_CGNS_Format_Parallel_FEM(CConfig* config, const string& val_mesh_filename, unsigned short val_iZone,
311-
unsigned short val_nZone);
295+
void LoadLinearlyPartitionedPoints(CConfig* config, CMeshReaderBase* mesh);
312296

313297
/*!
314-
* \brief Routine to load the CGNS grid points from a single zone into the proper SU2 data structures.
298+
* \brief Routine to load the grid points from a single zone into the proper SU2 data structures for the FEM solver.
315299
* \param[in] config - definition of the particular problem.
316300
* \param[in] mesh - mesh reader object containing the current zone data.
317301
*/
318-
void LoadLinearlyPartitionedPoints(CConfig* config, CMeshReaderFVM* mesh);
302+
void LoadLinearlyPartitionedPointsFEM(CConfig* config, CMeshReaderBase* mesh);
319303

320304
/*!
321305
* \brief Loads the interior volume elements from the mesh reader object into the primal element data structures.
322306
* \param[in] config - definition of the particular problem.
323307
* \param[in] mesh - mesh reader object containing the current zone data.
324308
*/
325-
void LoadLinearlyPartitionedVolumeElements(CConfig* config, CMeshReaderFVM* mesh);
309+
void LoadLinearlyPartitionedVolumeElements(CConfig* config, CMeshReaderBase* mesh);
310+
311+
/*!
312+
* \brief Loads the interior volume elements from the mesh reader object into the primal element data structures for
313+
* the FEM solver. \param[in] config - definition of the particular problem. \param[in] mesh - mesh reader object
314+
* containing the current zone data.
315+
*/
316+
void LoadLinearlyPartitionedVolumeElementsFEM(CConfig* config, CMeshReaderBase* mesh);
326317

327318
/*!
328319
* \brief Loads the boundary elements (markers) from the mesh reader object into the primal element data structures.
329320
* \param[in] config - definition of the particular problem.
330321
* \param[in] mesh - mesh reader object containing the current zone data.
331322
*/
332-
void LoadUnpartitionedSurfaceElements(CConfig* config, CMeshReaderFVM* mesh);
323+
void LoadUnpartitionedSurfaceElements(CConfig* config, CMeshReaderBase* mesh);
324+
325+
/*!
326+
* \brief Loads the boundary elements (markers) from the mesh reader object into the primal element data structures
327+
* for the FEM solver. \param[in] config - definition of the particular problem. \param[in] mesh - mesh reader
328+
* object containing the current zone data.
329+
*/
330+
void LoadLinearlyPartitionedSurfaceElementsFEM(CConfig* config, CMeshReaderBase* mesh);
333331

334332
/*!
335333
* \brief Prepares the grid point adjacency based on a linearly partitioned mesh object needed by ParMETIS for graph
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*!
2+
* \file CBoxMeshReaderFEM.hpp
3+
* \brief Header file for the class CBoxMeshReaderFEM.
4+
* The implementations are in the <i>CBoxMeshReaderFEM.cpp</i> file.
5+
* \author T. Economon
6+
* \version 8.1.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-2024, 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 "CMeshReaderBase.hpp"
32+
33+
/*!
34+
* \class CBoxMeshReaderFEM
35+
* \brief Reads a 3D box grid into linear partitions for the finite element solver (FEM).
36+
* \author: T. Economon, E. van der Weide
37+
*/
38+
class CBoxMeshReaderFEM final : public CMeshReaderBase {
39+
private:
40+
unsigned long nNode; /*!< \brief Number of grid nodes in the x-direction. */
41+
unsigned long mNode; /*!< \brief Number of grid nodes in the y-direction. */
42+
unsigned long pNode; /*!< \brief Number of grid nodes in the z-direction. */
43+
44+
su2double Lx; /*!< \brief Length of the domain in the x-direction. */
45+
su2double Ly; /*!< \brief Length of the domain in the y-direction. */
46+
su2double Lz; /*!< \brief Length of the domain in the z-direction. */
47+
48+
su2double Ox; /*!< \brief Offset of the domain from 0.0 in the x-direction. */
49+
su2double Oy; /*!< \brief Offset of the domain from 0.0 in the y-direction. */
50+
su2double Oz; /*!< \brief Offset of the domain from 0.0 in the z-direction. */
51+
52+
unsigned short KindElem; /*!< \brief VTK identifier of the interior elements. */
53+
unsigned short KindBound; /*!< \brief VTK identifier of the surface elements. */
54+
55+
unsigned short nPolySol; /*!< \brief Polynomial degree of the solution. */
56+
57+
/*!
58+
* \brief Computes and stores the grid points based on an analytic definition of a box grid.
59+
*/
60+
void ComputeBoxPointCoordinates();
61+
62+
/*!
63+
* \brief Computes and stores the volume element connectivity based on an analytic definition of a box grid.
64+
*/
65+
void ComputeBoxVolumeConnectivity();
66+
67+
/*!
68+
* \brief Computes and stores the surface element connectivity based on an analytic definition of a box grid.
69+
*/
70+
void ComputeBoxSurfaceConnectivity();
71+
72+
public:
73+
/*!
74+
* \brief Constructor of the CBoxMeshReaderFEM class.
75+
*/
76+
CBoxMeshReaderFEM(const CConfig* val_config, unsigned short val_iZone, unsigned short val_nZone);
77+
78+
/*!
79+
* \brief Destructor of the CBoxMeshReaderFEM class.
80+
*/
81+
~CBoxMeshReaderFEM(void) override;
82+
};

0 commit comments

Comments
 (0)