@@ -106,7 +106,7 @@ class CDriver : public CDriverBase {
106106
107107 protected:
108108 /* !
109- * \brief Initialize containers.
109+ * \brief Initialize containers.
110110 */
111111 void InitializeContainers ();
112112
@@ -154,6 +154,14 @@ class CDriver : public CDriverBase {
154154 */
155155 void InitializeSolver (CConfig* config, CGeometry** geometry, CSolver***& solver);
156156
157+ /* !
158+ * \brief Preprocess the inlets via file input for all solvers.
159+ * \param[in] solver_container - Container vector with all the solutions.
160+ * \param[in] geometry - Geometrical definition of the problem.
161+ * \param[in] config - Definition of the particular problem.
162+ */
163+ void PreprocessInlet (CSolver*** solver, CGeometry** geometry, CConfig* config) const ;
164+
157165 /* !
158166 * \brief Restart of the solvers from the restart files.
159167 * \param[in] solver - Container vector with all the solutions.
@@ -335,21 +343,6 @@ class CDriver : public CDriverBase {
335343 */
336344 virtual void RelaxationTractions (unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
337345
338- /* !
339- * \brief A virtual member to run a Block Gauss-Seidel iteration in multi-zone problems.
340- */
341- virtual void RunGaussSeidel () {}
342-
343- /* !
344- * \brief A virtual member to run a Block-Jacobi iteration in multi-zone problems.
345- */
346- virtual void RunJacobi () {}
347-
348- /* !
349- * \brief A virtual member.
350- */
351- void Update () override {}
352-
353346 /* !
354347 * \brief Print out the direct residuals.
355348 * \param[in] kind_recording - Type of recording (full list in ENUM_RECORDING, option_structure.hpp)
@@ -408,6 +401,21 @@ class CDriver : public CDriverBase {
408401 }
409402 }
410403
404+ /* !
405+ * \brief Sum the number of primal or adjoint variables for all solvers in a given zone.
406+ * \param[in] iZone - Index of the zone.
407+ * \param[in] adjoint - True to consider adjoint solvers instead of primal.
408+ * \return Total number of solution variables.
409+ */
410+ unsigned short GetTotalNumberOfVariables (unsigned short iZone, bool adjoint) const {
411+ unsigned short nVar = 0 ;
412+ for (auto iSol = 0u ; iSol < MAX_SOLS; iSol++) {
413+ auto solver = solver_container[iZone][INST_0][MESH_0][iSol];
414+ if (solver && (solver->GetAdjoint () == adjoint)) nVar += solver->GetnVar ();
415+ }
416+ return nVar;
417+ }
418+
411419 public:
412420 /* !
413421 * \brief Launch the computation for all zones and all physics.
@@ -419,11 +427,6 @@ class CDriver : public CDriverBase {
419427 */
420428 void Finalize () override ;
421429
422- /* !
423- * \brief A virtual member.
424- */
425- virtual void ResetConvergence ();
426-
427430 /* !
428431 * \brief Perform some pre-processing before an iteration of the physics.
429432 */
@@ -446,10 +449,9 @@ class CDriver : public CDriverBase {
446449 virtual void DynamicMeshUpdate (unsigned long TimeIter) {}
447450
448451 /* !
449- * \brief Perform a dynamic mesh deformation, including grid velocity computation and update of the multi-grid
450- * structure.
452+ * \brief Update the dual-time solution.
451453 */
452- virtual void DynamicMeshUpdate ( unsigned short val_iZone, unsigned long TimeIter ) {}
454+ virtual void Update ( ) {}
453455
454456 /* !
455457 * \brief Perform a mesh deformation as initial condition.
@@ -488,14 +490,6 @@ class CDriver : public CDriverBase {
488490 */
489491 string GetSurfaceFileName () const ;
490492
491- /* !
492- * \brief Preprocess the inlets via file input for all solvers.
493- * \param[in] solver_container - Container vector with all the solutions.
494- * \param[in] geometry - Geometrical definition of the problem.
495- * \param[in] config - Definition of the particular problem.
496- */
497- void PreprocessInlet (CSolver*** solver, CGeometry** geometry, CConfig* config) const ;
498-
499493 /* !
500494 * \brief Set the position of the heat source.
501495 * \param[in] alpha - Angle of rotation respect to Z axis.
@@ -513,21 +507,6 @@ class CDriver : public CDriverBase {
513507 void SetInletAngle (unsigned short iMarker, passivedouble alpha);
514508
515509// / \}
516-
517- /* !
518- * \brief Sum the number of primal or adjoint variables for all solvers in a given zone.
519- * \param[in] iZone - Index of the zone.
520- * \param[in] adjoint - True to consider adjoint solvers instead of primal.
521- * \return Total number of solution variables.
522- */
523- unsigned short GetTotalNumberOfVariables (unsigned short iZone, bool adjoint) const {
524- unsigned short nVar = 0 ;
525- for (auto iSol = 0u ; iSol < MAX_SOLS; iSol++) {
526- auto solver = solver_container[iZone][INST_0][MESH_0][iSol];
527- if (solver && (solver->GetAdjoint () == adjoint)) nVar += solver->GetnVar ();
528- }
529- return nVar;
530- }
531510};
532511
533512/* !
@@ -540,7 +519,6 @@ class CFluidDriver : public CDriver {
540519 protected:
541520 unsigned long Max_Iter;
542521
543- protected:
544522 /* !
545523 * \brief Constructor of the class.
546524 * \param[in] confFile - Configuration file name.
@@ -549,6 +527,11 @@ class CFluidDriver : public CDriver {
549527 */
550528 CFluidDriver (char * confFile, unsigned short val_nZone, SU2_Comm MPICommunicator);
551529
530+ /* !
531+ * \brief Transfer data among different zones (multiple zone).
532+ */
533+ void TransferData (unsigned short donorZone, unsigned short targetZone);
534+
552535 public:
553536 /* !
554537 * \brief Destructor of the class.
@@ -590,11 +573,6 @@ class CFluidDriver : public CDriver {
590573 * structure (multiple zone).
591574 */
592575 void DynamicMeshUpdate (unsigned long TimeIter) override ;
593-
594- /* !
595- * \brief Transfer data among different zones (multiple zone).
596- */
597- void TransferData (unsigned short donorZone, unsigned short targetZone);
598576};
599577
600578/* !
@@ -607,6 +585,16 @@ class CTurbomachineryDriver : public CFluidDriver {
607585 private:
608586 COutputLegacy* output_legacy;
609587
588+ /* !
589+ * \brief Set Mixing Plane interface within multiple zones.
590+ */
591+ void SetMixingPlane (unsigned short iZone);
592+
593+ /* !
594+ * \brief Set Mixing Plane interface within multiple zones.
595+ */
596+ void SetTurboPerformance (unsigned short targetZone);
597+
610598 public:
611599 /* !
612600 * \brief Constructor of the class.
@@ -627,16 +615,6 @@ class CTurbomachineryDriver : public CFluidDriver {
627615
628616 void Run () override ;
629617
630- /* !
631- * \brief Set Mixing Plane interface within multiple zones.
632- */
633- void SetMixingPlane (unsigned short iZone);
634-
635- /* !
636- * \brief Set Mixing Plane interface within multiple zones.
637- */
638- void SetTurboPerformance (unsigned short targetZone);
639-
640618 /* !
641619 * \brief Monitor the computation.
642620 */
@@ -655,25 +633,6 @@ class CHBDriver : public CFluidDriver {
655633 unsigned short nInstHB;
656634 su2double** D; /* !< \brief Harmonic Balance operator. */
657635
658- public:
659- /* !
660- * \brief Constructor of the class.
661- * \param[in] confFile - Configuration file name.
662- * \param[in] val_nZone - Total number of zones.
663- * \param[in] MPICommunicator - MPI communicator for SU2.
664- */
665- CHBDriver (char * confFile, unsigned short val_nZone, SU2_Comm MPICommunicator);
666-
667- /* !
668- * \brief Destructor of the class.
669- */
670- ~CHBDriver (void ) override ;
671-
672- /* !
673- * \brief Run a single iteration of a Harmonic Balance problem.
674- */
675- void Run () override ;
676-
677636 /* !
678637 * \brief Computation and storage of the Harmonic Balance method source terms.
679638 * \author T. Economon, K. Naik
@@ -693,13 +652,27 @@ class CHBDriver : public CFluidDriver {
693652 */
694653 void ComputeHBOperator ();
695654
655+ public:
696656 /* !
697- * \brief Update the solution for the Harmonic Balance.
657+ * \brief Constructor of the class.
658+ * \param[in] confFile - Configuration file name.
659+ * \param[in] val_nZone - Total number of zones.
660+ * \param[in] MPICommunicator - MPI communicator for SU2.
698661 */
699- void Update () override ;
662+ CHBDriver (char * confFile, unsigned short val_nZone, SU2_Comm MPICommunicator);
663+
664+ /* !
665+ * \brief Destructor of the class.
666+ */
667+ ~CHBDriver (void ) override ;
668+
669+ /* !
670+ * \brief Run a single iteration of a Harmonic Balance problem.
671+ */
672+ void Run () override ;
700673
701674 /* !
702- * \brief Reset the convergence flag (set to false) of the solver for the Harmonic Balance.
675+ * \brief Update the solution for the Harmonic Balance.
703676 */
704- void ResetConvergence () override ;
677+ void Update () override ;
705678};
0 commit comments