Skip to content

Commit 14f1bdf

Browse files
committed
Merge branch 'develop'
2 parents b3f7d21 + ec10925 commit 14f1bdf

File tree

291 files changed

+7590
-2791
lines changed

Some content is hidden

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

291 files changed

+7590
-2791
lines changed

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ externals/autotools/share
4242
*.err
4343

4444
# configuration sets
45-
REVERSE/
46-
NORMAL/
47-
DIRECTDIFF/
45+
SU2_AD/
46+
SU2_BASE/
47+
SU2_DIRECTDIFF/
48+
49+
# ignore the bin/ directory
50+
bin/
51+

Common/doc/docmain.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file docmain.hpp
33
* \brief This file contains documentation for Doxygen and does not have any significance with respect to C++.
44
* \author F. Palacios
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

Common/include/config_structure.hpp

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* \brief All the information about the definition of the physical problem.
44
* The subroutines and functions are in the <i>config_structure.cpp</i> file.
55
* \author F. Palacios, T. Economon, B. Tracey
6-
* \version 4.1.3 "Cardinal"
6+
* \version 4.2.0 "Cardinal"
77
*
88
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
99
* Dr. Thomas D. Economon ([email protected]).
@@ -55,7 +55,7 @@ using namespace std;
5555
* \brief Main class for defining the problem; basically this class reads the configuration file, and
5656
* stores all the information.
5757
* \author F. Palacios
58-
* \version 4.1.3 "Cardinal"
58+
* \version 4.2.0 "Cardinal"
5959
*/
6060

