From a00bce2b9a345c95ffcc21e97dd2f66dabc84a7b Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Sun, 24 May 2020 13:08:56 +0100 Subject: [PATCH 1/2] move inline functions --- .../include/fem_gauss_jacobi_quadrature.hpp | 21 +- .../include/fem_gauss_jacobi_quadrature.inl | 32 -- Common/include/fem_geometry_structure.hpp | 343 +++++------------- Common/include/fem_geometry_structure.inl | 182 ---------- Common/include/fem_standard_element.hpp | 192 ++++------ Common/include/fem_standard_element.inl | 196 ---------- Common/include/wall_model.hpp | 26 +- Common/include/wall_model.inl | 35 -- Common/src/fem_geometry_structure.cpp | 84 +---- 9 files changed, 199 insertions(+), 912 deletions(-) delete mode 100644 Common/include/fem_gauss_jacobi_quadrature.inl delete mode 100644 Common/include/fem_geometry_structure.inl delete mode 100644 Common/include/fem_standard_element.inl delete mode 100644 Common/include/wall_model.inl diff --git a/Common/include/fem_gauss_jacobi_quadrature.hpp b/Common/include/fem_gauss_jacobi_quadrature.hpp index 7ec6f6f81ad..f5e37a9dda7 100644 --- a/Common/include/fem_gauss_jacobi_quadrature.hpp +++ b/Common/include/fem_gauss_jacobi_quadrature.hpp @@ -10,7 +10,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -63,16 +63,16 @@ Subject: Gauss-Jacobi Quadrature Code Dear John, I am the lead developer for the open-source SU2 suite, which is primarily for -computational fluid dynamics, but also for solving other PDE systems +computational fluid dynamics, but also for solving other PDE systems (http://su2.stanford.edu, https://github.com/su2code/SU2). Over the past few months, we have been working on a new high-order discontinuous Galerkin fluid solver within the codebase, led by Prof. Edwin van der Weide at the University of Twente (cc’d). We found your attached code to be very helpful in resolving some issues with integration for our pyramid elements, and we would really like to reuse the implementation if possible. -First, we would like to check if this is ok with you personally, and ask how we can +First, we would like to check if this is ok with you personally, and ask how we can properly attribute your work in the code? Second, we are curious just what version of the -GNU LGPL license you are using to make sure that we don’t have any licensing issues. +GNU LGPL license you are using to make sure that we don’t have any licensing issues. For SU2, we are using GNU LGPL v2.1. Thanks for the time and take care, @@ -99,17 +99,6 @@ using namespace std; */ class CGaussJacobiQuadrature { public: - - /*! - * \brief Constructor of the class, nothing to be done. - */ - CGaussJacobiQuadrature(); - - /*! - * \brief Destructor of the class, nothing to be done. - */ - ~CGaussJacobiQuadrature(); - /*! * \brief Function, which serves as the API to compute the integration points and weights. @@ -186,5 +175,3 @@ class CGaussJacobiQuadrature { void sgqf(int nt, passivedouble aj[], passivedouble bj[], passivedouble zemu, passivedouble t[], passivedouble wts[]); }; - -#include "fem_gauss_jacobi_quadrature.inl" diff --git a/Common/include/fem_gauss_jacobi_quadrature.inl b/Common/include/fem_gauss_jacobi_quadrature.inl deleted file mode 100644 index a500437de0c..00000000000 --- a/Common/include/fem_gauss_jacobi_quadrature.inl +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * \file fem_gauss_jacobi_quadrature.inl - * \brief In-Line functions of the fem_gauss_jacobi_quadrature.hpp file. - * \author E. van der Weide - * \version 7.0.4 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -inline CGaussJacobiQuadrature::CGaussJacobiQuadrature(){} - -inline CGaussJacobiQuadrature::~CGaussJacobiQuadrature(){} diff --git a/Common/include/fem_geometry_structure.hpp b/Common/include/fem_geometry_structure.hpp index 93bd2dc8d37..58829e7eb94 100644 --- a/Common/include/fem_geometry_structure.hpp +++ b/Common/include/fem_geometry_structure.hpp @@ -7,7 +7,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -43,28 +43,16 @@ using namespace std; * \brief Help class used to store three longs as one entity. * \version 7.0.4 "Blackbird" */ -class CLong3T { -public: - long long0; /*!< \brief First long to store in this class. */ - long long1; /*!< \brief Second long to store in this class. */ - long long2; /*!< \brief Third long to store in this class. */ - - /* Constructors and destructors. */ - CLong3T(); - ~CLong3T(); - - CLong3T(const long a, const long b, const long c); +struct CLong3T { + long long0 = 0; /*!< \brief First long to store in this class. */ + long long1 = 0; /*!< \brief Second long to store in this class. */ + long long2 = 0; /*!< \brief Third long to store in this class. */ - CLong3T(const CLong3T &other); + CLong3T() = default; - /* Operators. */ - CLong3T& operator=(const CLong3T &other); + CLong3T(const long a, const long b, const long c) {long0 = a; long1 = b; long2 = c;} bool operator<(const CLong3T &other) const; - -private: - /* Copy function. */ - void Copy(const CLong3T &other); }; /*! @@ -74,6 +62,16 @@ class CLong3T { * \version 7.0.4 "Blackbird" */ class CReorderElements { +private: + unsigned long globalElemID; /*!< \brief Global element ID of the element. */ + unsigned short timeLevel; /*!< \brief Time level of the element. Only relevant + for time accurate local time stepping. */ + bool commSolution; /*!< \brief Whether or not the solution must be + communicated to other ranks. */ + unsigned short elemType; /*!< \brief Short hand for the element type, Which + stored info of the VTK_Type, polynomial + degree of the solution and whether or + not the Jacobian is constant. */ public: /*! * \brief Constructor of the class, set the member variables to the arguments. @@ -86,19 +84,9 @@ class CReorderElements { const bool val_JacConstant); /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CReorderElements(void); - - /*! - * \brief Copy constructor of the class. - */ - CReorderElements(const CReorderElements &other); - - /*! - * \brief Assignment operator of the class. + * \brief Default constructor of the class. Disabled. */ - CReorderElements& operator=(const CReorderElements &other); + CReorderElements(void) = delete; /*! * \brief Less than operator of the class. Needed for the sorting. @@ -109,53 +97,33 @@ class CReorderElements { * \brief Function to make available the variable commSolution. * \return Whether or not the solution of the element must be communicated. */ - bool GetCommSolution(void); + inline bool GetCommSolution(void) const { return commSolution; } /*! * \brief Function to make available the element type of the element. * \return The value of elemType, which stores the VTK type, polynomial degree and whether or not the Jacobian is constant. */ - unsigned short GetElemType(void); + inline unsigned short GetElemType(void) const { return elemType; } /*! * \brief Function to make available the global element ID. * \return The global element ID of the element. */ - unsigned long GetGlobalElemID(void); + inline unsigned long GetGlobalElemID(void) const { return globalElemID; } /*! * \brief Function to make available the time level. * \return The time level of the element. */ - unsigned short GetTimeLevel(void); + inline unsigned short GetTimeLevel(void) const { return timeLevel; } /*! * \brief Function, which sets the value of commSolution. * \param[in] val_CommSolution - value to which commSolution must be set. */ - void SetCommSolution(const bool val_CommSolution); - -private: - unsigned long globalElemID; /*!< \brief Global element ID of the element. */ - unsigned short timeLevel; /*!< \brief Time level of the element. Only relevant - for time accurate local time stepping. */ - bool commSolution; /*!< \brief Whether or not the solution must be - communicated to other ranks. */ - unsigned short elemType; /*!< \brief Short hand for the element type, Which - stored info of the VTK_Type, polynomial - degree of the solution and whether or - not the Jacobian is constant. */ - - /*! - * \brief Copy function. Needed for the copy constructor and assignment operator. - */ - void Copy(const CReorderElements &other); + inline void SetCommSolution(const bool val_CommSolution) { commSolution = val_CommSolution; } - /*! - * \brief Default constructor of the class. Disabled. - */ - CReorderElements(void); }; /*! @@ -167,18 +135,28 @@ class CReorderElements { */ class CVolumeElementFEM; // Forward declaration to avoid problems. class CSortFaces { +private: + unsigned long nVolElemOwned; /*!< \brief Number of locally owned volume elements. */ + unsigned long nVolElemTot; /*!< \brief Total number of local volume elements . */ + + const CVolumeElementFEM *volElem; /*!< \brief The locally stored volume elements. */ + public: /*! * \brief Constructor of the class. Set the values of the member variables. */ CSortFaces(unsigned long val_nVolElemOwned, unsigned long val_nVolElemTot, - const CVolumeElementFEM *val_volElem); + const CVolumeElementFEM *val_volElem) { + nVolElemOwned = val_nVolElemOwned; + nVolElemTot = val_nVolElemTot; + volElem = val_volElem; + } - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CSortFaces(void); + /*! + * \brief Default constructor of the class. Disabled. + */ + CSortFaces(void) = delete; /*! * \brief Operator used for the comparison. @@ -187,16 +165,6 @@ class CSortFaces { */ bool operator()(const CFaceOfElement &f0, const CFaceOfElement &f1); -private: - unsigned long nVolElemOwned; /*!< \brief Number of locally owned volume elements. */ - unsigned long nVolElemTot; /*!< \brief Total number of local volume elements . */ - - const CVolumeElementFEM *volElem; /*!< \brief The locally stored volume elements. */ - - /*! - * \brief Default constructor of the class. Disabled. - */ - CSortFaces(void); }; /*! @@ -207,18 +175,7 @@ class CSortFaces { * \version 7.0.4 "Blackbird" */ class CSurfaceElementFEM; // Forward declaration to avoid problems. -class CSortBoundaryFaces { -public: - /*! - * \brief Constructor of the class. Nothing to be done. - */ - CSortBoundaryFaces(void); - - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CSortBoundaryFaces(void); - +struct CSortBoundaryFaces { /*! * \brief Operator used for the comparison. * \param[in] f0 - First boundary face in the comparison. @@ -309,16 +266,6 @@ class CVolumeElementFEM { vector wallDistanceSolDOFs; /*!< \brief The wall distance to the viscous walls for the solution DOFs of this element. */ - /*! - * \brief Constructor of the class. Initialize the pointers to NULL. - */ - CVolumeElementFEM(void); - - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CVolumeElementFEM(void); - /*! * \brief Get all the corner points of all the faces of this element. It must be made sure that the numbering of the faces is identical to the numbering used for the @@ -338,34 +285,12 @@ class CVolumeElementFEM { * \author E. van der Weide * \version 7.0.4 "Blackbird" */ -class CPointFEM { -public: +struct CPointFEM { unsigned long globalID; /*!< \brief The global ID of this point in the grid. */ short periodIndexToDonor; /*!< \brief The index of the periodic transformation to the donor element. Only for halo elements. A -1 indicates no periodic transformation. */ - su2double coor[3]; /*!< \brief Array with the coordinates of the node. */ - - /*! - * \brief Default constructor of the class. Initialize the coordinates to zero - to avoid a valgrind warning in two space dimensions. - */ - CPointFEM(void); - - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CPointFEM(void); - - /*! - * \brief Copy constructor of the class. - */ - CPointFEM(const CPointFEM &other); - - /*! - * \brief Assignment operator of the class. - */ - CPointFEM& operator=(const CPointFEM &other); + su2double coor[3] = {0.0}; /*!< \brief Array with the coordinates of the node. */ /*! * \brief Less than operator of the class. Needed for the sorting. @@ -377,11 +302,6 @@ class CPointFEM { */ bool operator==(const CPointFEM &other) const; -private: - /*! - * \brief Copy function. Needed for the copy constructor and assignment operator. - */ - void Copy(const CPointFEM &other); }; /*! @@ -390,8 +310,7 @@ class CPointFEM { * \author E. van der Weide * \version 7.0.4 "Blackbird" */ -class CInternalFaceElementFEM { -public: +struct CInternalFaceElementFEM { unsigned short VTK_Type; /*!< \brief Element type using the VTK convention. */ unsigned short indStandardElement; /*!< \brief Index in the vector of standard face elements. */ @@ -421,26 +340,6 @@ class CInternalFaceElementFEM { vector wallDistance; /*!< \brief The wall distance to the viscous walls for the integration points of this face. */ - /*! - * \brief Constructor of the class. Initialize some pointers to NULL. - */ - CInternalFaceElementFEM(void); - - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CInternalFaceElementFEM(void); - - /*! - * \brief Copy constructor of the class. - */ - CInternalFaceElementFEM(const CInternalFaceElementFEM &other); - - /*! - * \brief Assignment operator of the class. - */ - CInternalFaceElementFEM& operator=(const CInternalFaceElementFEM &other); - /*! * \brief Less than operator of the class. Needed for the sorting. The criterion for comparison are the standard element and @@ -448,11 +347,6 @@ class CInternalFaceElementFEM { */ bool operator<(const CInternalFaceElementFEM &other) const; -private: - /*! - * \brief Copy function. Needed for the copy constructor and assignment operator. - */ - void Copy(const CInternalFaceElementFEM &other); }; /*! @@ -461,8 +355,7 @@ class CInternalFaceElementFEM { * \author E. van der Weide * \version 7.0.4 "Blackbird" */ -class CSurfaceElementFEM { -public: +struct CSurfaceElementFEM { unsigned short VTK_Type; /*!< \brief Element type using the VTK convention. */ unsigned short nPolyGrid; /*!< \brief Polynomial degree for the geometry of the element. */ unsigned short nDOFsGrid; /*!< \brief Number of DOFs for the geometry of the element. */ @@ -503,31 +396,11 @@ class CSurfaceElementFEM { vector > matWallFunctionDonor; /*!< \brief Matrices, which store the interpolation coefficients for the donors of the integration points.*/ - /*! - * \brief Constructor of the class. Initialize some variables. - */ - CSurfaceElementFEM(void); - - /*! - * \brief Destructor of the class. Nothing to be done. - */ - ~CSurfaceElementFEM(void); - - /*! - * \brief Copy constructor of the class. - */ - CSurfaceElementFEM(const CSurfaceElementFEM &other); - - /*! - * \brief Assignment operator of the class. - */ - CSurfaceElementFEM& operator=(const CSurfaceElementFEM &other); - /*! * \brief Less than operator of the class. Needed for the sorting. The criterion for comparison is the corresponding (local) volume ID. */ - bool operator<(const CSurfaceElementFEM &other) const; + bool operator<(const CSurfaceElementFEM &other) const { return volElemID < other.volElemID; } /*! * \brief Function, which determines the corner points of this surface element. @@ -536,12 +409,6 @@ class CSurfaceElementFEM { */ void GetCornerPointsFace(unsigned short &nPointsPerFace, unsigned long faceConn[]); - -private: - /*! - * \brief Copy function. Needed for the copy constructor and assignment operator. - */ - void Copy(const CSurfaceElementFEM &other); }; /*! @@ -550,31 +417,21 @@ class CSurfaceElementFEM { * \author E. van der Weide * \version 7.0.4 "Blackbird" */ -class CBoundaryFEM { -public: +struct CBoundaryFEM { string markerTag; /*!< \brief Marker tag of this boundary. */ - bool periodicBoundary; /*!< \brief Whether or not this boundary is a periodic boundary. */ - bool haloInfoNeededForBC; /*!< \brief Whether or not information of halo elements - is needed to impose the boundary conditions. */ + bool periodicBoundary = false; /*!< \brief Whether or not this boundary is a periodic boundary. */ + bool haloInfoNeededForBC = false; /*!< \brief Whether or not information of halo elements + is needed to impose the boundary conditions. */ vector nSurfElem; /*!< \brief Number of surface elements per time level, cumulative storage format. */ vector surfElem; /*!< \brief Vector of the local surface elements. */ - CWallModel *wallModel; /*!< \brief Wall model for LES. */ + CWallModel *wallModel = nullptr; /*!< \brief Wall model for LES. */ - /*! - * \brief Constructor of the class. Set the default value for some - member variables. - */ - CBoundaryFEM(void); - - /*! - * \brief Destructor of the class. - */ - ~CBoundaryFEM(void); + ~CBoundaryFEM(void) { delete wallModel; } }; /*! @@ -638,7 +495,7 @@ class CMeshFEM: public CGeometry { /*! * \brief Constructor of the class. */ - CMeshFEM(void); + CMeshFEM(void) : CGeometry() { blasFunctions = nullptr; } /*! * \overload @@ -651,129 +508,129 @@ class CMeshFEM: public CGeometry { /*! * \brief Destructor of the class. */ - ~CMeshFEM(void) override; + ~CMeshFEM(void) override { delete blasFunctions; } /*! * \brief Function, which makes available the boundaries of the local FEM mesh. * \return Pointer to the boundaries of the local FEM mesh. */ - CBoundaryFEM *GetBoundaries(void); + inline CBoundaryFEM* GetBoundaries(void) {return boundaries.data();} /*! * \brief Function, which makes available the mesh points of the local FEM mesh. * \return Pointer to the mesh points of the local FEM mesh. */ - CPointFEM *GetMeshPoints(void); + inline CPointFEM *GetMeshPoints(void) {return meshPoints.data();} /*! * \brief Function, which makes available the number of mesh points of the local FEM mesh. * \return Number of mesh points of the local FEM mesh. */ - unsigned long GetNMeshPoints(void); + inline unsigned long GetNMeshPoints(void) {return meshPoints.size();} /*! * \brief Function, which makes available the number of owned volume elements in the local FEM mesh. * \return Number of owned volume elements of the local FEM mesh. */ - unsigned long GetNVolElemOwned(void); + inline unsigned long GetNVolElemOwned(void) {return nVolElemOwned;} /*! * \brief Function, which makes available the total number of volume elements in the local FEM mesh. * \return Total number of volume elements of the local FEM mesh. */ - unsigned long GetNVolElemTot(void); + inline unsigned long GetNVolElemTot(void) {return nVolElemTot;} /*! * \brief Function, which makes available the volume elements in the local FEM mesh. * \return Pointer to the volume elements of the local FEM mesh. */ - CVolumeElementFEM *GetVolElem(void); + inline CVolumeElementFEM* GetVolElem(void) {return volElem.data();} /*! * \brief Function, which makes available the number of owned volume elements per time level. * \return The pointer to the data of nVolElemOwnedPerTimeLevel. */ - unsigned long *GetNVolElemOwnedPerTimeLevel(void); + inline unsigned long* GetNVolElemOwnedPerTimeLevel(void) {return nVolElemOwnedPerTimeLevel.data();} /*! * \brief Function, which makes available the number of internal volume elements per time level. * \return The pointer to the data of nVolElemInternalPerTimeLevel. */ - unsigned long *GetNVolElemInternalPerTimeLevel(void); + inline unsigned long* GetNVolElemInternalPerTimeLevel(void) {return nVolElemInternalPerTimeLevel.data();} /*! * \brief Function, which makes available the number of halo volume elements per time level. * \return The pointer to the data of nVolElemHaloPerTimeLevel. */ - unsigned long *GetNVolElemHaloPerTimeLevel(void); + inline unsigned long* GetNVolElemHaloPerTimeLevel(void) {return nVolElemHaloPerTimeLevel.data();} /*! * \brief Function, which makes available the vector of vectors containing the owned element IDs adjacent to elements of a lower time level. Note that a copy is made. * \return Copy of ownedElemAdjLowTimeLevel. */ - vector > GetOwnedElemAdjLowTimeLevel(void); + inline vector > GetOwnedElemAdjLowTimeLevel(void) {return ownedElemAdjLowTimeLevel;} /*! * \brief Function, which makes available the vector of vectors containing the halo element IDs adjacent to elements of a lower time level. Note that a copy is made. * \return Copy of haloElemAdjLowTimeLevel. */ - vector > GetHaloElemAdjLowTimeLevel(void); + inline vector > GetHaloElemAdjLowTimeLevel(void) {return haloElemAdjLowTimeLevel;} /*! * \brief Function, which makes available the number of standard boundary faces of the solution. * \return Number of standard boundary faces of the solution. */ - unsigned short GetNStandardBoundaryFacesSol(void); + inline unsigned short GetNStandardBoundaryFacesSol(void) {return standardBoundaryFacesSol.size();} /*! * \brief Function, which makes available the standard boundary faces of the solution. * \return Pointer to the standard boundary faces of the solution. */ - CFEMStandardBoundaryFace *GetStandardBoundaryFacesSol(void); + inline CFEMStandardBoundaryFace* GetStandardBoundaryFacesSol(void) {return standardBoundaryFacesSol.data();} /*! * \brief Function, which makes available the vector of receive ranks as a const reference. * \return Const reference to the vector of ranks. */ - const vector &GetRanksRecv(void) const; + inline const vector& GetRanksRecv(void) const {return ranksRecv;} /*! * \brief Function, which makes available the vector of send ranks as a const reference. * \return Const reference to the vector of ranks. */ - const vector &GetRanksSend(void) const; + inline const vector& GetRanksSend(void) const {return ranksSend;} /*! * \brief Function, which makes available the vector of vectors containing the receive entities as a const reference. * \return Const reference to the vector of vectors of receive entities. */ - const vector > &GetEntitiesRecv(void) const; + inline const vector >& GetEntitiesRecv(void) const {return entitiesRecv;} /*! * \brief Function, which makes available the vector of vectors containing the send entities as a const reference. * \return Const reference to the vector of vectors of send entities. */ - const vector > &GetEntitiesSend(void) const; + inline const vector >& GetEntitiesSend(void) const {return entitiesSend;} /*! * \brief Function, which makes available the vector of rotational periodic markers as a const reference. * \return Const reference to the vector with rotational periodic markers. */ - const vector &GetRotPerMarkers(void) const; + inline const vector& GetRotPerMarkers(void) const {return rotPerMarkers;} /*! * \brief Function, which makes available the vector of vectors containing the rotational periodic halos as a const reference. * \return Const reference to the vector of vectors with rotational periodic halos. */ - const vector > &GetRotPerHalos(void) const; + inline const vector >& GetRotPerHalos(void) const {return rotPerHalos;} /*! * \brief Compute surface area (positive z-direction) for force coefficient non-dimensionalization. @@ -888,11 +745,10 @@ class CMeshFEM_DG: public CMeshFEM { map Global_to_Local_Point; /*!< \brief Global-local mapping for the DOFs. */ public: - - /*! - * \brief Constructor of the class. - */ - CMeshFEM_DG(void); + /*! + * \brief Constructor of the class. + */ + CMeshFEM_DG(void) : CMeshFEM() {} /*! * \overload @@ -902,11 +758,6 @@ class CMeshFEM_DG: public CMeshFEM { */ CMeshFEM_DG(CGeometry *geometry, CConfig *config); - /*! - * \brief Destructor of the class. - */ - ~CMeshFEM_DG(void) override; - /*! * \brief Function to compute the coordinates of the integration points. */ @@ -934,15 +785,14 @@ class CMeshFEM_DG: public CMeshFEM { iteration matrix of the ADER-DG predictor step. * \return The time coefficients in the iteration matrix of ADER-DG. */ - - su2double *GetTimeCoefADER_DG(void); + inline su2double* GetTimeCoefADER_DG(void) {return timeCoefADER_DG.data();} /*! * \brief Function, which makes available the time interpolation matrix between the time DOFs and time integration points for ADER-DG. * \return The time interpolation matrix for ADER-DG. */ - su2double *GetTimeInterpolDOFToIntegrationADER_DG(void); + inline su2double* GetTimeInterpolDOFToIntegrationADER_DG(void) {return timeInterpolDOFToIntegrationADER_DG.data();} /*! * \brief Function, which makes available the time interpolation matrix between @@ -950,27 +800,27 @@ class CMeshFEM_DG: public CMeshFEM { integration points for ADER-DG. * \return The time interpolation matrix of adjacent time DOFs for ADER-DG. */ - su2double *GetTimeInterpolAdjDOFToIntegrationADER_DG(void); + inline su2double* GetTimeInterpolAdjDOFToIntegrationADER_DG(void) {return timeInterpolAdjDOFToIntegrationADER_DG.data();} /*! * \brief Function, which makes available the number of matching internal faces between an owned element and a halo element per time level. * \return The number of matching internal faces between these elements per time level. */ - unsigned long *GetNMatchingFacesWithHaloElem(void); + inline unsigned long *GetNMatchingFacesWithHaloElem(void) {return nMatchingFacesWithHaloElem.data();} /*! * \brief Function, which makes available the number of matching internal faces between two owned elements per time level. * \return The number of matching internal faces per time level. */ - unsigned long *GetNMatchingFacesInternal(void); + inline unsigned long *GetNMatchingFacesInternal(void) {return nMatchingFacesInternal.data();} /*! * \brief Function, which makes available the matching internal faces. * \return Pointer to the matching internal faces. */ - CInternalFaceElementFEM *GetMatchingFaces(void); + inline CInternalFaceElementFEM* GetMatchingFaces(void) {return matchingFaces.data();} /*! * \brief Function to compute the grid velocities for static problems. @@ -986,25 +836,25 @@ class CMeshFEM_DG: public CMeshFEM { * \brief Function, which makes available the number of standard volume elements of the solution. * \return Number of standard volume elements of the solution. */ - unsigned short GetNStandardElementsSol(void); + inline unsigned short GetNStandardElementsSol(void) {return standardElementsSol.size();} /*! * \brief Function, which makes available the standard volume elements of the solution. * \return Pointer to the standard volume elements of the solution. */ - CFEMStandardElement *GetStandardElementsSol(void); + inline CFEMStandardElement* GetStandardElementsSol(void) {return standardElementsSol.data();} /*! * \brief Function, which makes available the number of standard internal matching faces of the solution. * \return Number of standard internal matching faces of the solution. */ - unsigned short GetNStandardMatchingFacesSol(void); + inline unsigned short GetNStandardMatchingFacesSol(void) {return standardMatchingFacesSol.size();} /*! * \brief Function, which makes available the standard internal matching faces of the solution. * \return Pointer to the standard internal matching faces of the solution. */ - CFEMStandardInternalFace *GetStandardMatchingFacesSol(void); + inline CFEMStandardInternalFace* GetStandardMatchingFacesSol(void) {return standardMatchingFacesSol.data();} /*! * \brief Function, which computes a length scale of the volume elements. @@ -1042,7 +892,12 @@ class CMeshFEM_DG: public CMeshFEM { * \param[in] val_ipoint - Global point. * \return Local index that correspond with the global index, -1 if not found on the current rank. */ - long GetGlobal_to_Local_Point(unsigned long val_ipoint) const override; + inline long GetGlobal_to_Local_Point(unsigned long val_ipoint) const override { + auto it = Global_to_Local_Point.find(val_ipoint); + if (it != Global_to_Local_Point.cend()) + return it->second; + return -1; + } /*! * \brief Function, which carries out the preprocessing tasks when wall functions are used. @@ -1379,27 +1234,25 @@ class CMeshFEM_DG: public CMeshFEM { void SetWallDistance(const CConfig *config, CADTElemClass* WallADT) override; }; -/*! +/*! * \class CDummyMeshFEM_DG * \brief Class for defining a DG geometry that does not contain any points/elements. - * Can be used for initializing other classes that depend on the geometry without + * Can be used for initializing other classes that depend on the geometry without * going through the time-consuming mesh initialization and paritioning. * \author T. Albring */ class CDummyMeshFEM_DG : public CMeshFEM_DG { - + public: /*! * \brief Constructor of the class * \param[in] config - Definition of the particular problem. */ CDummyMeshFEM_DG(CConfig *config); - - /*! + + /*! * \brief Destructor of the class. */ ~CDummyMeshFEM_DG() override; - -}; -#include "fem_geometry_structure.inl" +}; diff --git a/Common/include/fem_geometry_structure.inl b/Common/include/fem_geometry_structure.inl deleted file mode 100644 index 2006cafd8f6..00000000000 --- a/Common/include/fem_geometry_structure.inl +++ /dev/null @@ -1,182 +0,0 @@ -/*! - * \file fem_geometry_structure.inl - * \brief In-Line subroutines of the fem_geometry_structure.hpp file. - * \author E. van der Weide - * \version 7.0.4 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -inline CLong3T::CLong3T(){long0 = long1 = long2 = 0;} - -inline CLong3T::CLong3T(const long a, const long b, const long c){long0 = a; long1 = b; long2 = c;} - -inline CLong3T::~CLong3T(){} - -inline CLong3T::CLong3T(const CLong3T &other){Copy(other);} - -inline CLong3T& CLong3T::operator=(const CLong3T &other){Copy(other); return (*this);} - -inline CReorderElements::~CReorderElements(void) { } - -inline CReorderElements::CReorderElements(const CReorderElements &other) { Copy(other); } - -inline CReorderElements& CReorderElements::operator=(const CReorderElements &other) { Copy(other); return (*this); } - -inline bool CReorderElements::GetCommSolution(void) { return commSolution; } - -inline unsigned short CReorderElements::GetElemType(void) { return elemType; } - -inline unsigned long CReorderElements::GetGlobalElemID(void) { return globalElemID; } - -inline unsigned short CReorderElements::GetTimeLevel(void) { return timeLevel; } - -inline void CReorderElements::SetCommSolution(const bool val_CommSolution) { commSolution = val_CommSolution; } - -inline CSortFaces::CSortFaces(unsigned long val_nVolElemOwned, - unsigned long val_nVolElemTot, - const CVolumeElementFEM *val_volElem) - {nVolElemOwned = val_nVolElemOwned; nVolElemTot = val_nVolElemTot; volElem = val_volElem;} - -inline CSortFaces::~CSortFaces(void) { } - -inline CSortBoundaryFaces::CSortBoundaryFaces() { } - -inline CSortBoundaryFaces::~CSortBoundaryFaces() { } - -inline CVolumeElementFEM::CVolumeElementFEM(void) { } - -inline CVolumeElementFEM::~CVolumeElementFEM(void) { } - -inline CPointFEM::CPointFEM(void) { coor[0] = coor[1] = coor[2] = 0.0; } - -inline CPointFEM::~CPointFEM(void) { } - -inline CPointFEM::CPointFEM(const CPointFEM &other) { Copy(other); } - -inline CPointFEM& CPointFEM::operator=(const CPointFEM &other) { Copy(other); return (*this); } - -inline CInternalFaceElementFEM::CInternalFaceElementFEM(void) { } - -inline CInternalFaceElementFEM::~CInternalFaceElementFEM(void) { } - -inline CInternalFaceElementFEM::CInternalFaceElementFEM(const CInternalFaceElementFEM &other) { Copy(other); } - -inline CInternalFaceElementFEM& CInternalFaceElementFEM::operator=(const CInternalFaceElementFEM &other) { Copy(other); return (*this); } - -inline CSurfaceElementFEM::CSurfaceElementFEM(void) {indStandardElement = -1;} - -inline CSurfaceElementFEM::~CSurfaceElementFEM(void) { } - -inline CSurfaceElementFEM::CSurfaceElementFEM(const CSurfaceElementFEM &other) { Copy(other); } - -inline CSurfaceElementFEM& CSurfaceElementFEM::operator=(const CSurfaceElementFEM &other) { Copy(other); return (*this); } - -inline bool CSurfaceElementFEM::operator< (const CSurfaceElementFEM &other) const { return volElemID < other.volElemID; } - -inline CBoundaryFEM::CBoundaryFEM(void) { periodicBoundary = haloInfoNeededForBC = false; wallModel = nullptr;} - -inline CBoundaryFEM::~CBoundaryFEM(void) { delete wallModel; } - -inline CMeshFEM::CMeshFEM(void) : CGeometry() { blasFunctions = nullptr; } - -inline CMeshFEM::~CMeshFEM(void) { if( blasFunctions ) {delete blasFunctions; blasFunctions = nullptr;} } - -inline CBoundaryFEM* CMeshFEM::GetBoundaries(void) {return boundaries.data();} - -inline CPointFEM* CMeshFEM::GetMeshPoints(void) {return meshPoints.data();} - -inline unsigned long CMeshFEM::GetNMeshPoints(void) {return meshPoints.size();} - -inline unsigned long CMeshFEM::GetNVolElemOwned(void) {return nVolElemOwned;} - -inline unsigned long CMeshFEM::GetNVolElemTot(void) {return nVolElemTot;} - -inline CVolumeElementFEM* CMeshFEM::GetVolElem(void) {return volElem.data();} - -inline unsigned long* CMeshFEM::GetNVolElemOwnedPerTimeLevel(void) {return nVolElemOwnedPerTimeLevel.data();} - -inline unsigned long* CMeshFEM::GetNVolElemInternalPerTimeLevel(void) {return nVolElemInternalPerTimeLevel.data();} - -inline unsigned long* CMeshFEM::GetNVolElemHaloPerTimeLevel(void) {return nVolElemHaloPerTimeLevel.data();} - -inline vector > CMeshFEM::GetOwnedElemAdjLowTimeLevel(void) {return ownedElemAdjLowTimeLevel;} - -inline vector > CMeshFEM::GetHaloElemAdjLowTimeLevel(void) {return haloElemAdjLowTimeLevel;} - -inline unsigned short CMeshFEM::GetNStandardBoundaryFacesSol(void) {return standardBoundaryFacesSol.size();} - -inline CFEMStandardBoundaryFace* CMeshFEM::GetStandardBoundaryFacesSol(void) {return standardBoundaryFacesSol.data();} - -inline const vector& CMeshFEM::GetRanksRecv(void) const {return ranksRecv;} - -inline const vector& CMeshFEM::GetRanksSend(void) const {return ranksSend;} - -inline const vector >& CMeshFEM::GetEntitiesRecv(void) const {return entitiesRecv;} - -inline const vector >& CMeshFEM::GetEntitiesSend(void) const {return entitiesSend;} - -inline const vector& CMeshFEM::GetRotPerMarkers(void) const {return rotPerMarkers;} - -inline const vector >& CMeshFEM::GetRotPerHalos(void) const {return rotPerHalos;} - -inline CMeshFEM_DG::CMeshFEM_DG(void) : CMeshFEM() { } - -inline CMeshFEM_DG::~CMeshFEM_DG(void) { } - -inline void CMeshFEM_DG::SetGlobal_to_Local_Point(void) { - Global_to_Local_Point.clear(); - unsigned long ii = 0; - for(unsigned long i=0; isecond; - return -1; -} - -inline su2double* CMeshFEM_DG::GetTimeCoefADER_DG(void) {return timeCoefADER_DG.data();} - -inline su2double* CMeshFEM_DG::GetTimeInterpolDOFToIntegrationADER_DG(void) {return timeInterpolDOFToIntegrationADER_DG.data();} - -inline su2double* CMeshFEM_DG::GetTimeInterpolAdjDOFToIntegrationADER_DG(void) {return timeInterpolAdjDOFToIntegrationADER_DG.data();} - -inline unsigned long *CMeshFEM_DG::GetNMatchingFacesWithHaloElem(void) {return nMatchingFacesWithHaloElem.data();} - -inline unsigned long *CMeshFEM_DG::GetNMatchingFacesInternal(void) {return nMatchingFacesInternal.data();} - -inline CInternalFaceElementFEM* CMeshFEM_DG::GetMatchingFaces(void) {return matchingFaces.data();} - -inline unsigned short CMeshFEM_DG::GetNStandardElementsSol(void) {return standardElementsSol.size();} - -inline CFEMStandardElement* CMeshFEM_DG::GetStandardElementsSol(void) {return standardElementsSol.data();} - -inline unsigned short CMeshFEM_DG::GetNStandardMatchingFacesSol(void) {return standardMatchingFacesSol.size();} - -inline CFEMStandardInternalFace* CMeshFEM_DG::GetStandardMatchingFacesSol(void) {return standardMatchingFacesSol.data();} diff --git a/Common/include/fem_standard_element.hpp b/Common/include/fem_standard_element.hpp index c189e5ff41e..e85f6567674 100644 --- a/Common/include/fem_standard_element.hpp +++ b/Common/include/fem_standard_element.hpp @@ -7,7 +7,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -57,14 +57,14 @@ class CFEMStandardElementBase { public: /*! - * \brief Standard Constructor. Nothing to be done. + * \brief Constructor. Nothing to be done. */ - CFEMStandardElementBase(); + CFEMStandardElementBase() = default; /*! * \brief Destructor. Nothing to be done, because the vectors are deleted automatically. */ - virtual ~CFEMStandardElementBase(); + virtual ~CFEMStandardElementBase() = default; protected: /*! @@ -89,13 +89,13 @@ class CFEMStandardElementBase { * \brief Function, which makes available the type of the element. * \return The type of the element using the VTK convention. */ - unsigned short GetVTK_Type(void) const; + inline unsigned short GetVTK_Type(void) const {return VTK_Type;} /*! * \brief Function, which makes available the weights in the integration points. * \return The const pointer to data, which stores the weights in the integration points. */ - const su2double *GetWeightsIntegration(void) const; + inline const su2double* GetWeightsIntegration(void) const {return wIntegration.data();} /*! * \brief Static function, which makes available the number of DOFs for an element @@ -113,13 +113,13 @@ class CFEMStandardElementBase { * \brief Function, which makes available the number of integration points for this standard element. * \return The number of integration points of this standard element. */ - unsigned short GetNIntegration(void) const; + inline unsigned short GetNIntegration(void) const {return nIntegration;} /*! * \brief Function, which makes available the polynomial order that must be integrated exactly. * \return The polynomial order that must be integrated exactly. */ - unsigned short GetOrderExact(void); + inline unsigned short GetOrderExact(void){return orderExact;} /*! * \brief Static function, which computes the inverse of the given square matrix. @@ -842,16 +842,6 @@ class CFEMStandardElement : public CFEMStandardElementBase { vector subConn2ForPlotting; /*!< \brief Local subconnectivity of element type 2 of the high order element. Used for plotting. */ public: - /*! - * \brief Standard Constructor. Nothing to be done. - */ - CFEMStandardElement(); - - /*! - * \brief Destructor. Only the allocated pointers must be deleted explicitly. - */ - ~CFEMStandardElement() override; - /*! * \brief Alternative constructor. * \param[in] val_VTK_Type - Type of the element using the VTK convention. @@ -880,14 +870,14 @@ class CFEMStandardElement : public CFEMStandardElementBase { * \brief Copy constructor. * \param[in] other - Object, whose data must be copied. */ - CFEMStandardElement(const CFEMStandardElement &other); + CFEMStandardElement(const CFEMStandardElement &other) : CFEMStandardElementBase(other) {Copy(other);} /*! * \brief Assignment operator. * \param[in] other - Object, to which this object must be assigned. * \return The current object, after the member variables were assigned the correct value. */ - CFEMStandardElement& operator=(const CFEMStandardElement &other); + CFEMStandardElement& operator=(const CFEMStandardElement &other){Copy(other); return (*this);} /*! * \brief Function, which computes the Lagrangian basis functions for the @@ -915,158 +905,158 @@ class CFEMStandardElement : public CFEMStandardElementBase { * \brief Function, which makes available the values of the basis functions in the integration points. * \return The pointer to data, which stores the basis functions in the integration points. */ - su2double *GetBasisFunctionsIntegration(void); + inline su2double* GetBasisFunctionsIntegration(void){return lagBasisIntegration.data();} /*! * \brief Function, which makes available the transpose of the basis functions in the integration points. * \return The pointer to data, which stores the transpose matrix of the basis functions. */ - const su2double *GetBasisFunctionsIntegrationTrans(void) const; + inline const su2double* GetBasisFunctionsIntegrationTrans(void) const {return lagBasisIntegrationTrans.data();} /*! * \brief Function, which makes available the values of the basis functions in the solution DOFs. * \return The pointer to data, which stores the basis functions in the solution DOFs. */ - const su2double *GetBasisFunctionsSolDOFs(void) const; + inline const su2double* GetBasisFunctionsSolDOFs(void) const {return lagBasisSolDOFs.data();} /*! * \brief Function, which makes available the r-derivatives of the basis functions in the integration points. * \return The pointer to data, which stores the r-derivatives of the basis functions. */ - su2double *GetDrBasisFunctionsIntegration(void); + inline su2double* GetDrBasisFunctionsIntegration(void){return drLagBasisIntegration.data();} /*! * \brief Function, which makes available the s-derivatives of the basis functions in the integration points. * \return The pointer to data, which stores the s-derivatives of the basis functions. */ - su2double *GetDsBasisFunctionsIntegration(void); + inline su2double* GetDsBasisFunctionsIntegration(void){return dsLagBasisIntegration.data();} /*! * \brief Function, which makes available the t-derivatives of the basis functions in the integration points. * \return The pointer to data, which stores the t-derivatives of the basis functions. */ - su2double *GetDtBasisFunctionsIntegration(void); + inline su2double* GetDtBasisFunctionsIntegration(void){return dtLagBasisIntegration.data();} /*! * \brief Function, which makes available the matrix storage of the inverse of Vandermonde matrix of solution DOFs. * \return The pointer to matVandermondeInv. */ - const su2double *GetMatVandermondeInv(void) const; + inline const su2double* GetMatVandermondeInv(void) const {return matVandermondeInv.data();} /*! * \brief Function, which makes available the matrix storage of the basis functions in the integration points. * \return The pointer to matBasisIntegration. */ - const su2double *GetMatBasisFunctionsIntegration(void) const; + inline const su2double* GetMatBasisFunctionsIntegration(void) const {return matBasisIntegration.data();} /*! * \brief Function, which makes available the transpose matrix of the derivative of the basis functions in the integration points. * \return The pointer to matDerBasisIntTrans; */ - const su2double *GetDerMatBasisFunctionsIntTrans(void) const; + inline const su2double* GetDerMatBasisFunctionsIntTrans(void) const {return matDerBasisIntTrans.data();} /*! * \brief Function, which makes available the matrix storage of the derivative of the basis functions in the own DOFs. * \return The pointer to matDerBasisOwnDOFs. */ - const su2double *GetMatDerBasisFunctionsOwnDOFs(void) const; + inline const su2double *GetMatDerBasisFunctionsOwnDOFs(void) const {return matDerBasisOwnDOFs.data();} /*! * \brief Function, which makes available the matrix storage of the derivative of the basis functions in the solution DOFs. * \return The pointer to matDerBasisSolDOFs. */ - const su2double *GetMatDerBasisFunctionsSolDOFs(void) const; + inline const su2double *GetMatDerBasisFunctionsSolDOFs(void) const {return matDerBasisSolDOFs.data();} /*! * \brief Function, which makes available the matrix storage of the second derivativex of the basis functions in the integration points. * \return The pointer to mat2ndDerBasisInt. */ - const su2double *GetMat2ndDerBasisFunctionsInt(void) const; + inline const su2double *GetMat2ndDerBasisFunctionsInt(void) const {return mat2ndDerBasisInt.data();} /*! * \brief Function, which makes available the connectivity of face 0. * \return The pointer to data, which stores the connectivity of face 0. */ - unsigned short *GetConnFace0(void); + inline unsigned short *GetConnFace0(void) {return connFace0.data();} /*! * \brief Function, which makes available the connectivity of face 1. * \return The pointer to data, which stores the connectivity of face 1. */ - unsigned short *GetConnFace1(void); + inline unsigned short *GetConnFace1(void) {return connFace1.data();} /*! * \brief Function, which makes available the connectivity of face 2. * \return The pointer to data, which stores the connectivity of face 2. */ - unsigned short *GetConnFace2(void); + inline unsigned short *GetConnFace2(void) {return connFace2.data();} /*! * \brief Function, which makes available the connectivity of face 3. * \return The pointer to data, which stores the connectivity of face 3. */ - unsigned short *GetConnFace3(void); + inline unsigned short *GetConnFace3(void) {return connFace3.data();} /*! * \brief Function, which makes available the connectivity of face 4. * \return The pointer to data, which stores the connectivity of face 4. */ - unsigned short *GetConnFace4(void); + inline unsigned short *GetConnFace4(void) {return connFace4.data();} /*! * \brief Function, which makes available the connectivity of face 5. * \return The pointer to data, which stores the connectivity of face 5. */ - unsigned short *GetConnFace5(void); + inline unsigned short *GetConnFace5(void) {return connFace5.data();} /*! * \brief Function, which makes available the number of DOFs for this standard element. * \return The number of DOFs of this standard element. */ - unsigned short GetNDOFs(void) const; + inline unsigned short GetNDOFs(void) const {return nDOFs;} /*! * \brief Function, which makes available the polynomial degree for this standard element. * \return The polynomial degree of this standard element. */ - unsigned short GetNPoly(void) const; + inline unsigned short GetNPoly(void) const {return nPoly;} /*! * \brief Function, which makes available the type of the element in subConn1ForPlotting. * \return The type of the elements in subConn1ForPlotting using the VTK convention. */ - unsigned short GetVTK_Type1(void) const; + inline unsigned short GetVTK_Type1(void) const {return VTK_Type1;} /*! * \brief Function, which makes available the number of sub-elements of type 1 for plotting. * \return The number of sub-elements of type 1 for plotting. */ - unsigned short GetNSubElemsType1(void) const; + inline unsigned short GetNSubElemsType1(void) const {return subConn1ForPlotting.size()/GetNDOFsPerSubElem(GetVTK_Type1());} /*! * \brief Function, which makes available the the connectivity of the linear elements of type 1 as a const pointer. * \return The pointer to the local connectivity of the linear elements of type 1. */ - const unsigned short *GetSubConnType1(void) const; + inline const unsigned short *GetSubConnType1(void) const {return subConn1ForPlotting.data();} /*! * \brief Function, which makes available the type of the element in subConn2ForPlotting. * \return The type of the elements in subConn2ForPlotting using the VTK convention. */ - unsigned short GetVTK_Type2(void) const; + inline unsigned short GetVTK_Type2(void) const {return VTK_Type2;} /*! * \brief Function, which makes available the number of sub-elements of type 2 for plotting. * \return The number of sub-elements of type 2 for plotting. */ - unsigned short GetNSubElemsType2(void) const; + inline unsigned short GetNSubElemsType2(void) const {return subConn2ForPlotting.size()/GetNDOFsPerSubElem(GetVTK_Type2());} /*! * \brief Function, which makes available the the connectivity of the linear elements of type 2 as a const pointer. * \return The pointer to the local connectivity of the linear elements of type 2. */ - const unsigned short *GetSubConnType2(void) const; + inline const unsigned short *GetSubConnType2(void) const {return subConn2ForPlotting.data();} /*! * \brief Function, which makes available the number of DOFs of a linear element, used for plotting. @@ -1079,21 +1069,21 @@ class CFEMStandardElement : public CFEMStandardElementBase { const pointer to the vector. * \return The address of the vector, which stores the r-location of the DOFs. */ - const vector *GetRDOFs(void) const; + inline const vector *GetRDOFs(void) const {return &rDOFs;} /*! * \brief Function, which makes available the s-location of the DOFs as a const pointer to the vector. * \return The address of the vector, which stores the s-location of the DOFs. */ - const vector *GetSDOFs(void) const; + inline const vector *GetSDOFs(void) const {return &sDOFs;} /*! * \brief Function, which makes available the t-location of the DOFs as a const pointer to the vector. * \return The address of the vector, which stores the t-location of the DOFs. */ - const vector *GetTDOFs(void) const; + inline const vector *GetTDOFs(void) const {return &tDOFs;} /*! * \brief Function, which checks if the function arguments correspond to this standard element. @@ -1303,16 +1293,6 @@ class CFEMStandardInternalFace : public CFEMStandardElementBase { the residuals of the symmetrizing terms can be computed with a single matrix multiplication. */ public: - /*! - * \brief Standard Constructor. Initialize some pointers to NULL. - */ - CFEMStandardInternalFace(); - - /*! - * \brief Destructor. - */ - ~CFEMStandardInternalFace() override; - /*! * \brief Alternative constructor. * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention. @@ -1350,70 +1330,70 @@ class CFEMStandardInternalFace : public CFEMStandardElementBase { * \brief Copy constructor. * \param[in] other - Object, whose data must be copied. */ - CFEMStandardInternalFace(const CFEMStandardInternalFace &other); + CFEMStandardInternalFace(const CFEMStandardInternalFace &other) : CFEMStandardElementBase(other) {Copy(other);} /*! * \brief Assignment operator. * \param[in] other - Object, to which this object must be assigned. * \return The current object, after the member variables were assigned the correct value. */ - CFEMStandardInternalFace& operator=(const CFEMStandardInternalFace &other); + CFEMStandardInternalFace& operator=(const CFEMStandardInternalFace &other){Copy(other); return (*this);} /*! * \brief Function, which makes available the r-derivatives of the elements basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDrBasisElemIntegrationSide0(void); + inline su2double *GetDrBasisElemIntegrationSide0(void) {return drLagBasisElemIntegrationSide0.data();} /*! * \brief Function, which makes available the r-derivatives of the elements basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDrBasisElemIntegrationSide1(void); + inline su2double *GetDrBasisElemIntegrationSide1(void) {return drLagBasisElemIntegrationSide1.data();} /*! * \brief Function, which makes available the s-derivatives of the elements basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDsBasisElemIntegrationSide0(void); + inline su2double *GetDsBasisElemIntegrationSide0(void) {return dsLagBasisElemIntegrationSide0.data();} /*! * \brief Function, which makes available the s-derivatives of the elements basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDsBasisElemIntegrationSide1(void); + inline su2double *GetDsBasisElemIntegrationSide1(void) {return dsLagBasisElemIntegrationSide1.data();} /*! * \brief Function, which makes available the t-derivatives of the elements basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDtBasisElemIntegrationSide0(void); + inline su2double *GetDtBasisElemIntegrationSide0(void) {return dtLagBasisElemIntegrationSide0.data();} /*! * \brief Function, which makes available the t-derivatives of the elements basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDtBasisElemIntegrationSide1(void); + inline su2double *GetDtBasisElemIntegrationSide1(void) {return dtLagBasisElemIntegrationSide1.data();} /*! * \brief Function, which makes available the matrix with the derivatives of the element basis functions of side 0 in the integration points. * \return The const pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegrationSide0(void) const; + inline const su2double* GetMatDerBasisElemIntegrationSide0(void) const {return matDerBasisElemIntegrationSide0.data();} /*! * \brief Function, which makes available the matrix with the derivatives of the element basis functions of side 1 in the integration points. * \return The const pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegrationSide1(void) const; + inline const su2double* GetMatDerBasisElemIntegrationSide1(void) const {return matDerBasisElemIntegrationSide1.data();} /*! * \brief Function, which makes available the transpose of the matrix with @@ -1421,7 +1401,7 @@ class CFEMStandardInternalFace : public CFEMStandardElementBase { integration points. * \return The const pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegrationTransposeSide0(void) const; + inline const su2double* GetMatDerBasisElemIntegrationTransposeSide0(void) const {return matDerBasisElemIntegrationTransposeSide0.data();} /*! * \brief Function, which makes available the transpose of the matrix with @@ -1429,95 +1409,95 @@ class CFEMStandardInternalFace : public CFEMStandardElementBase { integration points. * \return The const pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegrationTransposeSide1(void) const; + inline const su2double* GetMatDerBasisElemIntegrationTransposeSide1(void) const {return matDerBasisElemIntegrationTransposeSide1.data();} /*! * \brief Function, which makes available the face basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegrationSide0(void) const; + inline const su2double* GetBasisFaceIntegrationSide0(void) const {return lagBasisFaceIntegrationSide0.data();} /*! * \brief Function, which makes available the face basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegrationSide1(void) const; + inline const su2double* GetBasisFaceIntegrationSide1(void) const {return lagBasisFaceIntegrationSide1.data();} /*! * \brief Function, which makes available transpose matrix of the face basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegrationTransposeSide0(void) const; + inline const su2double* GetBasisFaceIntegrationTransposeSide0(void) const {return lagBasisFaceIntegrationTransposeSide0.data();} /*! * \brief Function, which makes available transpose matrix of the face basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegrationTransposeSide1(void) const; + inline const su2double* GetBasisFaceIntegrationTransposeSide1(void) const {return lagBasisFaceIntegrationTransposeSide1.data();} /*! * \brief Function, which makes available the r-derivatives of the face basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDrBasisFaceIntegrationSide0(void); + inline su2double* GetDrBasisFaceIntegrationSide0(void) {return drLagBasisFaceIntegrationSide0.data();} /*! * \brief Function, which makes available the r-derivatives of the face basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDrBasisFaceIntegrationSide1(void); + inline su2double* GetDrBasisFaceIntegrationSide1(void) {return drLagBasisFaceIntegrationSide1.data();} /*! * \brief Function, which makes available the s-derivatives of the face basis functions of side 0 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDsBasisFaceIntegrationSide0(void); + inline su2double* GetDsBasisFaceIntegrationSide0(void) {return dsLagBasisFaceIntegrationSide0.data();} /*! * \brief Function, which makes available the s-derivatives of the face basis functions of side 1 in the integration points. * \return The pointer to data, which stores this information. */ - su2double *GetDsBasisFaceIntegrationSide1(void); + inline su2double* GetDsBasisFaceIntegrationSide1(void) {return dsLagBasisFaceIntegrationSide1.data();} /*! * \brief Function, which makes available the number of DOFs of the element on side 0 of the face. * \return The number of DOFs of the element on side 0. */ - unsigned short GetNDOFsElemSide0(void) const; + inline unsigned short GetNDOFsElemSide0(void) const {return nDOFsElemSide0;} /*! * \brief Function, which makes available the number of DOFs of the element on side 1 of the face. * \return The number of DOFs on side 1. */ - unsigned short GetNDOFsElemSide1(void) const; + inline unsigned short GetNDOFsElemSide1(void) const {return nDOFsElemSide1;} /*! * \brief Function, which makes available the number of DOFs on side 0 of the face. * \return The number of DOFs on side 0. */ - unsigned short GetNDOFsFaceSide0(void) const; + inline unsigned short GetNDOFsFaceSide0(void) const {return nDOFsFaceSide0;} /*! * \brief Function, which makes available the number of DOFs on side 1 of the face. * \return The number of DOFs on side 1. */ - unsigned short GetNDOFsFaceSide1(void) const; + inline unsigned short GetNDOFsFaceSide1(void) const {return nDOFsFaceSide1;} /*! * \brief Function, which makes available the penalty constant for this standard face. * \return The penalty constant. */ - su2double GetPenaltyConstant(void) const; + inline su2double GetPenaltyConstant(void) const {return penaltyConstantFace;} /*! * \brief Function, which checks if the function arguments correspond to this standard face. @@ -1613,16 +1593,6 @@ class CFEMStandardBoundaryFace : public CFEMStandardElementBase { vector subConnForPlotting; /*!< \brief Local subconnectivity of the high order element. Used for plotting. */ public: - /*! - * \brief Standard Constructor. Initialize some pointers to NULL. - */ - CFEMStandardBoundaryFace(); - - /*! - * \brief Destructor. Nothing to be done, because the vectors are deleted automatically. - */ - ~CFEMStandardBoundaryFace() override; - /*! * \brief Alternative constructor. * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention. @@ -1647,42 +1617,42 @@ class CFEMStandardBoundaryFace : public CFEMStandardElementBase { * \brief Copy constructor. * \param[in] other - Object, whose data must be copied. */ - CFEMStandardBoundaryFace(const CFEMStandardBoundaryFace &other); + CFEMStandardBoundaryFace(const CFEMStandardBoundaryFace &other) : CFEMStandardElementBase(other) {Copy(other);} /*! * \brief Assignment operator. * \param[in] other - Object, to which this object must be assigned. * \return The current object, after the member variables were assigned the correct value. */ - CFEMStandardBoundaryFace& operator=(const CFEMStandardBoundaryFace &other); + CFEMStandardBoundaryFace& operator=(const CFEMStandardBoundaryFace &other){Copy(other); return (*this);} /*! * \brief Function, which makes available the r-derivatives of the element basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetDrBasisElemIntegration(void) const; + inline const su2double* GetDrBasisElemIntegration(void) const {return drLagBasisElemIntegration.data();} /*! * \brief Function, which makes available the s-derivatives of the element basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetDsBasisElemIntegration(void) const; + inline const su2double* GetDsBasisElemIntegration(void) const {return dsLagBasisElemIntegration.data();} /*! * \brief Function, which makes available the t-derivatives of the element basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetDtBasisElemIntegration(void) const; + inline const su2double* GetDtBasisElemIntegration(void) const {return dtLagBasisElemIntegration.data();} /*! * \brief Function, which makes available the matrix with the derivatives of the element basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegration(void) const; + inline const su2double* GetMatDerBasisElemIntegration(void) const {return matDerBasisElemIntegration.data();} /*! * \brief Function, which makes available the transpose of the matrix with @@ -1690,55 +1660,55 @@ class CFEMStandardBoundaryFace : public CFEMStandardElementBase { points. * \return The const pointer to data, which stores this information. */ - const su2double *GetMatDerBasisElemIntegrationTranspose(void) const; + inline const su2double* GetMatDerBasisElemIntegrationTranspose(void) const {return matDerBasisElemIntegrationTranspose.data();} /*! * \brief Function, which makes available the face basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegration(void) const; + inline const su2double* GetBasisFaceIntegration(void) const {return lagBasisFaceIntegration.data();} /*! * \brief Function, which makes available transpose matrix of the face basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetBasisFaceIntegrationTranspose(void) const; + inline const su2double* GetBasisFaceIntegrationTranspose(void) const {return lagBasisFaceIntegrationTranspose.data();} /*! * \brief Function, which makes available the r-derivatives of the face basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetDrBasisFaceIntegration(void) const; + inline const su2double* GetDrBasisFaceIntegration(void) const {return drLagBasisFaceIntegration.data();} /*! * \brief Function, which makes available the s-derivatives of the face basis functions in the integration points. * \return The pointer to data, which stores this information. */ - const su2double *GetDsBasisFaceIntegration(void) const; + inline const su2double* GetDsBasisFaceIntegration(void) const {return dsLagBasisFaceIntegration.data();} /*! * \brief Function, which makes available the number of DOFs of the adjacent element. * \return The number of DOFs of the element. */ - unsigned short GetNDOFsElem(void) const; + inline unsigned short GetNDOFsElem(void) const {return nDOFsElem;} /*! * \brief Function, which makes available the number of DOFs of the face. * \return The number of DOFs of the face. */ - unsigned short GetNDOFsFace(void) const; + inline unsigned short GetNDOFsFace(void) const {return nDOFsFace;} /*! * \brief Function, which makes available the number of linear subfaces used for plotting, among others. * \return The number of linear subfaces of the face. */ - unsigned short GetNSubFaces(void) const; + inline unsigned short GetNSubFaces(void) const {return subConnForPlotting.size()/GetNDOFsPerSubFace();} /*! * \brief Function, which makes available the number of DOFs of a linear subface, used @@ -1751,14 +1721,14 @@ class CFEMStandardBoundaryFace : public CFEMStandardElementBase { * \brief Function, which makes available the penalty constant for this standard face. * \return The penalty constant. */ - su2double GetPenaltyConstant(void) const; + inline su2double GetPenaltyConstant(void) const {return penaltyConstantFace;} /*! * \brief Function, which makes available the the connectivity of the linear subfaces as a const pointer. * \return The pointer to the local connectivity of the linear subfaces. */ - const unsigned short *GetSubFaceConn(void) const; + inline const unsigned short* GetSubFaceConn(void) const {return subConnForPlotting.data();} /*! * \brief Function, which checks if the function arguments correspond to this standard face. @@ -1798,5 +1768,3 @@ class CFEMStandardBoundaryFace : public CFEMStandardElementBase { */ void Copy(const CFEMStandardBoundaryFace &other); }; - -#include "fem_standard_element.inl" diff --git a/Common/include/fem_standard_element.inl b/Common/include/fem_standard_element.inl deleted file mode 100644 index bad6aa6cf2e..00000000000 --- a/Common/include/fem_standard_element.inl +++ /dev/null @@ -1,196 +0,0 @@ -/*! - * \file fem_standard_element.inl - * \brief In-Line subroutines of the fem_standard_element.hpp file. - * \author E. van der Weide - * \version 7.0.4 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -inline CFEMStandardElementBase::CFEMStandardElementBase(){} - -inline CFEMStandardElementBase::~CFEMStandardElementBase(){} - -inline unsigned short CFEMStandardElementBase::GetVTK_Type(void) const {return VTK_Type;} - -inline const su2double* CFEMStandardElementBase::GetWeightsIntegration(void) const {return wIntegration.data();} - -inline unsigned short CFEMStandardElementBase::GetNIntegration(void) const {return nIntegration;} - -inline unsigned short CFEMStandardElementBase::GetOrderExact(void){return orderExact;} - -inline CFEMStandardElement::CFEMStandardElement(){} - -inline CFEMStandardElement::~CFEMStandardElement(){} - -inline CFEMStandardElement::CFEMStandardElement(const CFEMStandardElement &other) : CFEMStandardElementBase(other) {Copy(other);} - -inline CFEMStandardElement& CFEMStandardElement::operator=(const CFEMStandardElement &other){Copy(other); return (*this);} - -inline su2double* CFEMStandardElement::GetBasisFunctionsIntegration(void){return lagBasisIntegration.data();} - -inline const su2double* CFEMStandardElement::GetBasisFunctionsIntegrationTrans(void) const {return lagBasisIntegrationTrans.data();} - -inline const su2double* CFEMStandardElement::GetBasisFunctionsSolDOFs(void) const {return lagBasisSolDOFs.data();} - -inline su2double* CFEMStandardElement::GetDrBasisFunctionsIntegration(void){return drLagBasisIntegration.data();} - -inline su2double* CFEMStandardElement::GetDsBasisFunctionsIntegration(void){return dsLagBasisIntegration.data();} - -inline su2double* CFEMStandardElement::GetDtBasisFunctionsIntegration(void){return dtLagBasisIntegration.data();} - -inline const su2double* CFEMStandardElement::GetMatVandermondeInv(void) const {return matVandermondeInv.data();} - -inline const su2double* CFEMStandardElement::GetMatBasisFunctionsIntegration(void) const {return matBasisIntegration.data();} - -inline const su2double* CFEMStandardElement::GetDerMatBasisFunctionsIntTrans(void) const {return matDerBasisIntTrans.data();} - -inline const su2double* CFEMStandardElement::GetMatDerBasisFunctionsOwnDOFs(void) const {return matDerBasisOwnDOFs.data();} - -inline const su2double* CFEMStandardElement::GetMatDerBasisFunctionsSolDOFs(void) const {return matDerBasisSolDOFs.data();} - -inline const su2double* CFEMStandardElement::GetMat2ndDerBasisFunctionsInt(void) const {return mat2ndDerBasisInt.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace0(void){return connFace0.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace1(void){return connFace1.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace2(void){return connFace2.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace3(void){return connFace3.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace4(void){return connFace4.data();} - -inline unsigned short* CFEMStandardElement::GetConnFace5(void){return connFace5.data();} - -inline unsigned short CFEMStandardElement::GetNDOFs(void) const {return nDOFs;} - -inline unsigned short CFEMStandardElement::GetNPoly(void) const {return nPoly;} - -inline unsigned short CFEMStandardElement::GetVTK_Type1(void) const {return VTK_Type1;} - -inline unsigned short CFEMStandardElement::GetNSubElemsType1(void) const {return subConn1ForPlotting.size()/GetNDOFsPerSubElem(GetVTK_Type1());} - -inline const unsigned short* CFEMStandardElement::GetSubConnType1(void) const {return subConn1ForPlotting.data();} - -inline unsigned short CFEMStandardElement::GetVTK_Type2(void) const {return VTK_Type2;} - -inline unsigned short CFEMStandardElement::GetNSubElemsType2(void) const {return subConn2ForPlotting.size()/GetNDOFsPerSubElem(GetVTK_Type2());} - -inline const unsigned short* CFEMStandardElement::GetSubConnType2(void) const {return subConn2ForPlotting.data();} - -inline const vector* CFEMStandardElement::GetRDOFs(void) const {return &rDOFs;} - -inline const vector* CFEMStandardElement::GetSDOFs(void) const {return &sDOFs;} - -inline const vector* CFEMStandardElement::GetTDOFs(void) const {return &tDOFs;} - -inline CFEMStandardInternalFace::CFEMStandardInternalFace(){} - -inline CFEMStandardInternalFace::~CFEMStandardInternalFace(){} - -inline CFEMStandardInternalFace::CFEMStandardInternalFace(const CFEMStandardInternalFace &other) : CFEMStandardElementBase(other) {Copy(other);} - -inline CFEMStandardInternalFace& CFEMStandardInternalFace::operator=(const CFEMStandardInternalFace &other){Copy(other); return (*this);} - -inline su2double* CFEMStandardInternalFace::GetDrBasisElemIntegrationSide0(void) {return drLagBasisElemIntegrationSide0.data();} - -inline su2double* CFEMStandardInternalFace::GetDrBasisElemIntegrationSide1(void) {return drLagBasisElemIntegrationSide1.data();} - -inline su2double* CFEMStandardInternalFace::GetDsBasisElemIntegrationSide0(void) {return dsLagBasisElemIntegrationSide0.data();} - -inline su2double* CFEMStandardInternalFace::GetDsBasisElemIntegrationSide1(void) {return dsLagBasisElemIntegrationSide1.data();} - -inline su2double* CFEMStandardInternalFace::GetDtBasisElemIntegrationSide0(void) {return dtLagBasisElemIntegrationSide0.data();} - -inline su2double* CFEMStandardInternalFace::GetDtBasisElemIntegrationSide1(void) {return dtLagBasisElemIntegrationSide1.data();} - -inline const su2double* CFEMStandardInternalFace::GetMatDerBasisElemIntegrationSide0(void) const {return matDerBasisElemIntegrationSide0.data();} - -inline const su2double* CFEMStandardInternalFace::GetMatDerBasisElemIntegrationSide1(void) const {return matDerBasisElemIntegrationSide1.data();} - -inline const su2double* CFEMStandardInternalFace::GetMatDerBasisElemIntegrationTransposeSide0(void) const {return matDerBasisElemIntegrationTransposeSide0.data();} - -inline const su2double* CFEMStandardInternalFace::GetMatDerBasisElemIntegrationTransposeSide1(void) const {return matDerBasisElemIntegrationTransposeSide1.data();} - -inline const su2double* CFEMStandardInternalFace::GetBasisFaceIntegrationSide0(void) const {return lagBasisFaceIntegrationSide0.data();} - -inline const su2double* CFEMStandardInternalFace::GetBasisFaceIntegrationSide1(void) const {return lagBasisFaceIntegrationSide1.data();} - -inline const su2double* CFEMStandardInternalFace::GetBasisFaceIntegrationTransposeSide0(void) const {return lagBasisFaceIntegrationTransposeSide0.data();} - -inline const su2double* CFEMStandardInternalFace::GetBasisFaceIntegrationTransposeSide1(void) const {return lagBasisFaceIntegrationTransposeSide1.data();} - -inline su2double* CFEMStandardInternalFace::GetDrBasisFaceIntegrationSide0(void) {return drLagBasisFaceIntegrationSide0.data();} - -inline su2double* CFEMStandardInternalFace::GetDrBasisFaceIntegrationSide1(void) {return drLagBasisFaceIntegrationSide1.data();} - -inline su2double* CFEMStandardInternalFace::GetDsBasisFaceIntegrationSide0(void) {return dsLagBasisFaceIntegrationSide0.data();} - -inline su2double* CFEMStandardInternalFace::GetDsBasisFaceIntegrationSide1(void) {return dsLagBasisFaceIntegrationSide1.data();} - -inline unsigned short CFEMStandardInternalFace::GetNDOFsElemSide0(void) const {return nDOFsElemSide0;} - -inline unsigned short CFEMStandardInternalFace::GetNDOFsElemSide1(void) const {return nDOFsElemSide1;} - -inline unsigned short CFEMStandardInternalFace::GetNDOFsFaceSide0(void) const {return nDOFsFaceSide0;} - -inline unsigned short CFEMStandardInternalFace::GetNDOFsFaceSide1(void) const {return nDOFsFaceSide1;} - -inline su2double CFEMStandardInternalFace::GetPenaltyConstant(void) const {return penaltyConstantFace;} - -inline CFEMStandardBoundaryFace::CFEMStandardBoundaryFace(){} - -inline CFEMStandardBoundaryFace::~CFEMStandardBoundaryFace(){} - -inline CFEMStandardBoundaryFace::CFEMStandardBoundaryFace(const CFEMStandardBoundaryFace &other) : CFEMStandardElementBase(other) {Copy(other);} - -inline CFEMStandardBoundaryFace& CFEMStandardBoundaryFace::operator=(const CFEMStandardBoundaryFace &other){Copy(other); return (*this);} - -inline const su2double* CFEMStandardBoundaryFace::GetDrBasisElemIntegration(void) const {return drLagBasisElemIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetDsBasisElemIntegration(void) const {return dsLagBasisElemIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetDtBasisElemIntegration(void) const {return dtLagBasisElemIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetMatDerBasisElemIntegration(void) const {return matDerBasisElemIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetMatDerBasisElemIntegrationTranspose(void) const {return matDerBasisElemIntegrationTranspose.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetBasisFaceIntegration(void) const {return lagBasisFaceIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetBasisFaceIntegrationTranspose(void) const {return lagBasisFaceIntegrationTranspose.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetDrBasisFaceIntegration(void) const {return drLagBasisFaceIntegration.data();} - -inline const su2double* CFEMStandardBoundaryFace::GetDsBasisFaceIntegration(void) const {return dsLagBasisFaceIntegration.data();} - -inline unsigned short CFEMStandardBoundaryFace::GetNDOFsElem(void) const {return nDOFsElem;} - -inline unsigned short CFEMStandardBoundaryFace::GetNDOFsFace(void) const {return nDOFsFace;} - -inline unsigned short CFEMStandardBoundaryFace::GetNSubFaces(void) const {return subConnForPlotting.size()/GetNDOFsPerSubFace();} - -inline su2double CFEMStandardBoundaryFace::GetPenaltyConstant(void) const {return penaltyConstantFace;} - -inline const unsigned short* CFEMStandardBoundaryFace::GetSubFaceConn(void) const {return subConnForPlotting.data();} diff --git a/Common/include/wall_model.hpp b/Common/include/wall_model.hpp index 2c04c03d15d..319019ec339 100644 --- a/Common/include/wall_model.hpp +++ b/Common/include/wall_model.hpp @@ -6,7 +6,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -57,7 +57,7 @@ class CWallModel { /*! * \brief Destructor of the class. */ - virtual ~CWallModel(void); + virtual ~CWallModel(void) = default; /*! * \brief Virtual function, which computes the wall shear stress and heat flux @@ -81,7 +81,7 @@ class CWallModel { const su2double velExchange, const su2double muExchange, const su2double pExchange, - const su2double Wall_HeatFlux, + const su2double Wall_HeatFlux, const bool HeatFlux_Prescribed, const su2double TWall, const bool Temperature_Prescribed, @@ -117,11 +117,6 @@ class CWallModel1DEQ : public CWallModel { CWallModel1DEQ(CConfig *config, const string &Marker_Tag); - /*! - * \brief Destructor of the class. - */ - ~CWallModel1DEQ(void) override; - /*! * \brief Function, which computes the wall shear stress and heat flux from the data at the exchange location. @@ -169,9 +164,9 @@ class CWallModel1DEQ : public CWallModel { }; class CWallModelLogLaw : public CWallModel { - + public: - + /*! * \brief Constructor of the class, which initializes the object. * \param[in] config - Definition of the particular problem. @@ -180,12 +175,7 @@ class CWallModelLogLaw : public CWallModel { */ CWallModelLogLaw(CConfig *config, const string &Marker_Tag); - - /*! - * \brief Destructor of the class. - */ - ~CWallModelLogLaw(void) override; - + /*! * \brief Function, which computes the wall shear stress and heat flux from the data at the exchange location. @@ -217,7 +207,7 @@ class CWallModelLogLaw : public CWallModel { su2double &qWall, su2double &ViscosityWall, su2double &kOverCvWall) override; - + private: su2double C; /*!< \brief Constant to match the Reichardt BL profile. */ @@ -227,5 +217,3 @@ class CWallModelLogLaw : public CWallModel { */ CWallModelLogLaw(void); }; - -#include "wall_model.inl" diff --git a/Common/include/wall_model.inl b/Common/include/wall_model.inl deleted file mode 100644 index 9e7657f6f2e..00000000000 --- a/Common/include/wall_model.inl +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * \file wall_model.inl - * \brief In-Line subroutines of the wall_model.hpp file. - * \author E. van der Weide, T. Economon, P. Urbanczyk - * \version 7.0.4 "Blackbird" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -inline CWallModel::~CWallModel(void){} - -inline CWallModel1DEQ::~CWallModel1DEQ(void){} - -inline CWallModelLogLaw::~CWallModelLogLaw(void){} - diff --git a/Common/src/fem_geometry_structure.cpp b/Common/src/fem_geometry_structure.cpp index 518759f8c3b..cdbc4dc1113 100644 --- a/Common/src/fem_geometry_structure.cpp +++ b/Common/src/fem_geometry_structure.cpp @@ -44,12 +44,6 @@ bool CLong3T::operator<(const CLong3T &other) const { return false; } -void CLong3T::Copy(const CLong3T &other) { - long0 = other.long0; - long1 = other.long1; - long2 = other.long2; -} - CReorderElements::CReorderElements(const unsigned long val_GlobalElemID, const unsigned short val_TimeLevel, const bool val_CommSolution, @@ -91,13 +85,6 @@ bool CReorderElements::operator< (const CReorderElements &other) const { return globalElemID < other.globalElemID; } -void CReorderElements::Copy(const CReorderElements &other) { - globalElemID = other.globalElemID; - timeLevel = other.timeLevel; - commSolution = other.commSolution; - elemType = other.elemType; -} - bool CSortFaces::operator()(const CFaceOfElement &f0, const CFaceOfElement &f1) { @@ -207,14 +194,6 @@ bool CSortBoundaryFaces::operator()(const CSurfaceElementFEM &f0, return f0.volElemID < f1.volElemID; } -void CPointFEM::Copy(const CPointFEM &other) { - globalID = other.globalID; - periodIndexToDonor = other.periodIndexToDonor; - coor[0] = other.coor[0]; - coor[1] = other.coor[1]; - coor[2] = other.coor[2]; -} - bool CPointFEM::operator< (const CPointFEM &other) const { if(periodIndexToDonor != other.periodIndexToDonor) return periodIndexToDonor < other.periodIndexToDonor; @@ -257,33 +236,6 @@ bool CInternalFaceElementFEM::operator<(const CInternalFaceElementFEM &other) co return elemID1 < other.elemID1; } -void CInternalFaceElementFEM::Copy(const CInternalFaceElementFEM &other) { - - VTK_Type = other.VTK_Type; - indStandardElement = other.indStandardElement; - - elemID0 = other.elemID0; - elemID1 = other.elemID1; - - DOFsGridFaceSide0 = other.DOFsGridFaceSide0; - DOFsGridFaceSide1 = other.DOFsGridFaceSide1; - DOFsSolFaceSide0 = other.DOFsSolFaceSide0; - DOFsSolFaceSide1 = other.DOFsSolFaceSide1; - - DOFsGridElementSide0 = other.DOFsGridElementSide0; - DOFsGridElementSide1 = other.DOFsGridElementSide1; - DOFsSolElementSide0 = other.DOFsSolElementSide0; - DOFsSolElementSide1 = other.DOFsSolElementSide1; - - metricNormalsFace = other.metricNormalsFace; - metricCoorDerivFace0 = other.metricCoorDerivFace0; - metricCoorDerivFace1 = other.metricCoorDerivFace1; - - coorIntegrationPoints = other.coorIntegrationPoints; - gridVelocities = other.gridVelocities; - wallDistance = other.wallDistance; -} - void CSurfaceElementFEM::GetCornerPointsFace(unsigned short &nPointsPerFace, unsigned long faceConn[]) { @@ -298,32 +250,6 @@ void CSurfaceElementFEM::GetCornerPointsFace(unsigned short &nPointsPerFace, } } -void CSurfaceElementFEM::Copy(const CSurfaceElementFEM &other) { - VTK_Type = other.VTK_Type; - nPolyGrid = other.nPolyGrid; - nDOFsGrid = other.nDOFsGrid; - indStandardElement = other.indStandardElement; - volElemID = other.volElemID; - boundElemIDGlobal = other.boundElemIDGlobal; - nodeIDsGrid = other.nodeIDsGrid; - - DOFsGridFace = other.DOFsGridFace; - DOFsSolFace = other.DOFsSolFace; - DOFsGridElement = other.DOFsGridElement; - DOFsSolElement = other.DOFsSolElement; - - metricNormalsFace = other.metricNormalsFace; - metricCoorDerivFace = other.metricCoorDerivFace; - coorIntegrationPoints = other.coorIntegrationPoints; - gridVelocities = other.gridVelocities; - wallDistance = other.wallDistance; - - donorsWallFunction = other.donorsWallFunction; - nIntPerWallFunctionDonor = other.nIntPerWallFunctionDonor; - intPerWallFunctionDonor = other.intPerWallFunctionDonor; - matWallFunctionDonor = other.matWallFunctionDonor; -} - CMeshFEM::CMeshFEM(CGeometry *geometry, CConfig *config) { /*--- Allocate the memory for blasFunctions. ---*/ @@ -2514,6 +2440,16 @@ CMeshFEM_DG::CMeshFEM_DG(CGeometry *geometry, CConfig *config) : CMeshFEM(geometry, config) { } +void CMeshFEM_DG::SetGlobal_to_Local_Point(void) { + Global_to_Local_Point.clear(); + unsigned long ii = 0; + for(unsigned long i=0; i Date: Sun, 24 May 2020 13:46:30 +0100 Subject: [PATCH 2/2] move files --- .../include/{ => fem}/fem_cgns_elements.hpp | 6 +- .../{ => fem}/fem_gauss_jacobi_quadrature.hpp | 2 +- .../{ => fem}/fem_geometry_structure.hpp | 6 +- .../{ => fem}/fem_standard_element.hpp | 2 +- .../{ => fem}/geometry_structure_fem_part.hpp | 2 +- Common/include/geometry/CGeometry.hpp | 2 +- Common/lib/Makefile.am | 16 ++--- Common/src/CConfig.cpp | 52 +++++++------- Common/src/{ => fem}/fem_cgns_elements.cpp | 10 +-- .../{ => fem}/fem_gauss_jacobi_quadrature.cpp | 70 +++++++++---------- .../src/{ => fem}/fem_geometry_structure.cpp | 8 +-- .../src/{ => fem}/fem_integration_rules.cpp | 6 +- Common/src/{ => fem}/fem_standard_element.cpp | 8 +-- Common/src/{ => fem}/fem_wall_distance.cpp | 4 +- .../src/{ => fem}/fem_work_estimate_metis.cpp | 4 +- .../{ => fem}/geometry_structure_fem_part.cpp | 14 ++-- Common/src/fem/meson.build | 8 +++ Common/src/meson.build | 11 +-- SU2_CFD/include/SU2_CFD.hpp | 2 +- SU2_CFD/include/definition_structure.hpp | 2 +- SU2_CFD/include/solvers/CSolver.hpp | 2 +- .../src/output/filewriter/CFEMDataSorter.cpp | 10 +-- .../filewriter/CSurfaceFEMDataSorter.cpp | 20 +++--- SU2_DOT/include/SU2_DOT.hpp | 2 +- 24 files changed, 135 insertions(+), 134 deletions(-) rename Common/include/{ => fem}/fem_cgns_elements.hpp (98%) rename Common/include/{ => fem}/fem_gauss_jacobi_quadrature.hpp (99%) rename Common/include/{ => fem}/fem_geometry_structure.hpp (99%) rename Common/include/{ => fem}/fem_standard_element.hpp (99%) rename Common/include/{ => fem}/geometry_structure_fem_part.hpp (99%) rename Common/src/{ => fem}/fem_cgns_elements.cpp (99%) rename Common/src/{ => fem}/fem_gauss_jacobi_quadrature.cpp (96%) rename Common/src/{ => fem}/fem_geometry_structure.cpp (99%) rename Common/src/{ => fem}/fem_integration_rules.cpp (99%) rename Common/src/{ => fem}/fem_standard_element.cpp (99%) rename Common/src/{ => fem}/fem_wall_distance.cpp (99%) rename Common/src/{ => fem}/fem_work_estimate_metis.cpp (94%) rename Common/src/{ => fem}/geometry_structure_fem_part.cpp (99%) create mode 100644 Common/src/fem/meson.build diff --git a/Common/include/fem_cgns_elements.hpp b/Common/include/fem/fem_cgns_elements.hpp similarity index 98% rename from Common/include/fem_cgns_elements.hpp rename to Common/include/fem/fem_cgns_elements.hpp index 2e34ca41b37..8485197fa8b 100644 --- a/Common/include/fem_cgns_elements.hpp +++ b/Common/include/fem/fem_cgns_elements.hpp @@ -8,7 +8,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -29,13 +29,13 @@ #pragma once -#include "./mpi_structure.hpp" +#include "../mpi_structure.hpp" #ifdef HAVE_CGNS #include "cgnslib.h" #endif -#include "geometry/primal_grid/CPrimalGridFEM.hpp" +#include "../geometry/primal_grid/CPrimalGridFEM.hpp" /* Forward declaration of CBoundaryFace to avoid problems. */ class CBoundaryFace; diff --git a/Common/include/fem_gauss_jacobi_quadrature.hpp b/Common/include/fem/fem_gauss_jacobi_quadrature.hpp similarity index 99% rename from Common/include/fem_gauss_jacobi_quadrature.hpp rename to Common/include/fem/fem_gauss_jacobi_quadrature.hpp index f5e37a9dda7..86f3d9eed17 100644 --- a/Common/include/fem_gauss_jacobi_quadrature.hpp +++ b/Common/include/fem/fem_gauss_jacobi_quadrature.hpp @@ -86,7 +86,7 @@ Tom #include #include -#include "CConfig.hpp" +#include "../CConfig.hpp" using namespace std; diff --git a/Common/include/fem_geometry_structure.hpp b/Common/include/fem/fem_geometry_structure.hpp similarity index 99% rename from Common/include/fem_geometry_structure.hpp rename to Common/include/fem/fem_geometry_structure.hpp index 58829e7eb94..d4aa464d2c5 100644 --- a/Common/include/fem_geometry_structure.hpp +++ b/Common/include/fem/fem_geometry_structure.hpp @@ -28,13 +28,13 @@ #pragma once -#include "geometry/CGeometry.hpp" +#include "../geometry/CGeometry.hpp" #include "fem_standard_element.hpp" #ifdef HAVE_CGNS #include "fem_cgns_elements.hpp" #endif -#include "wall_model.hpp" -#include "blas_structure.hpp" +#include "../wall_model.hpp" +#include "../blas_structure.hpp" using namespace std; diff --git a/Common/include/fem_standard_element.hpp b/Common/include/fem/fem_standard_element.hpp similarity index 99% rename from Common/include/fem_standard_element.hpp rename to Common/include/fem/fem_standard_element.hpp index e85f6567674..6cdfb56c2da 100644 --- a/Common/include/fem_standard_element.hpp +++ b/Common/include/fem/fem_standard_element.hpp @@ -32,7 +32,7 @@ #include #include -#include "CConfig.hpp" +#include "../CConfig.hpp" using namespace std; diff --git a/Common/include/geometry_structure_fem_part.hpp b/Common/include/fem/geometry_structure_fem_part.hpp similarity index 99% rename from Common/include/geometry_structure_fem_part.hpp rename to Common/include/fem/geometry_structure_fem_part.hpp index dbe3a73ba05..fae54f7c009 100644 --- a/Common/include/geometry_structure_fem_part.hpp +++ b/Common/include/fem/geometry_structure_fem_part.hpp @@ -27,7 +27,7 @@ #pragma once -#include "datatype_structure.hpp" +#include "../datatype_structure.hpp" #include #include diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 3e3e4392a03..2b087d1234e 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -59,7 +59,7 @@ extern "C" { #include "dual_grid/CTurboVertex.hpp" #include "../CConfig.hpp" -#include "../geometry_structure_fem_part.hpp" +#include "../fem/geometry_structure_fem_part.hpp" #include "../toolboxes/graph_toolbox.hpp" #include "../adt_structure.hpp" diff --git a/Common/lib/Makefile.am b/Common/lib/Makefile.am index ff1cf56c7f9..792bf2cf535 100644 --- a/Common/lib/Makefile.am +++ b/Common/lib/Makefile.am @@ -45,22 +45,22 @@ noinst_LIBRARIES += libSU2_AD.a endif lib_sources = \ - ../src/fem_cgns_elements.cpp \ + ../src/fem/fem_cgns_elements.cpp \ ../src/CConfig.cpp \ ../src/blas_structure.cpp \ - ../src/fem_geometry_structure.cpp \ - ../src/fem_integration_rules.cpp \ - ../src/fem_standard_element.cpp \ - ../src/fem_wall_distance.cpp \ - ../src/fem_work_estimate_metis.cpp \ + ../src/fem/fem_geometry_structure.cpp \ + ../src/fem/fem_integration_rules.cpp \ + ../src/fem/fem_standard_element.cpp \ + ../src/fem/fem_wall_distance.cpp \ + ../src/fem/fem_work_estimate_metis.cpp \ ../src/CMultiGridQueue.cpp \ - ../src/geometry_structure_fem_part.cpp \ + ../src/fem/geometry_structure_fem_part.cpp \ ../src/graph_coloring_structure.cpp \ ../src/grid_adaptation_structure.cpp \ ../src/grid_movement_structure.cpp \ ../src/mpi_structure.cpp \ ../src/ad_structure.cpp \ - ../src/fem_gauss_jacobi_quadrature.cpp \ + ../src/fem/fem_gauss_jacobi_quadrature.cpp \ ../src/geometry/CGeometry.cpp \ ../src/geometry/CPhysicalGeometry.cpp \ ../src/geometry/CMultiGridGeometry.cpp \ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 14bfaa5638c..b00af1970dd 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -29,8 +29,8 @@ #include "../include/CConfig.hpp" #undef ENABLE_MAPS -#include "../include/fem_gauss_jacobi_quadrature.hpp" -#include "../include/fem_geometry_structure.hpp" +#include "../include/fem/fem_gauss_jacobi_quadrature.hpp" +#include "../include/fem/fem_geometry_structure.hpp" #include "../include/ad_structure.hpp" #include "../include/toolboxes/printing_toolbox.hpp" @@ -80,13 +80,13 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], unsigned short val_softwar /*--- Parsing the config file ---*/ SetConfig_Parsing(case_filename); - + /*--- Set the default values for all of the options that weren't set ---*/ - + SetDefault(); - + /*--- Set number of zone ---*/ - + SetnZone(); /*--- Configuration file postprocessing ---*/ @@ -105,7 +105,7 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], unsigned short val_softwar } CConfig::CConfig(istream &case_buffer, unsigned short val_software, bool verb_high) { - + base_config = true; iZone = 0; @@ -116,7 +116,7 @@ CConfig::CConfig(istream &case_buffer, unsigned short val_software, bool verb_hi /*--- Parsing the config file ---*/ SetConfig_Parsing(case_buffer); - + /*--- Set the default values for all of the options that weren't set ---*/ SetDefault(); @@ -142,7 +142,7 @@ CConfig::CConfig(istream &case_buffer, unsigned short val_software, bool verb_hi CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], unsigned short val_software, unsigned short val_iZone, unsigned short val_nZone, bool verb_high) { - + caseName = config->GetCaseName(); unsigned short val_nDim; @@ -151,7 +151,7 @@ CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], unsigned iZone = val_iZone; nZone = val_nZone; - + Init(); /*--- Parsing the config file ---*/ @@ -197,9 +197,9 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], unsigned short val_softwar nZone = 1; iZone = 0; - + Init(); - + /*--- Parsing the config file ---*/ SetConfig_Parsing(case_filename); @@ -233,7 +233,7 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) { caseName = PrintingToolbox::split(string(case_filename),'.')[0]; base_config = true; - + bool runtime_file = false; Init(); @@ -261,12 +261,12 @@ SU2_MPI::Comm CConfig::GetMPICommunicator() { } void CConfig::Init(){ - - /*--- Store MPI rank and size ---*/ - + + /*--- Store MPI rank and size ---*/ + rank = SU2_MPI::GetRank(); size = SU2_MPI::GetSize(); - + /*--- Initialize pointers to Null---*/ SetPointersNull(); @@ -274,7 +274,7 @@ void CConfig::Init(){ /*--- Reading config options ---*/ SetConfig_Options(); - + } void CConfig::SetMPICommunicator(SU2_MPI::Comm Communicator) { @@ -2808,9 +2808,9 @@ void CConfig::SetConfig_Options() { } void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { - + ifstream case_file; - + /*--- Read the configuration file ---*/ case_file.open(case_filename, ios::in); @@ -2818,15 +2818,15 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { if (case_file.fail()) { SU2_MPI::Error("The configuration file (.cfg) is missing!!", CURRENT_FUNCTION); } - + SetConfig_Parsing(case_file); - + case_file.close(); - + } void CConfig::SetConfig_Parsing(istream& config_buffer){ - + string text_line, option_name; vector option_value; @@ -2838,9 +2838,9 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { map included_options; /*--- Parse the configuration file and set the options ---*/ - + while (getline (config_buffer, text_line)) { - + if (err_count >= max_err_count) { errorString.append("too many errors. Stopping parse"); diff --git a/Common/src/fem_cgns_elements.cpp b/Common/src/fem/fem_cgns_elements.cpp similarity index 99% rename from Common/src/fem_cgns_elements.cpp rename to Common/src/fem/fem_cgns_elements.cpp index face6971598..fef88383050 100644 --- a/Common/src/fem_cgns_elements.cpp +++ b/Common/src/fem/fem_cgns_elements.cpp @@ -6,7 +6,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -26,10 +26,10 @@ */ #ifdef HAVE_CGNS -#include "../include/fem_cgns_elements.hpp" -#include "../include/geometry_structure_fem_part.hpp" -#include "../include/mpi_structure.hpp" -#include "../include/datatype_structure.hpp" +#include "../../include/fem/fem_cgns_elements.hpp" +#include "../../include/fem/geometry_structure_fem_part.hpp" +#include "../../include/mpi_structure.hpp" +#include "../../include/datatype_structure.hpp" #include #include diff --git a/Common/src/fem_gauss_jacobi_quadrature.cpp b/Common/src/fem/fem_gauss_jacobi_quadrature.cpp similarity index 96% rename from Common/src/fem_gauss_jacobi_quadrature.cpp rename to Common/src/fem/fem_gauss_jacobi_quadrature.cpp index 98f6b427223..0958a792b75 100644 --- a/Common/src/fem_gauss_jacobi_quadrature.cpp +++ b/Common/src/fem/fem_gauss_jacobi_quadrature.cpp @@ -8,7 +8,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -77,7 +77,7 @@ Thanks for the time and take care, Tom */ -#include "../include/fem_gauss_jacobi_quadrature.hpp" +#include "../../include/fem/fem_gauss_jacobi_quadrature.hpp" void CGaussJacobiQuadrature::GetQuadraturePoints(const passivedouble alpha, const passivedouble beta, const passivedouble a, const passivedouble b, @@ -116,7 +116,7 @@ void CGaussJacobiQuadrature::cdgqf(int nt, int kind, passivedouble alpha, passiv // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -130,7 +130,7 @@ void CGaussJacobiQuadrature::cdgqf(int nt, int kind, passivedouble alpha, passiv // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -201,7 +201,7 @@ void CGaussJacobiQuadrature::cgqf(int nt, int kind, passivedouble alpha, passive // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -215,7 +215,7 @@ void CGaussJacobiQuadrature::cgqf(int nt, int kind, passivedouble alpha, passive // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -255,7 +255,7 @@ void CGaussJacobiQuadrature::cgqf(int nt, int kind, passivedouble alpha, passive // cdgqf ( nt, kind, alpha, beta, t, wts ); // -// Prepare to scale the quadrature formula to other weight function with +// Prepare to scale the quadrature formula to other weight function with // valid A and B. // mlt = new int[nt]; @@ -278,7 +278,7 @@ void CGaussJacobiQuadrature::cgqf(int nt, int kind, passivedouble alpha, passive //****************************************************************************80 passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedouble alpha, - passivedouble beta, passivedouble aj[], + passivedouble beta, passivedouble aj[], passivedouble bj[]) //****************************************************************************80 @@ -302,7 +302,7 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -316,7 +316,7 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -426,10 +426,10 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl { ab = alpha + beta; abi = 2.0 + ab; - zemu = pow ( 2.0, ab + 1.0 ) * tgamma ( alpha + 1.0 ) + zemu = pow ( 2.0, ab + 1.0 ) * tgamma ( alpha + 1.0 ) * tgamma ( beta + 1.0 ) / tgamma ( abi ); aj[0] = ( beta - alpha ) / abi; - bj[0] = sqrt ( 4.0 * ( 1.0 + alpha ) * ( 1.0 + beta ) + bj[0] = sqrt ( 4.0 * ( 1.0 + alpha ) * ( 1.0 + beta ) / ( ( abi + 1.0 ) * abi * abi ) ); a2b2 = beta * beta - alpha * alpha; @@ -438,7 +438,7 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl abi = 2.0 * i + ab; aj[i-1] = a2b2 / ( ( abi - 2.0 ) * abi ); abi = abi * abi; - bj[i-1] = sqrt ( 4.0 * i * ( i + alpha ) * ( i + beta ) * ( i + ab ) + bj[i-1] = sqrt ( 4.0 * i * ( i + alpha ) * ( i + beta ) * ( i + ab ) / ( ( abi - 1.0 ) * abi ) ); } } @@ -486,7 +486,7 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl else // if ( kind == 8 ) { ab = alpha + beta; - zemu = tgamma ( alpha + 1.0 ) * tgamma ( - ( ab + 1.0 ) ) + zemu = tgamma ( alpha + 1.0 ) * tgamma ( - ( ab + 1.0 ) ) / tgamma ( - beta ); apone = alpha + 1.0; aba = ab * apone; @@ -502,7 +502,7 @@ passivedouble CGaussJacobiQuadrature::class_matrix(int kind, int m, passivedoubl for ( i = 2; i <= m - 1; i++ ) { abti = ab + 2.0 * i; - bj[i-1] = i * ( alpha + i ) / ( abti - 1.0 ) * ( beta + i ) + bj[i-1] = i * ( alpha + i ) / ( abti - 1.0 ) * ( beta + i ) / ( abti * abti ) * ( ab + i ) / ( abti + 1.0 ); } bj[m-1] = 0.0; @@ -526,20 +526,20 @@ void CGaussJacobiQuadrature::imtqlx(int n, passivedouble d[], passivedouble e[], // // Discussion: // -// This routine is a slightly modified version of the EISPACK routine to -// perform the implicit QL algorithm on a symmetric tridiagonal matrix. +// This routine is a slightly modified version of the EISPACK routine to +// perform the implicit QL algorithm on a symmetric tridiagonal matrix. // // The authors thank the authors of EISPACK for permission to use this -// routine. +// routine. // -// It has been modified to produce the product Q' * Z, where Z is an input -// vector and Q is the orthogonal matrix diagonalizing the input matrix. +// It has been modified to produce the product Q' * Z, where Z is an input +// vector and Q is the orthogonal matrix diagonalizing the input matrix. // The changes consist (essentialy) of applying the orthogonal transformations // directly to Z as they are generated. // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -553,7 +553,7 @@ void CGaussJacobiQuadrature::imtqlx(int n, passivedouble d[], passivedouble e[], // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -570,7 +570,7 @@ void CGaussJacobiQuadrature::imtqlx(int n, passivedouble d[], passivedouble e[], // Input/output, passivedouble D(N), the diagonal entries of the matrix. // On output, the information in D has been overwritten. // -// Input/output, passivedouble E(N), the subdiagonal entries of the +// Input/output, passivedouble E(N), the subdiagonal entries of the // matrix, in entries E(1) through E(N-1). On output, the information in // E has been overwritten. // @@ -716,11 +716,11 @@ void CGaussJacobiQuadrature::parchk(int kind, int m, passivedouble alpha, passiv // // Purpose: // -// PARCHK checks parameters ALPHA and BETA for classical weight functions. +// PARCHK checks parameters ALPHA and BETA for classical weight functions. // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -734,7 +734,7 @@ void CGaussJacobiQuadrature::parchk(int kind, int m, passivedouble alpha, passiv // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -854,7 +854,7 @@ passivedouble CGaussJacobiQuadrature::r8_sign(passivedouble x) // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -876,7 +876,7 @@ passivedouble CGaussJacobiQuadrature::r8_sign(passivedouble x) if ( x < 0.0 ) { value = -1.0; - } + } else { value = 1.0; @@ -887,7 +887,7 @@ passivedouble CGaussJacobiQuadrature::r8_sign(passivedouble x) void CGaussJacobiQuadrature::scqf(int nt, passivedouble t[], int mlt[], passivedouble wts[], int nwts, int ndx[], passivedouble swts[], passivedouble st[], - int kind, passivedouble alpha, passivedouble beta, passivedouble a, + int kind, passivedouble alpha, passivedouble beta, passivedouble a, passivedouble b) //****************************************************************************80 @@ -904,7 +904,7 @@ void CGaussJacobiQuadrature::scqf(int nt, passivedouble t[], int mlt[], passived // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -918,7 +918,7 @@ void CGaussJacobiQuadrature::scqf(int nt, passivedouble t[], int mlt[], passived // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -935,7 +935,7 @@ void CGaussJacobiQuadrature::scqf(int nt, passivedouble t[], int mlt[], passived // // Input, int NWTS, the number of weights. // -// Input, int NDX[NT], used to index the array WTS. +// Input, int NDX[NT], used to index the array WTS. // For more details see the comments in CAWIQ. // // Output, passivedouble SWTS[NWTS], the scaled weights. @@ -1141,7 +1141,7 @@ void CGaussJacobiQuadrature::sgqf(int nt, passivedouble aj[], passivedouble bj[] // // Licensing: // -// This code is distributed under the GNU LGPL license. +// This code is distributed under the GNU LGPL license. // // Modified: // @@ -1155,7 +1155,7 @@ void CGaussJacobiQuadrature::sgqf(int nt, passivedouble aj[], passivedouble bj[] // Reference: // // Sylvan Elhay, Jaroslav Kautsky, -// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +// Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of // Interpolatory Quadrature, // ACM Transactions on Mathematical Software, // Volume 13, Number 4, December 1987, pages 399-415. @@ -1166,7 +1166,7 @@ void CGaussJacobiQuadrature::sgqf(int nt, passivedouble aj[], passivedouble bj[] // // Input, passivedouble AJ[NT], the diagonal of the Jacobi matrix. // -// Input/output, passivedouble BJ[NT], the subdiagonal of the Jacobi +// Input/output, passivedouble BJ[NT], the subdiagonal of the Jacobi // matrix, in entries 1 through NT-1. On output, BJ has been overwritten. // // Input, passivedouble ZEMU, the zero-th moment of the weight function. diff --git a/Common/src/fem_geometry_structure.cpp b/Common/src/fem/fem_geometry_structure.cpp similarity index 99% rename from Common/src/fem_geometry_structure.cpp rename to Common/src/fem/fem_geometry_structure.cpp index cdbc4dc1113..4ab1a89fd54 100644 --- a/Common/src/fem_geometry_structure.cpp +++ b/Common/src/fem/fem_geometry_structure.cpp @@ -25,10 +25,10 @@ * License along with SU2. If not, see . */ -#include "../include/fem_geometry_structure.hpp" -#include "../include/geometry/primal_grid/CPrimalGridFEM.hpp" -#include "../include/geometry/primal_grid/CPrimalGridBoundFEM.hpp" -#include "../include/adt_structure.hpp" +#include "../../include/fem/fem_geometry_structure.hpp" +#include "../../include/geometry/primal_grid/CPrimalGridFEM.hpp" +#include "../../include/geometry/primal_grid/CPrimalGridBoundFEM.hpp" +#include "../../include/adt_structure.hpp" /* Prototypes for Lapack functions, if MKL or LAPACK is used. */ #if defined (HAVE_MKL) || defined(HAVE_LAPACK) diff --git a/Common/src/fem_integration_rules.cpp b/Common/src/fem/fem_integration_rules.cpp similarity index 99% rename from Common/src/fem_integration_rules.cpp rename to Common/src/fem/fem_integration_rules.cpp index 9c3519e4dc1..534913a3dcd 100644 --- a/Common/src/fem_integration_rules.cpp +++ b/Common/src/fem/fem_integration_rules.cpp @@ -6,7 +6,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -25,8 +25,8 @@ * License along with SU2. If not, see . */ -#include "../include/fem_standard_element.hpp" -#include "../include/fem_gauss_jacobi_quadrature.hpp" +#include "../../include/fem/fem_standard_element.hpp" +#include "../../include/fem/fem_gauss_jacobi_quadrature.hpp" /*----------------------------------------------------------------------------------*/ /* Private member functions of CFEMStandardElementBase. */ diff --git a/Common/src/fem_standard_element.cpp b/Common/src/fem/fem_standard_element.cpp similarity index 99% rename from Common/src/fem_standard_element.cpp rename to Common/src/fem/fem_standard_element.cpp index 93f193e6600..154ec5fc62a 100644 --- a/Common/src/fem_standard_element.cpp +++ b/Common/src/fem/fem_standard_element.cpp @@ -6,7 +6,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -25,9 +25,9 @@ * License along with SU2. If not, see . */ -#include "../include/fem_standard_element.hpp" -#include "../include/fem_gauss_jacobi_quadrature.hpp" -#include "../include/blas_structure.hpp" +#include "../../include/fem/fem_standard_element.hpp" +#include "../../include/fem/fem_gauss_jacobi_quadrature.hpp" +#include "../../include/blas_structure.hpp" /*----------------------------------------------------------------------------------*/ /* Public member functions of CFEMStandardElementBase. */ diff --git a/Common/src/fem_wall_distance.cpp b/Common/src/fem/fem_wall_distance.cpp similarity index 99% rename from Common/src/fem_wall_distance.cpp rename to Common/src/fem/fem_wall_distance.cpp index 9a22e0267c2..7b042ef8d9a 100644 --- a/Common/src/fem_wall_distance.cpp +++ b/Common/src/fem/fem_wall_distance.cpp @@ -25,8 +25,8 @@ * License along with SU2. If not, see . */ -#include "../include/fem_geometry_structure.hpp" -#include "../include/adt_structure.hpp" +#include "../../include/fem/fem_geometry_structure.hpp" +#include "../../include/adt_structure.hpp" std::unique_ptr CMeshFEM_DG::ComputeViscousWallADT(const CConfig *config) const { diff --git a/Common/src/fem_work_estimate_metis.cpp b/Common/src/fem/fem_work_estimate_metis.cpp similarity index 94% rename from Common/src/fem_work_estimate_metis.cpp rename to Common/src/fem/fem_work_estimate_metis.cpp index 550626febb3..f819cb6a872 100644 --- a/Common/src/fem_work_estimate_metis.cpp +++ b/Common/src/fem/fem_work_estimate_metis.cpp @@ -7,7 +7,7 @@ * * SU2 Project Website: https://su2code.github.io * - * The SU2 Project is maintained by the SU2 Foundation + * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) @@ -26,7 +26,7 @@ * License along with SU2. If not, see . */ -#include "../include/fem_standard_element.hpp" +#include "../../include/fem/fem_standard_element.hpp" su2double CFEMStandardElement::WorkEstimateMetis(CConfig *config) { diff --git a/Common/src/geometry_structure_fem_part.cpp b/Common/src/fem/geometry_structure_fem_part.cpp similarity index 99% rename from Common/src/geometry_structure_fem_part.cpp rename to Common/src/fem/geometry_structure_fem_part.cpp index f2c6c3bdebd..4128afc6541 100644 --- a/Common/src/geometry_structure_fem_part.cpp +++ b/Common/src/fem/geometry_structure_fem_part.cpp @@ -25,16 +25,16 @@ * License along with SU2. If not, see . */ -#include "../include/geometry/CPhysicalGeometry.hpp" -#include "../include/fem_standard_element.hpp" -#include "../include/geometry/primal_grid/CPrimalGridFEM.hpp" -#include "../include/geometry/primal_grid/CPrimalGridBoundFEM.hpp" +#include "../../include/geometry/CPhysicalGeometry.hpp" +#include "../../include/fem/fem_standard_element.hpp" +#include "../../include/geometry/primal_grid/CPrimalGridFEM.hpp" +#include "../../include/geometry/primal_grid/CPrimalGridBoundFEM.hpp" #ifdef HAVE_CGNS -#include "../include/fem_cgns_elements.hpp" +#include "../../include/fem/fem_cgns_elements.hpp" #endif -#include "../include/adt_structure.hpp" -#include "../include/blas_structure.hpp" +#include "../../include/adt_structure.hpp" +#include "../../include/blas_structure.hpp" #include #include #include diff --git a/Common/src/fem/meson.build b/Common/src/fem/meson.build new file mode 100644 index 00000000000..028f179d6e4 --- /dev/null +++ b/Common/src/fem/meson.build @@ -0,0 +1,8 @@ +common_src += files(['geometry_structure_fem_part.cpp', + 'fem_geometry_structure.cpp', + 'fem_integration_rules.cpp', + 'fem_work_estimate_metis.cpp', + 'fem_standard_element.cpp', + 'fem_wall_distance.cpp', + 'fem_gauss_jacobi_quadrature.cpp', + 'fem_cgns_elements.cpp']) diff --git a/Common/src/meson.build b/Common/src/meson.build index ca9c048e70d..e1d65e7702c 100644 --- a/Common/src/meson.build +++ b/Common/src/meson.build @@ -1,21 +1,13 @@ common_include = include_directories('./') -common_src =files(['geometry_structure_fem_part.cpp', - 'graph_coloring_structure.cpp', - 'fem_geometry_structure.cpp', - 'fem_integration_rules.cpp', +common_src =files(['graph_coloring_structure.cpp', 'CConfig.cpp', 'blas_structure.cpp', 'ad_structure.cpp', 'grid_movement_structure.cpp', - 'fem_work_estimate_metis.cpp', - 'fem_standard_element.cpp', - 'fem_wall_distance.cpp', 'grid_adaptation_structure.cpp', - 'fem_gauss_jacobi_quadrature.cpp', 'wall_model.cpp', 'adt_structure.cpp', 'mpi_structure.cpp', - 'fem_cgns_elements.cpp', 'CMultiGridQueue.cpp']) subdir('linear_algebra') @@ -26,6 +18,7 @@ subdir('geometry/dual_grid') subdir('geometry/primal_grid') subdir('geometry/meshreader') subdir('interface_interpolation') +subdir('fem') if get_option('enable-normal') common = static_library('SU2Common', diff --git a/SU2_CFD/include/SU2_CFD.hpp b/SU2_CFD/include/SU2_CFD.hpp index 4bdd3727f8d..ea46a310305 100644 --- a/SU2_CFD/include/SU2_CFD.hpp +++ b/SU2_CFD/include/SU2_CFD.hpp @@ -38,7 +38,7 @@ #include "drivers/CDiscAdjMultizoneDriver.hpp" #include "drivers/CDummyDriver.hpp" #include "output/COutput.hpp" -#include "../../Common/include/fem_geometry_structure.hpp" +#include "../../Common/include/fem/fem_geometry_structure.hpp" #include "../../Common/include/geometry/CGeometry.hpp" #include "../../Common/include/grid_movement_structure.hpp" #include "../../Common/include/CConfig.hpp" diff --git a/SU2_CFD/include/definition_structure.hpp b/SU2_CFD/include/definition_structure.hpp index 38f3bc34556..4fe8a8ee376 100644 --- a/SU2_CFD/include/definition_structure.hpp +++ b/SU2_CFD/include/definition_structure.hpp @@ -30,7 +30,7 @@ #include "../../Common/include/mpi_structure.hpp" -#include "../../Common/include/fem_geometry_structure.hpp" +#include "../../Common/include/fem/fem_geometry_structure.hpp" #include "../../Common/include/geometry/CGeometry.hpp" #include "../../Common/include/CConfig.hpp" diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index e2cf5e41257..d0df3c55647 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -44,7 +44,7 @@ #include "../task_definition.hpp" #include "../numerics/CNumerics.hpp" #include "../sgs_model.hpp" -#include "../../../Common/include/fem_geometry_structure.hpp" +#include "../../../Common/include/fem/fem_geometry_structure.hpp" #include "../../../Common/include/geometry/CGeometry.hpp" #include "../../../Common/include/CConfig.hpp" #include "../../../Common/include/linear_algebra/CSysMatrix.hpp" diff --git a/SU2_CFD/src/output/filewriter/CFEMDataSorter.cpp b/SU2_CFD/src/output/filewriter/CFEMDataSorter.cpp index c8192d63c40..ee6c429e7a2 100644 --- a/SU2_CFD/src/output/filewriter/CFEMDataSorter.cpp +++ b/SU2_CFD/src/output/filewriter/CFEMDataSorter.cpp @@ -26,7 +26,7 @@ */ #include "../../../include/output/filewriter/CFEMDataSorter.hpp" -#include "../../../../Common/include/fem_geometry_structure.hpp" +#include "../../../../Common/include/fem/fem_geometry_structure.hpp" #include CFEMDataSorter::CFEMDataSorter(CConfig *config, CGeometry *geometry, const vector &valFieldNames) : @@ -92,7 +92,7 @@ void CFEMDataSorter::SortConnectivity(CConfig *config, CGeometry *geometry, bool across all processors based on the global index of the grid nodes. ---*/ /*--- Sort volumetric grid connectivity. ---*/ - + nElemPerType.fill(0); SortVolumetricConnectivity(config, geometry, TRIANGLE ); @@ -101,9 +101,9 @@ void CFEMDataSorter::SortConnectivity(CConfig *config, CGeometry *geometry, bool SortVolumetricConnectivity(config, geometry, HEXAHEDRON ); SortVolumetricConnectivity(config, geometry, PRISM ); SortVolumetricConnectivity(config, geometry, PYRAMID ); - + SetTotalElements(); - + connectivitySorted = true; } @@ -204,7 +204,7 @@ void CFEMDataSorter::SortVolumetricConnectivity(CConfig *config, CGeometry *geom Conn_SubElem[kNode] = connSubElems[k] + volElem[i].offsetDOFsSolGlobal + 1; } } - + nElemPerType[TypeMap.at(Elem_Type)] = nSubElem_Local; /*--- Store the particular global element count in the class data, diff --git a/SU2_CFD/src/output/filewriter/CSurfaceFEMDataSorter.cpp b/SU2_CFD/src/output/filewriter/CSurfaceFEMDataSorter.cpp index 7e76440e195..8187ad37e3b 100644 --- a/SU2_CFD/src/output/filewriter/CSurfaceFEMDataSorter.cpp +++ b/SU2_CFD/src/output/filewriter/CSurfaceFEMDataSorter.cpp @@ -26,7 +26,7 @@ */ #include "../../../include/output/filewriter/CSurfaceFEMDataSorter.hpp" -#include "../../../../Common/include/fem_geometry_structure.hpp" +#include "../../../../Common/include/fem/fem_geometry_structure.hpp" #include CSurfaceFEMDataSorter::CSurfaceFEMDataSorter(CConfig *config, CGeometry *geometry, CFEMDataSorter* valVolumeSorter) : @@ -82,7 +82,7 @@ void CSurfaceFEMDataSorter::SortOutputData() { } const int VARS_PER_POINT = GlobalField_Counter; - + const unsigned long nElemLine = GetnElem(LINE); const unsigned long nElemTria = GetnElem(TRIANGLE); const unsigned long nElemQuad = GetnElem(QUADRILATERAL); @@ -220,9 +220,9 @@ void CSurfaceFEMDataSorter::SortOutputData() { /* Allocate the memory for Parallel_Surf_Data. */ nPoints = globalSurfaceDOFIDs.size(); - + delete [] passiveDoubleBuffer; - + passiveDoubleBuffer = new passivedouble[nPoints*VARS_PER_POINT]; @@ -247,7 +247,7 @@ void CSurfaceFEMDataSorter::SortOutputData() { /* Determine the offset for my surface DOFs. */ unsigned long offsetSurfaceDOFs = 0; - + nSurfaceDOFsRanks.resize(size, 0); #ifdef HAVE_MPI @@ -340,9 +340,9 @@ void CSurfaceFEMDataSorter::SortConnectivity(CConfig *config, CGeometry *geometr markerList.push_back(config->GetMarker_All_TagBound(iMarker)); } } - + /*--- Call the sort connectivity routine ---*/ - + SortConnectivity(config, geometry, markerList); } @@ -350,7 +350,7 @@ void CSurfaceFEMDataSorter::SortConnectivity(CConfig *config, CGeometry *geometr void CSurfaceFEMDataSorter::SortConnectivity(CConfig *config, CGeometry *geometry, const vector &markerList) { nElemPerType.fill(0); - + SortSurfaceConnectivity(config, geometry, LINE , markerList); SortSurfaceConnectivity(config, geometry, TRIANGLE , markerList); SortSurfaceConnectivity(config, geometry, QUADRILATERAL, markerList); @@ -458,8 +458,8 @@ void CSurfaceFEMDataSorter::SortSurfaceConnectivity(CConfig *config, CGeometry * } } } - - nElemPerType[TypeMap.at(Elem_Type)] = nSubElem_Local; + + nElemPerType[TypeMap.at(Elem_Type)] = nSubElem_Local; /*--- Store the particular global element count in the class data, and set the class data pointer to the connectivity array. ---*/ diff --git a/SU2_DOT/include/SU2_DOT.hpp b/SU2_DOT/include/SU2_DOT.hpp index 549e74149fb..bbd1a2b2782 100644 --- a/SU2_DOT/include/SU2_DOT.hpp +++ b/SU2_DOT/include/SU2_DOT.hpp @@ -42,7 +42,7 @@ #include #include "../../Common/include/geometry/CPhysicalGeometry.hpp" -#include "../../Common/include/fem_geometry_structure.hpp" +#include "../../Common/include/fem/fem_geometry_structure.hpp" #include "../../Common/include/grid_movement_structure.hpp" #include "../../SU2_CFD/include/output/CBaselineOutput.hpp" #include "../../SU2_CFD/include/solvers/CBaselineSolver.hpp"