Skip to content

Commit c93d232

Browse files
authored
Merge branch 'develop' into develop
2 parents 608e9c8 + 03f82b3 commit c93d232

433 files changed

Lines changed: 5633 additions & 6114 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,6 @@ Mercurial
8787
# Ignore build folder
8888
./build/
8989
build/
90+
91+
# ninja binary (build system)
9092
ninja

Common/include/CConfig.hpp

Lines changed: 32 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#pragma once
3030

31-
#include "./mpi_structure.hpp"
31+
#include "./parallelization/mpi_structure.hpp"
3232

3333
#include <iostream>
3434
#include <cstdlib>
@@ -108,8 +108,14 @@ class CConfig {
108108
unsigned short FFD_Blending; /*!< \brief Kind of FFD Blending function. */
109109
su2double* FFD_BSpline_Order; /*!< \brief BSpline order in i,j,k direction. */
110110
su2double FFD_Tol; /*!< \brief Tolerance in the point inversion problem. */
111-
su2double Opt_RelaxFactor; /*!< \brief Scale factor for the line search. */
112-
su2double Opt_LineSearch_Bound; /*!< \brief Bounds for the line search. */
111+
bool FFD_IntPrev; /*!< \brief Enables self-intersection prevention procedure within the FFD box. */
112+
unsigned short FFD_IntPrev_MaxIter; /*!< \brief Amount of iterations for FFD box self-intersection prevention procedure. */
113+
unsigned short FFD_IntPrev_MaxDepth; /*!< \brief Maximum recursion depth for FFD box self-intersection procedure. */
114+
bool ConvexityCheck; /*!< \brief Enables convexity check on all mesh elements. */
115+
unsigned short ConvexityCheck_MaxIter; /*!< \brief Amount of iterations for convexity check in deformations. */
116+
unsigned short ConvexityCheck_MaxDepth; /*!< \brief Maximum recursion depth for convexity check in deformations.*/
117+
su2double Opt_RelaxFactor; /*!< \brief Scale factor for the line search. */
118+
su2double Opt_LineSearch_Bound; /*!< \brief Bounds for the line search. */
113119
su2double StartTime;
114120
bool ContinuousAdjoint, /*!< \brief Flag to know if the code is solving an adjoint problem. */
115121
Viscous, /*!< \brief Flag to know if the code is solving a viscous problem. */
@@ -660,11 +666,6 @@ class CConfig {
660666
unsigned short Res_FEM_CRIT; /*!< \brief Criteria to apply to the FEM convergence (absolute/relative). */
661667
unsigned long StartConv_Iter; /*!< \brief Start convergence criteria at iteration. */
662668
su2double Cauchy_Eps; /*!< \brief Epsilon used for the convergence. */
663-
unsigned long Wrt_Sol_Freq, /*!< \brief Writing solution frequency. */
664-
Wrt_Sol_Freq_DualTime, /*!< \brief Writing solution frequency for Dual Time. */
665-
Wrt_Con_Freq, /*!< \brief Writing convergence history frequency. */
666-
Wrt_Con_Freq_DualTime; /*!< \brief Writing convergence history frequency. */
667-
bool Wrt_Dynamic; /*!< \brief Write dynamic data adding header and prefix. */
668669
bool Restart, /*!< \brief Restart solution (for direct, adjoint, and linearized problems).*/
669670
Read_Binary_Restart, /*!< \brief Read binary SU2 native restart files.*/
670671
Restart_Flow; /*!< \brief Restart flow solution for adjoint and linearized problems. */
@@ -759,7 +760,6 @@ class CConfig {
759760
string Mesh_FileName, /*!< \brief Mesh input file. */
760761
Mesh_Out_FileName, /*!< \brief Mesh output file. */
761762
Solution_FileName, /*!< \brief Flow solution input file. */
762-
Solution_LinFileName, /*!< \brief Linearized flow solution input file. */
763763
Solution_AdjFileName, /*!< \brief Adjoint solution input file for drag functional. */
764764
Volume_FileName, /*!< \brief Flow variables output file. */
765765
Residual_FileName, /*!< \brief Residual variables output file. */
@@ -772,24 +772,13 @@ class CConfig {
772772
ObjFunc_Value_FileName, /*!< \brief Objective function. */
773773
SurfCoeff_FileName, /*!< \brief Output file with the flow variables on the surface. */
774774
SurfAdjCoeff_FileName, /*!< \brief Output file with the adjoint variables on the surface. */
775-
New_SU2_FileName, /*!< \brief Output SU2 mesh file converted from CGNS format. */
776775
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
777776
VolSens_FileName; /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
778777

779-
bool Wrt_Output, /*!< \brief Write any output files */
780-
Wrt_Vol_Sol, /*!< \brief Write a volume solution file */
781-
Wrt_Srf_Sol, /*!< \brief Write a surface solution file */
782-
Wrt_Csv_Sol, /*!< \brief Write a surface comma-separated values solution file */
783-
Wrt_Crd_Sol, /*!< \brief Write a binary file with the grid coordinates only. */
784-
Wrt_Residuals, /*!< \brief Write residuals to solution file */
785-
Wrt_Surface, /*!< \brief Write solution at each surface */
786-
Wrt_Limiters, /*!< \brief Write residuals to solution file */
787-
Wrt_SharpEdges, /*!< \brief Write residuals to solution file */
788-
Wrt_Halo, /*!< \brief Write rind layers in solution files */
778+
bool
789779
Wrt_Performance, /*!< \brief Write the performance summary at the end of a calculation. */
790780
Wrt_AD_Statistics, /*!< \brief Write the tape statistics (discrete adjoint). */
791781
Wrt_MeshQuality, /*!< \brief Write the mesh quality statistics to the visualization files. */
792-
Wrt_Slice, /*!< \brief Write 1D slice of a 2D cartesian solution */
793782
Wrt_Projected_Sensitivity, /*!< \brief Write projected sensitivities (dJ/dx) on surfaces to ASCII file. */
794783
Plot_Section_Forces; /*!< \brief Write sectional forces for specified markers. */
795784
unsigned short
@@ -1010,7 +999,6 @@ class CConfig {
1010999
long ParMETIS_edgeWgt; /*!< \brief Load balancing weight given to edges. */
10111000
unsigned short DirectDiff; /*!< \brief Direct Differentation mode. */
10121001
bool DiscreteAdjoint; /*!< \brief AD-based discrete adjoint mode. */
1013-
unsigned long Wrt_Surf_Freq_DualTime; /*!< \brief Writing surface solution frequency for Dual Time. */
10141002
su2double Const_DES; /*!< \brief Detached Eddy Simulation Constant. */
10151003
unsigned short Kind_WindowFct; /*!< \brief Type of window (weight) function for objective functional. */
10161004
unsigned short Kind_HybridRANSLES; /*!< \brief Kind of Hybrid RANS/LES. */
@@ -3073,102 +3061,6 @@ class CConfig {
30733061
*/
30743062
su2double GetPhysicalTime(void) const { return PhysicalTime; }
30753063

3076-
/*!
3077-
* \brief Get the frequency for writing the solution file.
3078-
* \return It writes the solution file with this frequency.
3079-
*/
3080-
unsigned long GetWrt_Sol_Freq(void) const { return Wrt_Sol_Freq; }
3081-
3082-
/*!
3083-
* \brief Get the frequency for writing the solution file in Dual Time.
3084-
* \return It writes the solution file with this frequency.
3085-
*/
3086-
unsigned long GetWrt_Sol_Freq_DualTime(void) const { return Wrt_Sol_Freq_DualTime; }
3087-
3088-
/*!
3089-
* \brief Get the frequency for writing the convergence file.
3090-
* \return It writes the convergence file with this frequency.
3091-
*/
3092-
unsigned long GetWrt_Con_Freq(void) const { return Wrt_Con_Freq; }
3093-
3094-
/*!
3095-
* \brief Set the frequency for writing the convergence file.
3096-
* \return It writes the convergence file with this frequency.
3097-
*/
3098-
void SetWrt_Con_Freq(unsigned long val_freq) { Wrt_Con_Freq = val_freq; }
3099-
3100-
/*!
3101-
* \brief Get the frequency for writing the convergence file in Dual Time.
3102-
* \return It writes the convergence file with this frequency.
3103-
*/
3104-
unsigned long GetWrt_Con_Freq_DualTime(void) const { return Wrt_Con_Freq_DualTime; }
3105-
3106-
/*!
3107-
* \brief Get information about writing unsteady headers and file extensions.
3108-
* \return <code>TRUE</code> means that unsteady solution files will be written.
3109-
*/
3110-
bool GetWrt_Unsteady(void);
3111-
3112-
/*!
3113-
* \brief Get information about writing output files.
3114-
* \return <code>TRUE</code> means that output files will be written.
3115-
*/
3116-
bool GetWrt_Output(void) const { return Wrt_Output; }
3117-
3118-
/*!
3119-
* \brief Get information about writing a volume solution file.
3120-
* \return <code>TRUE</code> means that a volume solution file will be written.
3121-
*/
3122-
bool GetWrt_Vol_Sol(void) const { return Wrt_Vol_Sol; }
3123-
3124-
/*!
3125-
* \brief Get information about writing a surface solution file.
3126-
* \return <code>TRUE</code> means that a surface solution file will be written.
3127-
*/
3128-
bool GetWrt_Srf_Sol(void) const { return Wrt_Srf_Sol; }
3129-
3130-
/*!
3131-
* \brief Get information about writing a surface comma-separated values (CSV) solution file.
3132-
* \return <code>TRUE</code> means that a surface comma-separated values (CSV) solution file will be written.
3133-
*/
3134-
bool GetWrt_Csv_Sol(void) const { return Wrt_Csv_Sol; }
3135-
3136-
/*!
3137-
* \brief Get information about writing a binary coordinates file.
3138-
* \return <code>TRUE</code> means that a binary coordinates file will be written.
3139-
*/
3140-
bool GetWrt_Crd_Sol(void) const { return Wrt_Crd_Sol; }
3141-
3142-
/*!
3143-
* \brief Get information about writing residuals to volume solution file.
3144-
* \return <code>TRUE</code> means that residuals will be written to the solution file.
3145-
*/
3146-
bool GetWrt_Residuals(void) const { return Wrt_Residuals; }
3147-
3148-
/*!
3149-
* \brief Get information about writing residuals to volume solution file.
3150-
* \return <code>TRUE</code> means that residuals will be written to the solution file.
3151-
*/
3152-
bool GetWrt_Limiters(void) const { return Wrt_Limiters; }
3153-
3154-
/*!
3155-
* \brief Write solution at each surface.
3156-
* \return <code>TRUE</code> means that the solution at each surface will be written.
3157-
*/
3158-
bool GetWrt_Surface(void) const { return Wrt_Surface; }
3159-
3160-
/*!
3161-
* \brief Get information about writing residuals to volume solution file.
3162-
* \return <code>TRUE</code> means that residuals will be written to the solution file.
3163-
*/
3164-
bool GetWrt_SharpEdges(void) const { return Wrt_SharpEdges; }
3165-
3166-
/*!
3167-
* \brief Get information about writing rind layers to the solution files.
3168-
* \return <code>TRUE</code> means that rind layers will be written to the solution file.
3169-
*/
3170-
bool GetWrt_Halo(void) const { return Wrt_Halo; }
3171-
31723064
/*!
31733065
* \brief Get information about writing the performance summary at the end of a calculation.
31743066
* \return <code>TRUE</code> means that the performance summary will be written at the end of a calculation.
@@ -3187,12 +3079,6 @@ class CConfig {
31873079
*/
31883080
bool GetWrt_MeshQuality(void) const { return Wrt_MeshQuality; }
31893081

3190-
/*!
3191-
* \brief Get information about writing a 1D slice of a 2D cartesian solution.
3192-
* \return <code>TRUE</code> means that a 1D slice of a 2D cartesian solution will be written.
3193-
*/
3194-
bool GetWrt_Slice(void) const { return Wrt_Slice; }
3195-
31963082
/*!
31973083
* \brief Get information about writing projected sensitivities on surfaces to an ASCII file with rows as x, y, z, dJ/dx, dJ/dy, dJ/dz for each vertex.
31983084
* \return <code>TRUE</code> means that projected sensitivities on surfaces in an ASCII file with rows as x, y, z, dJ/dx, dJ/dy, dJ/dz for each vertex will be written.
@@ -8206,6 +8092,27 @@ class CConfig {
82068092
*/
82078093
su2double GetFFD_Tol(void) const { return FFD_Tol; }
82088094

8095+
/*!
8096+
* \brief Get information about whether to do a check on self-intersections within
8097+
the FFD box based on value on the Jacobian determinant.
8098+
* \param[out] FFD_IntPrev: <code>TRUE</code> if FFD intersection prevention is active; otherwise <code>FALSE</code>.
8099+
* \param[out] FFD_IntPrev_MaxIter: Maximum number of iterations in the intersection prevention procedure.
8100+
* \param[out] FFD_IntPrev_MaxDepth: Maximum recursion depth in the intersection prevention procedure.
8101+
*/
8102+
tuple<bool, unsigned short, unsigned short> GetFFD_IntPrev(void) const {
8103+
return make_tuple(FFD_IntPrev, FFD_IntPrev_MaxIter, FFD_IntPrev_MaxDepth);
8104+
}
8105+
8106+
/*!
8107+
* \brief Get information about whether to do a check on convexity of the mesh elements.
8108+
* \param[out] ConvexityCheck: <code>TRUE</code> if convexity check is active; otherwise <code>FALSE</code>.
8109+
* \param[out] ConvexityCheck_MaxIter: Maximum number of iterations in the convexity check.
8110+
* \param[out] ConvexityCheck_MaxDepth: Maximum recursion depth in the convexity check.
8111+
*/
8112+
tuple<bool, unsigned short, unsigned short> GetConvexityCheck(void) const {
8113+
return make_tuple(ConvexityCheck, ConvexityCheck_MaxIter, ConvexityCheck_MaxDepth);
8114+
}
8115+
82098116
/*!
82108117
* \brief Get the scale factor for the line search.
82118118
* \return Scale factor for the line search.
@@ -8523,12 +8430,6 @@ class CConfig {
85238430
*/
85248431
void SetiInst(unsigned short val_iInst) { iInst = val_iInst; }
85258432

8526-
/*!
8527-
* \brief Get information about writing dynamic structural analysis headers and file extensions.
8528-
* \return <code>TRUE</code> means that dynamic structural analysis solution files will be written.
8529-
*/
8530-
bool GetWrt_Dynamic(void) const { return Wrt_Dynamic; }
8531-
85328433
/*!
85338434
* \brief Get Newmark alpha parameter.
85348435
* \return Value of the Newmark alpha parameter.
@@ -8908,12 +8809,6 @@ class CConfig {
89088809
*/
89098810
su2double GetRestart_Bandwidth_Agg(void) const { return Restart_Bandwidth_Agg; }
89108811

8911-
/*!
8912-
* \brief Get the frequency for writing the surface solution file in Dual Time.
8913-
* \return It writes the surface solution file with this frequency.
8914-
*/
8915-
unsigned long GetWrt_Surf_Freq_DualTime(void) const { return Wrt_Surf_Freq_DualTime; }
8916-
89178812
/*!
89188813
* \brief Get the Kind of Hybrid RANS/LES.
89198814
* \return Value of Hybrid RANS/LES method.
@@ -9303,6 +9198,7 @@ class CConfig {
93039198

93049199
/*!
93059200
* \brief GetScreen_Wrt_Freq_Inner
9201+
* \param[in] iter: index for Time (0), Outer (1), or Inner (2) iterations
93069202
* \return
93079203
*/
93089204
unsigned long GetScreen_Wrt_Freq(unsigned short iter) const { return ScreenWrtFreq[iter]; }

Common/include/adt/CADTBaseClass.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "../basic_types/datatype_structure.hpp"
3434
#include "./CADTNodeClass.hpp"
35-
#include "../omp_structure.hpp"
35+
#include "../parallelization/omp_structure.hpp"
3636

3737
using namespace std;
3838

Common/include/adt/CADTElemClass.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "./CADTBaseClass.hpp"
3131
#include "./CBBoxTargetClass.hpp"
32-
#include "../omp_structure.hpp"
32+
#include "../parallelization/omp_structure.hpp"
3333

3434
/*!
3535
* \class CADTElemClass

Common/include/containers/C2DContainer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ class C2DContainer :
613613
* \brief Useful typedefs with default template parameters
614614
*/
615615
template<class T> using su2vector = C2DContainer<unsigned long, T, StorageType::ColumnMajor, 64, DynamicSize, 1>;
616-
template<class T> using su2matrix = C2DContainer<unsigned long, T, StorageType::RowMajor, 64, DynamicSize, DynamicSize>;
616+
template<class T> using su2matrix = C2DContainer<unsigned long, T, StorageType::RowMajor, 64, DynamicSize, DynamicSize>;
617+
template<class T> using ColMajorMatrix = C2DContainer<unsigned long, T, StorageType::ColumnMajor, 64, DynamicSize, DynamicSize>;
617618

618619
using su2activevector = su2vector<su2double>;
619620
using su2activematrix = su2matrix<su2double>;

Common/include/fem/fem_cgns_elements.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#pragma once
3131

32-
#include "../mpi_structure.hpp"
32+
#include "../parallelization/mpi_structure.hpp"
3333

3434
#ifdef HAVE_CGNS
3535
#include "cgnslib.h"

Common/include/fem/fem_geometry_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "fem_cgns_elements.hpp"
3535
#endif
3636
#include "../wall_model.hpp"
37-
#include "../blas_structure.hpp"
37+
#include "../linear_algebra/blas_structure.hpp"
3838

3939
using namespace std;
4040

Common/include/geometry/CGeometry.hpp

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#pragma once
3030

31-
#include "../mpi_structure.hpp"
31+
#include "../parallelization/mpi_structure.hpp"
3232

3333
#ifdef HAVE_METIS
3434
#include "metis.h"
@@ -84,7 +84,7 @@ class CGeometry {
8484
nPointGhost{0}, /*!< \brief Number of ghost points of the mesh. */
8585
nPointNode{0}, /*!< \brief Size of the node array allocated to hold CPoint objects. */
8686
Global_nPoint{0}, /*!< \brief Total number of nodes in a simulation across all processors (including halos). */
87-
Global_nPointDomain{0}, /*!< \brief Total number of nodes in a simulation across all processors (excluding halos). */
87+
Global_nPointDomain{0}, /*!< \brief Total number of nodes in a simulation across all processors (excluding halos). */
8888
nElem{0}, /*!< \brief Number of elements of the mesh. */
8989
Global_nElem{0}, /*!< \brief Total number of elements in a simulation across all processors (all types). */
9090
Global_nElemDomain{0}, /*!< \brief Total number of elements in a simulation across all processors (excluding halos). */
@@ -109,7 +109,8 @@ class CGeometry {
109109
nelem_triangle_bound{0}, /*!< \brief Number of triangles on the mesh boundaries. */
110110
Global_nelem_triangle_bound{0}, /*!< \brief Total number of triangles on the mesh boundaries across all processors. */
111111
nelem_quad_bound{0}, /*!< \brief Number of quads on the mesh boundaries. */
112-
Global_nelem_quad_bound{0}; /*!< \brief Total number of quads on the mesh boundaries across all processors. */
112+
Global_nelem_quad_bound{0}, /*!< \brief Total number of quads on the mesh boundaries across all processors. */
113+
nNonconvexElements{0}; /*!< \brief Number of nonconvex elements in the mesh. */
113114

114115
unsigned short nDim{0}; /*!< \brief Number of dimension of the problem. */
115116
unsigned short nZone{0}; /*!< \brief Number of zones in the problem. */
@@ -189,7 +190,7 @@ class CGeometry {
189190

190191
CPrimalGrid** elem{nullptr}; /*!< \brief Element vector (primal grid information). */
191192
CPrimalGrid** face{nullptr}; /*!< \brief Face vector (primal grid information). */
192-
CPrimalGrid*** bound{nullptr}; /*!< \brief Boundary vector (primal grid information). */
193+
CPrimalGrid*** bound{nullptr}; /*!< \brief Boundary vector (primal grid information). */
193194
CPoint* nodes{nullptr}; /*!< \brief Node vector (dual grid information). */
194195
CEdge* edges{nullptr}; /*!< \brief Edge vector (dual grid information). */
195196
CVertex*** vertex{nullptr}; /*!< \brief Boundary Vertex vector (dual grid information). */
@@ -856,20 +857,6 @@ class CGeometry {
856857
*/
857858
inline virtual void SetBoundControlVolume(CConfig *config, CGeometry *geometry, unsigned short action) {}
858859

859-
/*!
860-
* \brief A virtual member.
861-
* \param[in] config - Definition of the particular problem.
862-
* \param[in] val_mesh_out_filename - Name of the output file.
863-
*/
864-
inline virtual void SetMeshFile(CConfig *config, string val_mesh_out_filename) {}
865-
866-
/*!
867-
* \brief A virtual member.
868-
* \param[in] config - Definition of the particular problem.
869-
* \param[in] val_mesh_out_filename - Name of the output file.
870-
*/
871-
inline virtual void SetMeshFile(CGeometry *geometry, CConfig *config, string val_mesh_out_filename) {}
872-
873860
/*!
874861
* \brief A virtual member.
875862
* \param[in] config - Definition of the particular problem.
@@ -1713,5 +1700,16 @@ class CGeometry {
17131700
*/
17141701
static void ComputeWallDistance(const CConfig * const *config_container, CGeometry ****geometry_container);
17151702

1703+
/*!
1704+
* \brief Set the amount of nonconvex elements in the mesh.
1705+
* \param[in] nonconvex_elems - amount of nonconvex elements in the mesh
1706+
*/
1707+
void SetnNonconvexElements(unsigned long nonconvex_elems) {nNonconvexElements = nonconvex_elems;}
1708+
1709+
/*!
1710+
* \brief Get the amount of nonconvex elements in the mesh.
1711+
* \param[out] nNonconvexElements- amount of nonconvex elements in the mesh
1712+
*/
1713+
unsigned long GetnNonconvexElements() const {return nNonconvexElements;}
17161714
};
17171715

Common/include/geometry/CMultiGridGeometry.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class CMultiGridGeometry final : public CGeometry {
4040
public:
4141
/*--- This is to suppress Woverloaded-virtual, omitting it has no negative impact. ---*/
4242
using CGeometry::SetVertex;
43-
using CGeometry::SetMeshFile;
4443
using CGeometry::SetControlVolume;
4544
using CGeometry::SetBoundControlVolume;
4645
using CGeometry::SetPoint_Connectivity;

0 commit comments

Comments
 (0)