Skip to content

Commit 9d78c06

Browse files
committed
constification, remove legacy python FSI
1 parent 85311b4 commit 9d78c06

14 files changed

Lines changed: 58 additions & 119 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ class CConfig {
657657
nMarker_ZoneInterface, /*!< \brief Number of markers in the zone interface. */
658658
nMarker_Plotting, /*!< \brief Number of markers to plot. */
659659
nMarker_Analyze, /*!< \brief Number of markers to analyze. */
660-
nMarker_Moving, /*!< \brief Number of markers in motion (DEFORMING, MOVING_WALL, or FLUID_STRUCTURE). */
660+
nMarker_Moving, /*!< \brief Number of markers in motion (DEFORMING, MOVING_WALL). */
661661
nMarker_PyCustom, /*!< \brief Number of markers that are customizable in Python. */
662662
nMarker_DV, /*!< \brief Number of markers affected by the design variables. */
663663
nMarker_WallFunctions; /*!< \brief Number of markers for which wall functions must be applied. */
@@ -667,7 +667,7 @@ class CConfig {
667667
*Marker_Plotting, /*!< \brief Markers to plot. */
668668
*Marker_Analyze, /*!< \brief Markers to analyze. */
669669
*Marker_ZoneInterface, /*!< \brief Markers in the FSI interface. */
670-
*Marker_Moving, /*!< \brief Markers in motion (DEFORMING, MOVING_WALL, or FLUID_STRUCTURE). */
670+
*Marker_Moving, /*!< \brief Markers in motion (DEFORMING, MOVING_WALL). */
671671
*Marker_PyCustom, /*!< \brief Markers that are customizable in Python. */
672672
*Marker_DV, /*!< \brief Markers affected by the design variables. */
673673
*Marker_WallFunctions; /*!< \brief Markers for which wall functions must be applied. */

Common/include/option_structure.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ enum ENUM_MAIN_SOLVER {
176176
INC_NAVIER_STOKES =5, /*!< \brief Definition of the incompressible Navier-Stokes' solver. */
177177
INC_RANS = 6, /*!< \brief Definition of the incompressible Reynolds-averaged Navier-Stokes' (RANS) solver. */
178178
HEAT_EQUATION = 7, /*!< \brief Definition of the finite volume heat solver. */
179-
FLUID_STRUCTURE_INTERACTION = 8, /*!< \brief Definition of a FSI solver. */
180179
FEM_ELASTICITY = 9, /*!< \brief Definition of a FEM solver. */
181180
ADJ_EULER = 10, /*!< \brief Definition of the continuous adjoint Euler's solver. */
182181
ADJ_NAVIER_STOKES = 11, /*!< \brief Definition of the continuous adjoint Navier-Stokes' solver. */
@@ -231,7 +230,6 @@ static const MapType<string, ENUM_MAIN_SOLVER> Solver_Map = {
231230
MakePair("DISC_ADJ_FEM_RANS", DISC_ADJ_FEM_RANS)
232231
MakePair("DISC_ADJ_FEM_NS", DISC_ADJ_FEM_NS)
233232
MakePair("DISC_ADJ_FEM", DISC_ADJ_FEM)
234-
MakePair("FLUID_STRUCTURE_INTERACTION", FLUID_STRUCTURE_INTERACTION)
235233
MakePair("TEMPLATE_SOLVER", TEMPLATE_SOLVER)
236234
MakePair("MULTIPHYSICS", MULTIPHYSICS)
237235
};
@@ -699,7 +697,6 @@ enum ENUM_SURFACEMOVEMENT {
699697
MOVING_WALL = 2, /*!< \brief Simulation with moving wall. */
700698
AEROELASTIC = 3, /*!< \brief Simulation with aeroelastic motion. */
701699
AEROELASTIC_RIGID_MOTION = 4, /*!< \brief Simulation with rotation and aeroelastic motion. */
702-
FLUID_STRUCTURE = 5, /*!< \brief Fluid structure deformation. */
703700
EXTERNAL = 6, /*!< \brief Simulation with external motion. */
704701
EXTERNAL_ROTATION = 7, /*!< \brief Simulation with external rotation motion. */
705702
};
@@ -708,7 +705,6 @@ static const MapType<string, ENUM_SURFACEMOVEMENT> SurfaceMovement_Map = {
708705
MakePair("MOVING_WALL", MOVING_WALL)
709706
MakePair("AEROELASTIC_RIGID_MOTION", AEROELASTIC_RIGID_MOTION)
710707
MakePair("AEROELASTIC", AEROELASTIC)
711-
MakePair("FLUID_STRUCTURE", FLUID_STRUCTURE)
712708
MakePair("EXTERNAL", EXTERNAL)
713709
MakePair("EXTERNAL_ROTATION", EXTERNAL_ROTATION)
714710
};

Common/src/CConfig.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,13 +3114,6 @@ void CConfig::SetnZone(){
31143114

31153115
}
31163116

3117-
/*--- Temporary fix until Multizone Disc. Adj. solver is ready ---- */
3118-
3119-
if (Kind_Solver == FLUID_STRUCTURE_INTERACTION){
3120-
3121-
nZone = GetnZone(Mesh_FileName, Mesh_FileFormat);
3122-
3123-
}
31243117
}
31253118

31263119
void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_izone, unsigned short val_nDim) {
@@ -3563,11 +3556,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
35633556
}
35643557
}
35653558

