Skip to content

Commit

Permalink
Merge branch 'develop' into fix_random_version_numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
WallyMaier authored Apr 30, 2021
2 parents 1e986d9 + eb55a07 commit 86f8342
Show file tree
Hide file tree
Showing 18 changed files with 124 additions and 183 deletions.
8 changes: 1 addition & 7 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,14 @@ class CConfig {
short *Marker_All_SendRecv; /*!< \brief Information about if the boundary is sended (+), received (-). */
short *Marker_All_PerBound; /*!< \brief Global index for periodic bc using the grid information. */

unsigned long nExtIter; /*!< \brief Number of external iterations. */
unsigned long ExtIter; /*!< \brief Current external iteration number. */
unsigned long ExtIter_OffSet; /*!< \brief External iteration number offset. */
unsigned long IntIter; /*!< \brief Current internal iteration number. */
unsigned long OuterIter; /*!< \brief Current Outer iterations for multizone problems. */
unsigned long InnerIter; /*!< \brief Current inner iterations for multizone problems. */
unsigned long TimeIter; /*!< \brief Current time iterations for multizone problems. */
long Unst_RestartIter; /*!< \brief Iteration number to restart an unsteady simulation (Dual time Method). */
long Unst_AdjointIter; /*!< \brief Iteration number to begin the reverse time integration in the direct solver for the unsteady adjoint. */
long Iter_Avg_Objective; /*!< \brief Iteration the number of time steps to be averaged, counting from the back */
long Dyn_RestartIter; /*!< \brief Iteration number to restart a dynamic structural analysis. */
su2double PhysicalTime; /*!< \brief Physical time at the current iteration in the solver for unsteady problems. */

unsigned short nLevels_TimeAccurateLTS; /*!< \brief Number of time levels for time accurate local time stepping. */
Expand Down Expand Up @@ -8295,22 +8292,19 @@ class CConfig {
void GEMMProfilingCSV(void);

/*!
*
* \brief Set freestream turbonormal for initializing solution.
*/
void SetFreeStreamTurboNormal(const su2double* turboNormal);

/*!
*
* \brief Set freestream turbonormal for initializing solution.
*/
const su2double* GetFreeStreamTurboNormal(void) const { return FreeStreamTurboNormal; }

/*!
*
* \brief Set multizone properties.
*/
void SetMultizone(CConfig *driver_config, CConfig **config_container);
void SetMultizone(const CConfig *driver_config, const CConfig* const* config_container);

/*!
* \brief Get the verbosity level of the console output.
Expand Down
2 changes: 1 addition & 1 deletion Common/include/fem/fem_geometry_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ class CMeshFEM_DG: public CMeshFEM {
* \param[in] Kind_Grid_Movement - The type of prescribed grid motion.
* \param[in] iZone - The currently active zone number.
*/
void InitStaticMeshMovement(CConfig *config,
void InitStaticMeshMovement(const CConfig *config,
const unsigned short Kind_Grid_Movement,
const unsigned short iZone);

Expand Down
18 changes: 12 additions & 6 deletions Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,34 +886,40 @@ class CGeometry {
* \param[in] config - Definition of the particular problem.
* \param[in] print - Display information on screen.
*/
void SetRotationalVelocity(CConfig *config, bool print = false);
void SetRotationalVelocity(const CConfig *config, bool print = false);

/*!
* \brief Set the rotational velocity of the points on the shroud markers to 0.
* \param[in] config - Definition of the particular problem.
*/
void SetShroudVelocity(CConfig *config);
void SetShroudVelocity(const CConfig *config);

/*!
* \brief Set the translational velocity at each node.
* \param[in] config - Definition of the particular problem.
* \param[in] print - Display information on screen.
*/
void SetTranslationalVelocity(CConfig *config, bool print = false);
void SetTranslationalVelocity(const CConfig *config, bool print = false);

/*!
* \brief Set the translational/rotational velocity for all moving walls.
* \param[in] config - Definition of the particular problem.
* \param[in] print - Display information on screen.
*/
void SetWallVelocity(const CConfig *config, bool print = false);

/*!
* \brief Set the grid velocity via finite differencing at each node.
* \param[in] config - Definition of the particular problem.
* \param[in] iter - Current physical time step.
*/
void SetGridVelocity(CConfig *config, unsigned long iter);
void SetGridVelocity(const CConfig *config);

/*!
* \brief A virtual member.
* \param[in] geometry - Geometry of the fine mesh.
* \param[in] config - Definition of the particular problem.
*/
inline virtual void SetRestricted_GridVelocity(CGeometry *fine_mesh, CConfig *config) {}
inline virtual void SetRestricted_GridVelocity(CGeometry *fine_mesh, const CConfig *config) {}

/*!
* \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE
Expand Down
2 changes: 1 addition & 1 deletion Common/include/geometry/CMultiGridGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class CMultiGridGeometry final : public CGeometry {
* \param[in] fine_mesh - Geometry container for the finer mesh level.
* \param[in] config - Definition of the particular problem.
*/
void SetRestricted_GridVelocity(CGeometry *fine_mesh, CConfig *config) override;
void SetRestricted_GridVelocity(CGeometry *fine_mesh, const CConfig *config) override;

/*!
* \brief Find and store the closest neighbor to a vertex.
Expand Down
9 changes: 0 additions & 9 deletions Common/include/grid_movement/CSurfaceMovement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ class CSurfaceMovement : public CGridMovement {
*/
void SetRotation(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef);

/*!
* \brief Set the translational/rotational velocity for a moving wall.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] iZone - Zone number in the mesh.
* \param[in] iter - Physical time iteration number.
*/
void Moving_Walls(CGeometry *geometry, CConfig *config, unsigned short iZone, unsigned long iter);

/*!
* \brief Computes the displacement of a rotating surface for a dynamic mesh simulation.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down
44 changes: 16 additions & 28 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1644,14 +1644,10 @@ void CConfig::SetConfig_Options() {
addDoubleOption("HB_PERIOD", HarmonicBalance_Period, -1.0);
/* DESCRIPTION: Turn on/off harmonic balance preconditioning */
addBoolOption("HB_PRECONDITION", HB_Precondition, false);
/* DESCRIPTION: Iteration number to begin unsteady restarts (dual time method) */
addLongOption("UNST_RESTART_ITER", Unst_RestartIter, 0);
/* DESCRIPTION: Starting direct solver iteration for the unsteady adjoint */
addLongOption("UNST_ADJOINT_ITER", Unst_AdjointIter, 0);
/* DESCRIPTION: Number of iterations to average the objective */
addLongOption("ITER_AVERAGE_OBJ", Iter_Avg_Objective , 0);
/* DESCRIPTION: Iteration number to begin unsteady restarts (structural analysis) */
addLongOption("DYN_RESTART_ITER", Dyn_RestartIter, 0);
/* DESCRIPTION: Time discretization */
addEnumOption("TIME_DISCRE_FLOW", Kind_TimeIntScheme_Flow, Time_Int_Map, EULER_IMPLICIT);
/* DESCRIPTION: Time discretization */
Expand Down Expand Up @@ -2884,6 +2880,10 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
newString.append("WRT_SOL_FREQ is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
else if (!option_name.compare("WRT_SOL_FREQ_DUALTIME"))
newString.append("WRT_SOL_FREQ_DUALTIME is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
else if (!option_name.compare("UNST_RESTART_ITER"))
newString.append("UNST_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
else if (!option_name.compare("DYN_RESTART_ITER"))
newString.append("DYN_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
// This option is deprecated. After a grace period until 7.2.0 the usage warning should become an error.
/*else if (!option_name.compare("CONV_CRITERIA"))
newString.append(string("CONV_CRITERIA is deprecated. SU2 will choose the criteria automatically based on the CONV_FIELD.\n") +
Expand Down Expand Up @@ -3634,7 +3634,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
}

if (nKind_SurfaceMovement != nMarker_Moving) {
SU2_MPI::Error("Number of KIND_SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION);
SU2_MPI::Error("Number of SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION);
}

if (TimeMarching == TIME_MARCHING::TIME_STEPPING){
Expand Down Expand Up @@ -9699,7 +9699,7 @@ void CConfig::SetFreeStreamTurboNormal(const su2double* turboNormal){

}

void CConfig::SetMultizone(CConfig *driver_config, CConfig **config_container){
void CConfig::SetMultizone(const CConfig *driver_config, const CConfig* const* config_container){

for (unsigned short iZone = 0; iZone < nZone; iZone++){

Expand All @@ -9715,6 +9715,10 @@ void CConfig::SetMultizone(CConfig *driver_config, CConfig **config_container){
if (config_container[iZone]->GetTime_Step() != GetTime_Step()){
SU2_MPI::Error("Option TIME_STEP must be the same in all zones.", CURRENT_FUNCTION);
}
if (config_container[iZone]->GetUnst_CFL() != 0.0){
SU2_MPI::Error("Option UNST_CFL_NUMBER cannot be used in multizone problems (must be 0),"
" use a fixed TIME_STEP instead.", CURRENT_FUNCTION);
}
if (config_container[iZone]->GetMultizone_Problem() != GetMultizone_Problem()){
SU2_MPI::Error("Option MULTIZONE must be the same in all zones.", CURRENT_FUNCTION);
}
Expand Down Expand Up @@ -9750,12 +9754,6 @@ void CConfig::SetMultizone(CConfig *driver_config, CConfig **config_container){
}
}

/*--- Set the Restart iter for time dependent problems ---*/
if (driver_config->GetRestart()){
Unst_RestartIter = driver_config->GetRestart_Iter();
Dyn_RestartIter = driver_config->GetRestart_Iter();
}

/*--- Fix the Time Step for all subdomains, for the case of time-dependent problems ---*/
if (driver_config->GetTime_Domain()){
Delta_UnstTime = driver_config->GetTime_Step();
Expand All @@ -9768,29 +9766,19 @@ void CConfig::SetMultizone(CConfig *driver_config, CConfig **config_container){
/*------ Determine the special properties of the problem -----*/
/*------------------------------------------------------------*/

bool structural_zone = false;
bool fluid_zone = false;

unsigned short iZone = 0;
bool structural_zone = false;

/*--- If there is at least a fluid and a structural zone ---*/
for (iZone = 0; iZone < nZone; iZone++){
switch (config_container[iZone]->GetKind_Solver()) {
case EULER: case NAVIER_STOKES: case RANS:
case INC_EULER: case INC_NAVIER_STOKES: case INC_RANS:
case NEMO_EULER: case NEMO_NAVIER_STOKES:
fluid_zone = true;
break;
case FEM_ELASTICITY:
structural_zone = true;
Relaxation = true;
break;
}
for (auto iZone = 0u; iZone < nZone; iZone++) {
fluid_zone |= config_container[iZone]->GetFluidProblem();
structural_zone |= config_container[iZone]->GetStructuralProblem();
}

if (structural_zone) Relaxation = true;

/*--- If the problem has FSI properties ---*/
FSI_Problem = fluid_zone && structural_zone;

Multizone_Residual = true;

}
2 changes: 1 addition & 1 deletion Common/src/fem/fem_geometry_structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6589,7 +6589,7 @@ void CMeshFEM_DG::HighOrderContainmentSearch(const su2double *coor,
SU2_MPI::Error("Newton did not converge", CURRENT_FUNCTION);
}

void CMeshFEM_DG::InitStaticMeshMovement(CConfig *config,
void CMeshFEM_DG::InitStaticMeshMovement(const CConfig *config,
const unsigned short Kind_Grid_Movement,
const unsigned short iZone) {

Expand Down
Loading

0 comments on commit 86f8342

Please sign in to comment.