6161
class CConfig {
@@ -228,7 +228,7 @@ class CConfig {
228228
su2double *NRBC_Var1, *NRBC_Var2; /*!< \brief Specified values for NRBC boundary. */
229229
su2double **NRBC_FlowDir; /*!< \brief Specified flow direction vector (unit vector) for NRBC boundaries. */
230230
su2double *Inlet_Ptotal; /*!< \brief Specified total pressures for inlet boundaries. */
231-
su2double **Inlet_FlowDir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */
231+
su2double **Inlet_FlowDir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */
232232
su2double *Inlet_Temperature; /*!< \brief Specified temperatures for a supersonic inlet boundaries. */
233233
su2double *Inlet_Pressure; /*!< \brief Specified static pressures for supersonic inlet boundaries. */
234234
su2double **Inlet_Velocity; /*!< \brief Specified flow velocity vectors for supersonic inlet boundaries. */
@@ -281,6 +281,7 @@ class CConfig {
281281
unsigned long Dyn_nIntIter; /*!< \brief Number of internal iterations (Newton-Raphson Method for nonlinear structural analysis). */
282282
long Unst_RestartIter; /*!< \brief Iteration number to restart an unsteady simulation (Dual time Method). */
283283
long Unst_AdjointIter; /*!< \brief Iteration number to begin the reverse time integration in the direct solver for the unsteady adjoint. */
284+
long Iter_Avg_Objective; /*!< \brief Iteration the number of time steps to be averaged, counting from the back */
284285
long Dyn_RestartIter; /*!< \brief Iteration number to restart a dynamic structural analysis. */
285286
unsigned short nRKStep; /*!< \brief Number of steps of the explicit Runge-Kutta method. */
286287
su2double *RK_Alpha_Step; /*!< \brief Runge-Kutta beta coefficients. */
@@ -418,6 +419,7 @@ class CConfig {
418419
unsigned short Deform_Stiffness_Type; /*!< \brief Type of element stiffness imposed for FEA mesh deformation. */
419420
bool Deform_Output; /*!< \brief Print the residuals during mesh deformation to the console. */
420421
su2double Deform_Tol_Factor; /*!< Factor to multiply smallest volume for deform tolerance (0.001 default) */
422+
su2double Deform_Coeff; /*!< Deform coeffienct */
421423
unsigned short Deform_Linear_Solver; /*!< Numerical method to deform the grid */
422424
unsigned short FFD_Continuity; /*!< Surface continuity at the intersection with the FFD */
423425
su2double Deform_ElasticityMod, Deform_PoissonRatio; /*!< young's modulus and poisson ratio for volume deformation stiffness model */
@@ -529,7 +531,9 @@ class CConfig {
529531
ObjFunc_Value_FileName, /*!< \brief Objective function. */
530532
SurfFlowCoeff_FileName, /*!< \brief Output file with the flow variables on the surface. */
531533
SurfAdjCoeff_FileName, /*!< \brief Output file with the adjoint variables on the surface. */
532-
New_SU2_FileName; /*!< \brief Output SU2 mesh file converted from CGNS format. */
534+
New_SU2_FileName, /*!< \brief Output SU2 mesh file converted from CGNS format. */
535+
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
536+
VolSens_FileName; /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
533537
bool Low_MemoryOutput, /*!< \brief Write a volume solution file */
534538
Wrt_Vol_Sol, /*!< \brief Write a volume solution file */
535539
Wrt_Srf_Sol, /*!< \brief Write a surface solution file */
@@ -701,6 +705,8 @@ class CConfig {
701705
su2double Static_Time; /*!< \brief Time while the structure is not loaded in FSI applications. */
702706
unsigned short Pred_Order; /*!< \brief Order of the predictor for FSI applications. */
703707
unsigned short Kind_Interpolation; /*!\brief type of interpolation to use for FSI applications. */
708+
bool Prestretch; /*!< Read a reference geometry for optimization purposes. */
709+
string Prestretch_FEMFileName; /*!< \brief File name for reference geometry. */
704710
unsigned long Nonphys_Points, /*!< \brief Current number of non-physical points in the solution. */
705711
Nonphys_Reconstr; /*!< \brief Current number of non-physical reconstructions for 2nd-order upwinding. */
706712
bool ParMETIS; /*!< \brief Boolean for activating ParMETIS mode (while testing). */
@@ -1570,6 +1576,19 @@ class CConfig {
15701576
*/
15711577
unsigned short GetElas2D_Formulation(void);
15721578

1579+
/*!
1580+
* \brief Decide whether it's necessary to read a reference geometry.
1581+
* \return <code>TRUE</code> if it's necessary to read a reference geometry, <code>FALSE</code> otherwise.
1582+
*/
1583+
1584+
bool GetPrestretch(void);
1585+
1586+
/*!
1587+
* \brief Get the name of the file with the reference geometry of the structural problem.
1588+
* \return Name of the file with the reference geometry of the structural problem.
1589+
*/
1590+
string GetPrestretch_FEMFileName(void);
1591+
15731592
/*!
15741593
* \brief Get the Poisson's ratio.
15751594
* \return Value of the Poisson's ratio.
@@ -2177,7 +2196,13 @@ class CConfig {
21772196
long GetUnst_AdjointIter(void);
21782197

21792198
/*!
2180-
* \brief Get the restart iteration number for dynamic structural simulations.
2199+
* \brief Number of iterations to average (reverse time integration).
2200+
* \return Starting direct iteration number for the unsteady adjoint.
2201+
*/
2202+
unsigned long GetIter_Avg_Objective(void);
2203+
2204+
/*!
2205+
* \brief Get the restart iteration number for dynamic structural simulations.
21812206
* \return Restart iteration number for dynamic structural simulations.
21822207
*/
21832208
long GetDyn_RestartIter(void);
@@ -2389,7 +2414,7 @@ class CConfig {
23892414
*/
23902415
string GetMarker_EngineExhaust(unsigned short val_marker);
23912416

2392-
/*!
2417+
/*!
23932418
* \brief Get the name of the surface defined in the geometry file.
23942419
* \param[in] val_marker - Value of the marker in which we are interested.
23952420
* \return Name that is in the geometry file for the surface that
@@ -2904,6 +2929,12 @@ class CConfig {
29042929
* \return Factor to multiply smallest volume for deform tolerance.
29052930
*/
29062931
su2double GetDeform_Tol_Factor(void);
2932+
2933+
/*!
2934+
* \brief Get factor to multiply smallest volume for deform tolerance.
2935+
* \return Factor to multiply smallest volume for deform tolerance.
2936+
*/
2937+
su2double GetDeform_Coeff(void);
29072938

29082939
/*!
29092940
* \brief Get Young's modulus for deformation (constant stiffness deformation)
@@ -3904,6 +3935,18 @@ class CConfig {
39043935
*/
39053936
string GetSurfAdjCoeff_FileName(void);
39063937

3938+
/*!
3939+
* \brief Get the name of the file with the surface sensitivity (discrete adjoint).
3940+
* \return Name of the file with the surface sensitivity (discrete adjoint).
3941+
*/
3942+
string GetSurfSens_FileName(void);
3943+
3944+
/*!
3945+
* \brief Get the name of the file with the volume sensitivity (discrete adjoint).
3946+
* \return Name of the file with the volume sensitivity (discrete adjoint).
3947+
*/
3948+
string GetVolSens_FileName(void);
3949+
39073950
/*!
39083951
* \brief Augment the input filename with the iteration number for an unsteady file.
39093952
* \param[in] val_filename - String value of the base filename.

Common/include/config_structure.inl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file config_structure.inl
33
* \brief In-Line subroutines of the <i>config_structure.hpp</i> file.
44
* \author F. Palacios, T. Economon
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).
@@ -89,6 +89,8 @@ inline long CConfig::GetUnst_RestartIter(void) { return Unst_RestartIter; }
8989

9090
inline long CConfig::GetUnst_AdjointIter(void) { return Unst_AdjointIter; }
9191

92+
inline unsigned long CConfig::GetIter_Avg_Objective(void) { return Iter_Avg_Objective ; }
93+
9294
inline long CConfig::GetDyn_RestartIter(void) { return Dyn_RestartIter; }
9395

9496
inline string CConfig::GetPlaneTag(unsigned short index) { return PlaneTag[index]; }
@@ -137,7 +139,6 @@ inline unsigned short CConfig::GetElas2D_Formulation(void) { return Kind_2DElasF
137139

138140
inline su2double CConfig::GetPoissonRatio(void) { return PoissonRatio; }
139141

140-
141142
inline su2double CConfig::GetMaterialDensity(void) { return MaterialDensity; }
142143

143144
inline unsigned short CConfig::GetMaterialCompressibility(void) { return Kind_Material_Compress; }
@@ -146,6 +147,10 @@ inline unsigned short CConfig::GetMaterialModel(void) { return Kind_Material; }
146147

147148
inline unsigned short CConfig::GetGeometricConditions(void) { return Kind_Struct_Solver; }
148149

150+
inline bool CConfig::GetPrestretch(void) { return Prestretch; }
151+
152+
inline string CConfig::GetPrestretch_FEMFileName(void) { return Prestretch_FEMFileName; }
153+
149154
inline su2double CConfig::GetRefLengthMoment(void) { return RefLengthMoment; }
150155

151156
inline su2double CConfig::GetRefElemLength(void) { return RefElemLength; }
@@ -610,6 +615,8 @@ inline bool CConfig::GetDeform_Output(void) { return Deform_Output; }
610615

611616
inline su2double CConfig::GetDeform_Tol_Factor(void) { return Deform_Tol_Factor; }
612617

618+
inline su2double CConfig::GetDeform_Coeff(void) { return Deform_Coeff; }
619+
613620
inline su2double CConfig::GetDeform_ElasticityMod(void) { return Deform_ElasticityMod; }
614621

615622
inline su2double CConfig::GetDeform_PoissonRatio(void) { return Deform_PoissonRatio; }
@@ -918,6 +925,10 @@ inline string CConfig::GetSurfFlowCoeff_FileName(void) { return SurfFlowCoeff_Fi
918925

919926
inline string CConfig::GetSurfAdjCoeff_FileName(void) { return SurfAdjCoeff_FileName; }
920927

928+
inline string CConfig::GetSurfSens_FileName(void) { return SurfSens_FileName; }
929+
930+
inline string CConfig::GetVolSens_FileName(void) { return VolSens_FileName; }
931+
921932
inline unsigned short CConfig::GetResidual_Func_Flow(void) { return Residual_Func_Flow; }
922933

923934
inline unsigned short CConfig::GetCauchy_Func_Flow(void) { return Cauchy_Func_Flow; }

Common/include/datatype_structure.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* \brief Headers for generalized datatypes.
44
* The subroutines and functions are in the <i>datatype_structure.cpp</i> file.
55
* \author T. Albring
6-
* \version 4.1.3 "Cardinal"
6+
* \version 4.2.0 "Cardinal"
77
*
88
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
99
* Dr. Thomas D. Economon ([email protected]).
@@ -64,7 +64,7 @@ typedef double passivedouble;
6464
* \brief Namespace for defining the datatype wrapper routines; this class features as a base class for
6565
* type interfaces for non-primitive dataypes e.g. used by AD, complex etc.
6666
* \author T. Albring
67-
* \version 4.1.3 "Cardinal"
67+
* \version 4.2.0 "Cardinal"
6868
*/
6969
namespace SU2_TYPE{
7070
/*!

Common/include/datatype_structure.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file datatype_structure.inl
33
* \brief In-Line subroutines of the <i>datatype_structure.hpp</i> file.
44
* \author T. Albring
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

Common/include/datatypes/codi_forward_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file codi_forward_structure.hpp
33
* \brief Header for codi forward type definition.
44
* \author T. Albring
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

Common/include/datatypes/codi_forward_structure.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file codi_forward_structure.inl
33
* \brief Inline subroutines for <i>codi_forward_structure.hpp<i>.
44
* \author T. Albring
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

Common/include/datatypes/codi_reverse_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file codi_reverse_structure.hpp
33
* \brief Header for codi reverse type definition.
44
* \author T. Albring
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

Common/include/datatypes/codi_reverse_structure.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file codi_reverse_structure.inl
33
* \brief Inline subroutines for <i>datatype_structure.hpp<i>.
44
* \author T. Albring
5-
* \version 4.1.3 "Cardinal"
5+
* \version 4.2.0 "Cardinal"
66
*
77
* SU2 Lead Developers: Dr. Francisco Palacios ([email protected]).
88
* Dr. Thomas D. Economon ([email protected]).

0 commit comments

Comments
 (0)