3566-
if ((nKind_SurfaceMovement > 1) && GetSurface_Movement(FLUID_STRUCTURE)) {
3567-
SU2_MPI::Error("FSI in combination with moving surfaces is currently not supported.", CURRENT_FUNCTION);
3568-
}
3569-
3570-
if ((nKind_SurfaceMovement != nMarker_Moving) && !GetSurface_Movement(FLUID_STRUCTURE)) {
3559+
if (nKind_SurfaceMovement != nMarker_Moving) {
35713560
SU2_MPI::Error("Number of KIND_SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION);
35723561
}
35733562

@@ -5590,7 +5579,6 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
55905579
case RIGID_MOTION: cout << "rigid mesh motion." << endl; break;
55915580
case MOVING_HTP: cout << "HTP moving." << endl; break;
55925581
case ROTATING_FRAME: cout << "rotating reference frame." << endl; break;
5593-
case FLUID_STRUCTURE: cout << "fluid-structure motion." << endl; break;
55945582
case EXTERNAL: cout << "externally prescribed motion." << endl; break;
55955583
}
55965584
}
@@ -8302,7 +8290,6 @@ bool CConfig::GetVolumetric_Movement() const {
83028290

83038291
if (GetSurface_Movement(AEROELASTIC) ||
83048292
GetSurface_Movement(AEROELASTIC_RIGID_MOTION)||
8305-
GetSurface_Movement(FLUID_STRUCTURE) ||
83068293
GetSurface_Movement(EXTERNAL) ||
83078294
GetSurface_Movement(EXTERNAL_ROTATION)){
83088295
volumetric_movement = true;

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,13 @@ class CDriver {
428428
* \param[in] iVertex - Vertex identifier.
429429
* \return True if the specified vertex is a halo node.
430430
*/
431-
bool IsAHaloNode(unsigned short iMarker, unsigned long iVertex);
431+
bool IsAHaloNode(unsigned short iMarker, unsigned long iVertex) const;
432432

433433
/*!
434434
* \brief Get the number of external iterations.
435435
* \return Number of external iterations.
436436
*/
437-
unsigned long GetnTimeIter();
437+
unsigned long GetnTimeIter() const;
438438

439439
/*!
440440
* \brief Get the current external iteration.
@@ -446,31 +446,31 @@ class CDriver {
446446
* \brief Get the unsteady time step.
447447
* \return Unsteady time step.
448448
*/
449-
passivedouble GetUnsteady_TimeStep();
449+
passivedouble GetUnsteady_TimeStep() const;
450450

451451
/*!
452452
* \brief Get the global index of a vertex on a specified marker.
453453
* \param[in] iMarker - Marker identifier.
454454
* \param[in] iVertex - Vertex identifier.
455455
* \return Vertex global index.
456456
*/
457-
unsigned long GetVertexGlobalIndex(unsigned short iMarker, unsigned long iVertex);
457+
unsigned long GetVertexGlobalIndex(unsigned short iMarker, unsigned long iVertex) const;
458458

459459
/*!
460460
* \brief Get undeformed coordinates from the mesh solver.
461461
* \param[in] iMarker - Marker identifier.
462462
* \param[in] iVertex - Vertex identifier.
463463
* \return x,y,z coordinates of the vertex.
464464
*/
465-
vector<passivedouble> GetInitialMeshCoord(unsigned short iMarker, unsigned long iVertex);
465+
vector<passivedouble> GetInitialMeshCoord(unsigned short iMarker, unsigned long iVertex) const;
466466

467467
/*!
468468
* \brief Get the temperature at a vertex on a specified marker.
469469
* \param[in] iMarker - Marker identifier.
470470
* \param[in] iVertex - Vertex identifier.
471471
* \return Temperature of the vertex.
472472
*/
473-
passivedouble GetVertexTemperature(unsigned short iMarker, unsigned long iVertex);
473+
passivedouble GetVertexTemperature(unsigned short iMarker, unsigned long iVertex) const;
474474

475475
/*!
476476
* \brief Set the temperature of a vertex on a specified marker.
@@ -486,15 +486,15 @@ class CDriver {
486486
* \param[in] iVertex - Vertex identifier.
487487
* \return True if the vertex is a halo node.
488488
*/
489-
vector<passivedouble> GetVertexHeatFluxes(unsigned short iMarker, unsigned long iVertex);
489+
vector<passivedouble> GetVertexHeatFluxes(unsigned short iMarker, unsigned long iVertex) const;
490490

491491
/*!
492492
* \brief Get the wall normal component of the heat flux at a vertex on a specified marker.
493493
* \param[in] iMarker - Marker identifier.
494494
* \param[in] iVertex - Vertex identifier.
495495
* \return Wall normal component of the heat flux at the vertex.
496496
*/
497-
passivedouble GetVertexNormalHeatFlux(unsigned short iMarker, unsigned long iVertex);
497+
passivedouble GetVertexNormalHeatFlux(unsigned short iMarker, unsigned long iVertex) const;
498498

499499
/*!
500500
* \brief Set the wall normal component of the heat flux at a vertex on a specified marker.
@@ -510,60 +510,59 @@ class CDriver {
510510
* \param[in] iVertex - Vertex identifier.
511511
* \return Thermal conductivity at the vertex.
512512
*/
513-
passivedouble GetThermalConductivity(unsigned short iMarker, unsigned long iVertex);
513+
passivedouble GetThermalConductivity(unsigned short iMarker, unsigned long iVertex) const;
514514

515515
/*!
516516
* \brief Preprocess the inlets via file input for all solvers.
517517
* \param[in] solver_container - Container vector with all the solutions.
518518
* \param[in] geometry - Geometrical definition of the problem.
519519
* \param[in] config - Definition of the particular problem.
520520
*/
521-
void Inlet_Preprocessing(CSolver ***solver, CGeometry **geometry,
522-
CConfig *config) const;
521+
void Inlet_Preprocessing(CSolver ***solver, CGeometry **geometry, CConfig *config) const;
523522

524523
/*!
525524
* \brief Get the unit normal (vector) at a vertex on a specified marker.
526525
* \param[in] iMarker - Marker identifier.
527526
* \param[in] iVertex - Vertex identifier.
528527
* \return Unit normal (vector) at the vertex.
529528
*/
530-
vector<passivedouble> GetVertexUnitNormal(unsigned short iMarker, unsigned long iVertex);
529+
vector<passivedouble> GetVertexUnitNormal(unsigned short iMarker, unsigned long iVertex) const;
531530

532531
/*!
533532
* \brief Get all the boundary markers tags.
534533
* \return List of boundary markers tags.
535534
*/
536-
vector<string> GetAllBoundaryMarkersTag();
535+
vector<string> GetAllBoundaryMarkersTag() const;
537536

538537
/*!
539538
* \brief Get all the deformable boundary marker tags.
540539
* \return List of deformable boundary markers tags.
541540
*/
542-
vector<string> GetAllDeformMeshMarkersTag();
541+
vector<string> GetAllDeformMeshMarkersTag() const;
543542

544543
/*!
545544
* \brief Get all the heat transfer boundary markers tags.
546545
* \return List of heat transfer boundary markers tags.
547546
*/
548-
vector<string> GetAllCHTMarkersTag();
547+
vector<string> GetAllCHTMarkersTag() const;
549548

550549
/*!
551550
* \brief Get all the (subsonic) inlet boundary markers tags.
552551
* \return List of inlet boundary markers tags.
553552
*/
554-
vector<string> GetAllInletMarkersTag();
553+
vector<string> GetAllInletMarkersTag() const;
555554

556555
/*!
557556
* \brief Get all the boundary markers tags with their associated indices.
558557
* \return List of boundary markers tags with their indices.
559558
*/
560-
map<string, int> GetAllBoundaryMarkers();
559+
map<string, int> GetAllBoundaryMarkers() const;
561560

562561
/*!
563562
* \brief Get all the boundary markers tags with their associated types.
564563
* \return List of boundary markers tags with their types.
565564
*/
566-
map<string, string> GetAllBoundaryMarkersType();
565+
map<string, string> GetAllBoundaryMarkersType() const;
567566

568567
/*!
569568
* \brief Set the mesh displacement for the elasticity mesh solver.
@@ -586,7 +585,7 @@ class CDriver {
586585
* \param[in] iVertex - Vertex identifier.
587586
* \return Vector of sensitivities.
588587
*/
589-
vector<passivedouble> GetMeshDisp_Sensitivity(unsigned short iMarker, unsigned long iVertex);
588+
vector<passivedouble> GetMeshDisp_Sensitivity(unsigned short iMarker, unsigned long iVertex) const;
590589

591590
/*!
592591
* \brief Set the load in X direction for the structural solver.
@@ -605,23 +604,23 @@ class CDriver {
605604
* \param[in] iVertex - Vertex identifier.
606605
* \return Vector of displacements.
607606
*/
608-
vector<passivedouble> GetFEA_Displacements(unsigned short iMarker, unsigned long iVertex);
607+
vector<passivedouble> GetFEA_Displacements(unsigned short iMarker, unsigned long iVertex) const;
609608

610609
/*!
611610
* \brief Return the velocities from the FEA Solver.
612611
* \param[in] iMarker - Marker identifier.
613612
* \param[in] iVertex - Vertex identifier.
614613
* \return Vector of velocities.
615614
*/
616-
vector<passivedouble> GetFEA_Velocity(unsigned short iMarker, unsigned long iVertex);
615+
vector<passivedouble> GetFEA_Velocity(unsigned short iMarker, unsigned long iVertex) const;
617616

618617
/*!
619618
* \brief Return the velocities from the FEA Solver.
620619
* \param[in] iMarker - Marker identifier.
621620
* \param[in] iVertex - Vertex identifier.
622621
* \return Vector of velocities at time n.
623622
*/
624-
vector<passivedouble> GetFEA_Velocity_n(unsigned short iMarker, unsigned long iVertex);
623+
vector<passivedouble> GetFEA_Velocity_n(unsigned short iMarker, unsigned long iVertex) const;
625624

626625
/*!
627626
* \brief Get the sensitivity of the flow loads for the structural solver.
@@ -631,15 +630,15 @@ class CDriver {
631630
* \param[in] LoadX - Value of the load in the direction Y.
632631
* \param[in] LoadX - Value of the load in the direction Z.
633632
*/
634-
vector<passivedouble> GetFlowLoad_Sensitivity(unsigned short iMarker, unsigned long iVertex);
633+
vector<passivedouble> GetFlowLoad_Sensitivity(unsigned short iMarker, unsigned long iVertex) const;
635634

636635
/*!
637636
* \brief Get the flow load (from the extra step - the repeated methods should be unified once the postprocessing
638637
* strategy is in place).
639638
* \param[in] iMarker - Marker identifier.
640639
* \param[in] iVertex - Vertex identifier.
641640
*/
642-
vector<passivedouble> GetFlowLoad(unsigned short iMarker, unsigned long iVertex);
641+
vector<passivedouble> GetFlowLoad(unsigned short iMarker, unsigned long iVertex) const;
643642

644643
/*!
645644
* \brief Set the adjoint of the flow tractions (from the extra step -

SU2_CFD/src/iteration/CIteration.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ void CIteration::SetGrid_Movement(CGeometry** geometry, CSurfaceMovement* surfac
3434
CVolumetricMovement* grid_movement, CSolver*** solver, CConfig* config,
3535
unsigned long IntIter, unsigned long TimeIter) {
3636
unsigned short Kind_Grid_Movement = config->GetKind_GridMovement();
37-
unsigned long nIterMesh;
38-
bool stat_mesh = true;
3937
bool adjoint = config->GetContinuous_Adjoint();
4038

41-
/*--- Only write to screen if this option is enabled ---*/
42-
bool Screen_Output = config->GetDeform_Output();
43-
4439
unsigned short val_iZone = config->GetiZone();
4540

4641
/*--- Perform mesh movement depending on specified type ---*/
@@ -120,32 +115,6 @@ void CIteration::SetGrid_Movement(CGeometry** geometry, CSurfaceMovement* surfac
120115
}
121116
}
122117

123-
if (config->GetSurface_Movement(FLUID_STRUCTURE)) {
124-
if (rank == MASTER_NODE && Screen_Output)
125-
cout << endl << "Deforming the grid for Fluid-Structure Interaction applications." << endl;
126-
127-
/*--- Deform the volume grid around the new boundary locations ---*/
128-
129-
if (rank == MASTER_NODE && Screen_Output) cout << "Deforming the volume grid." << endl;
130-
grid_movement->SetVolume_Deformation(geometry[MESH_0], config, true, false);
131-
132-
nIterMesh = grid_movement->Get_nIterMesh();
133-
stat_mesh = (nIterMesh == 0);
134-
135-
if (!adjoint && !stat_mesh) {
136-
if (rank == MASTER_NODE && Screen_Output) cout << "Computing grid velocities by finite differencing." << endl;
137-
geometry[MESH_0]->SetGridVelocity(config, TimeIter);
138-
} else if (stat_mesh) {
139-
if (rank == MASTER_NODE && Screen_Output)
140-
cout << "The mesh is up-to-date. Using previously stored grid velocities." << endl;
141-
}
142-
143-
/*--- Update the multigrid structure after moving the finest grid,
144-
including computing the grid velocities on the coarser levels. ---*/
145-
146-
grid_movement->UpdateMultiGrid(geometry, config);
147-
}
148-
149118
if (config->GetSurface_Movement(EXTERNAL) || config->GetSurface_Movement(EXTERNAL_ROTATION)) {
150119
/*--- Apply rigid rotation to entire grid first, if necessary ---*/
151120

SU2_CFD/src/iteration/CIterationFactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ CIteration* CIterationFactory::CreateIteration(ENUM_MAIN_SOLVER kindSolver, cons
112112
iteration = new CDiscAdjHeatIteration(config);
113113
break;
114114

115-
case NO_SOLVER: case FLUID_STRUCTURE_INTERACTION: case TEMPLATE_SOLVER: case MULTIPHYSICS:
115+
case NO_SOLVER: case TEMPLATE_SOLVER: case MULTIPHYSICS:
116116
SU2_MPI::Error("No iteration found for specified solver.", CURRENT_FUNCTION);
117117
break;
118118
}

0 commit comments

Comments
 (0)