Skip to content

Commit ce04458

Browse files
committed
Merge branch 'stress_penalty' into hybrid_parallel_incomp
2 parents cc2946e + 30b2554 commit ce04458

7 files changed

Lines changed: 78 additions & 198 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ class CConfig {
849849
su2double Knowles_B, /*!< \brief Knowles material model constant B. */
850850
Knowles_N; /*!< \brief Knowles material model constant N. */
851851
bool DE_Effects; /*!< Application of DE effects to FE analysis */
852-
bool RefGeom; /*!< Read a reference geometry for optimization purposes. */
852+
bool RefGeom, RefGeomSurf; /*!< Read a reference geometry for optimization purposes. */
853853
unsigned long refNodeID; /*!< \brief Global ID for the reference node (optimization). */
854854
string RefGeom_FEMFileName; /*!< \brief File name for reference geometry. */
855855
unsigned short RefGeom_FileFormat; /*!< \brief Mesh input format. */
@@ -2045,11 +2045,15 @@ class CConfig {
20452045
su2double GetRefNode_Penalty(void) const { return RefNode_Penalty; }
20462046

20472047
/*!
2048-
* \brief Decide whether it's necessary to read a reference geometry.
2049-
* \return <code>TRUE</code> if it's necessary to read a reference geometry, <code>FALSE</code> otherwise.
2050-
*/
2048+
* \brief Decide whether it's necessary to read a reference geometry.
2049+
*/
20512050
bool GetRefGeom(void) const { return RefGeom; }
20522051

2052+
/*!
2053+
* \brief Consider only the surface of the reference geometry.
2054+
*/
2055+
bool GetRefGeomSurf(void) const { return RefGeomSurf; }
2056+
20532057
/*!
20542058
* \brief Get the name of the file with the reference geometry of the structural problem.
20552059
* \return Name of the file with the reference geometry of the structural problem.

Common/src/CConfig.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,10 +2237,12 @@ void CConfig::SetConfig_Options() {
22372237
addBoolOption("REFERENCE_GEOMETRY", RefGeom, false);
22382238
/*!\brief REFERENCE_GEOMETRY_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/
22392239
addDoubleOption("REFERENCE_GEOMETRY_PENALTY", RefGeom_Penalty, 1E6);
2240-
/*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart structure input file (the file output under the filename set by RESTART_FLOW_FILENAME) \n Default: solution_flow.dat \ingroup Config */
2240+
/*!\brief REFERENCE_GEOMETRY_FILENAME \n DESCRIPTION: Reference geometry filename \n Default: reference_geometry.dat \ingroup Config */
22412241
addStringOption("REFERENCE_GEOMETRY_FILENAME", RefGeom_FEMFileName, string("reference_geometry.dat"));
2242-
/*!\brief MESH_FORMAT \n DESCRIPTION: Mesh input file format \n OPTIONS: see \link Input_Map \endlink \n DEFAULT: SU2 \ingroup Config*/
2242+
/*!\brief REFERENCE_GEOMETRY_FORMAT \n DESCRIPTION: Reference geometry format \n DEFAULT: SU2 \ingroup Config*/
22432243
addEnumOption("REFERENCE_GEOMETRY_FORMAT", RefGeom_FileFormat, Input_Ref_Map, SU2_REF);
2244+
/*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. \ingroup Config*/
2245+
addBoolOption("REFERENCE_GEOMETRY_SURFACE", RefGeomSurf, false);
22442246

22452247
/*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup Config*/
22462248
addDoubleOption("TOTAL_DV_PENALTY", DV_Penalty, 0);

SU2_CFD/include/variables/CFEAVariable.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,7 @@ class CFEAVariable : public CVariable {
367367
/*!
368368
* \brief Get the pointer to the reference geometry
369369
*/
370-
inline su2double *GetReference_Geometry(unsigned long iPoint) final { return Reference_Geometry[iPoint]; }
371-
372-
/*!
373-
* \brief Get the value of the reference geometry for the coordinate iVar
374-
*/
375-
inline su2double GetReference_Geometry(unsigned long iPoint, unsigned long iVar) const final {
376-
return Reference_Geometry(iPoint,iVar);
377-
}
370+
inline const su2double* GetReference_Geometry(unsigned long iPoint) const final { return Reference_Geometry[iPoint]; }
378371

379372
/*!
380373
* \brief Register the variables in the solution time_n array as input/output variable.

SU2_CFD/include/variables/CVariable.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ class CVariable {
22712271
/*!
22722272
* \brief A virtual member.
22732273
*/
2274-
inline virtual su2double *GetReference_Geometry(unsigned long iPoint) {return nullptr; }
2274+
inline virtual const su2double* GetReference_Geometry(unsigned long iPoint) const { return nullptr; }
22752275

22762276
/*!
22772277
* \brief A virtual member.
@@ -2288,11 +2288,6 @@ class CVariable {
22882288
*/
22892289
inline virtual su2double GetPrestretch(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
22902290

2291-
/*!
2292-
* \brief A virtual member.
2293-
*/
2294-
inline virtual su2double GetReference_Geometry(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
2295-
22962291
/*!
22972292
* \brief A virtual member. Get the value of the undeformed coordinates.
22982293
* \param[in] iDim - Index of Mesh_Coord[nDim]

0 commit comments

Comments
 (0)