File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030#include < string>
3131
3232#include " ../Common/include/geometry/CPhysicalGeometry.hpp"
33- #include " ../SU2_CFD/include/solvers/CNSSolver.hpp"
3433#include " ../SU2_CFD/include/solvers/CSolverFactory.hpp"
3534
3635struct UnitQuadTestCase {
@@ -57,19 +56,34 @@ struct UnitQuadTestCase {
5756 streambuf* orig_buf{nullptr };
5857 UnitQuadTestCase () : ss(config_options), orig_buf(cout.rdbuf()) {}
5958
59+ /* !
60+ * \brief Add a line to the base config string stream
61+ * \param[in] optionLine - String containing the option(s)
62+ */
63+ void AddOption (const std::string& optionLine) { ss << optionLine << " \n " ; }
64+
65+ /* !
66+ * \brief Initialize the config structure
67+ */
6068 void InitConfig () {
6169 cout.rdbuf (nullptr );
6270 config = std::unique_ptr<CConfig>(new CConfig (ss, SU2_CFD, false ));
6371 cout.rdbuf (orig_buf);
6472 }
6573
74+ /* !
75+ * \brief Initialize the solver array
76+ */
6677 void InitSolver () {
6778 cout.rdbuf (nullptr );
68- solver = new CSolver*[MAX_SOLS];
69- solver[FLOW_SOL] = new CNSSolver (geometry .get (), config .get (), 0 );
79+ solver = CSolverFactory::createSolverContainer ( static_cast <ENUM_MAIN_SOLVER>(config. get ()-> GetKind_Solver ()),
80+ config .get (), geometry .get (), 0 );
7081 cout.rdbuf (orig_buf);
7182 }
7283
84+ /* !
85+ * \brief Initialize the geometry
86+ */
7387 void InitGeometry () {
7488 cout.rdbuf (nullptr );
7589 {
@@ -94,8 +108,11 @@ struct UnitQuadTestCase {
94108 cout.rdbuf (orig_buf);
95109 }
96110
111+ /* !
112+ * \brief Desctructor
113+ */
97114 ~UnitQuadTestCase () {
98115 delete solver;
99- delete [] solver;
116+ delete[] solver;
100117 }
101118};
You can’t perform that action at this time.
0 commit comments