@@ -72,6 +72,35 @@ class LinearAssemblySegregatedSolve : public SIMPLESolveBase
7272 const Real field_relaxation = 1.0 ,
7373 const Real min_value_limiter = std::numeric_limits<Real>::min());
7474
75+ // / Aggregated storage for residuals, tolerances, and indices used in convergence checks
76+ struct ResidualStorage
77+ {
78+ // / (linear iterations, normalized residual) entries in the order used by NS::FV::converged()
79+ std::vector<std::pair<unsigned int , Real>> ns_residuals;
80+ // / Absolute tolerances matching ns_residuals
81+ std::vector<Real> ns_abs_tols;
82+ // / Indices of momentum equations in ns_residuals
83+ std::vector<std::size_t > momentum_indices;
84+ // / Index of the pressure equation in ns_residuals
85+ std::size_t pressure_index = Moose::invalid_size_t ;
86+ // / Index of the energy equation in ns_residuals
87+ std::size_t energy_index = Moose::invalid_size_t ;
88+ // / Index of the solid energy equation in ns_residuals
89+ std::size_t solid_energy_index = Moose::invalid_size_t ;
90+ // / Indices of active scalar equations in ns_residuals
91+ std::vector<std::size_t > active_scalar_indices;
92+ // / Indices of turbulence surrogate equations in ns_residuals
93+ std::vector<std::size_t > turbulence_indices;
94+ // / This will be an initial indicator if we have something to solve.
95+ // / If we dont have anything we just set this to true.
96+ bool converged = false ;
97+ };
98+
99+ /* *
100+ * Build residual/tolerance vectors and associated indices for all enabled systems.
101+ */
102+ ResidualStorage setupResidualStorage () const ;
103+
75104 // / Solve an equation which contains the solid energy conservation.
76105 std::pair<unsigned int , Real> solveSolidEnergy ();
77106
@@ -114,6 +143,15 @@ class LinearAssemblySegregatedSolve : public SIMPLESolveBase
114143 // / Shortcut to every linear system that we solve for here
115144 std::vector<LinearSystem *> _systems_to_solve;
116145
146+ // / Flags controlling which systems are actively solved (can be used with restart to freeze flow)
147+ const bool _should_solve_momentum;
148+ const bool _should_solve_pressure;
149+ const bool _should_solve_energy;
150+ const bool _should_solve_solid_energy;
151+ const bool _should_solve_turbulence;
152+ const bool _should_solve_passive_scalars;
153+ const bool _should_solve_active_scalars;
154+
117155 // ************************ Active Scalar Variables ************************ //
118156
119157 // / The names of the active scalar systems
0 commit comments