Масштабное переобозначение
Улучшение читаемости и понимания кода
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "Solver.hpp"
|
||||
void Solver::SolveExplicit(System& program, double tstop) const {
|
||||
std::ofstream ExplicitOut(_name_1);
|
||||
//ExplicitOut << "t x y T" << std::endl;
|
||||
std::ofstream output(filename_expl);
|
||||
//output << "t x y T" << std::endl;
|
||||
|
||||
for (double t = 0.0; t < tstop; t += delta) {
|
||||
/* Обработка узлов по оси X */
|
||||
@@ -44,15 +44,15 @@ void Solver::SolveExplicit(System& program, double tstop) const {
|
||||
}
|
||||
for (auto line : program.Nodes()) {
|
||||
for (auto node : line)
|
||||
ExplicitOut << t+1 << ' ' << node->X() << ' ' << node->Y() << ' ' << node->T() << '\n';
|
||||
output << t+1 << ' ' << node->X() << ' ' << node->Y() << ' ' << node->T() << '\n';
|
||||
}
|
||||
ExplicitOut << "\n\n";
|
||||
output << "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
void Solver::SolveImplicit(System& sys, double tstop) const {
|
||||
std::ofstream EmplicitOut(_name_2);
|
||||
//EmplicitOut << "t x y T" << std::endl;
|
||||
std::ofstream output(filename_impl);
|
||||
//output << "t x y T" << std::endl;
|
||||
|
||||
for (double t = 0.; t < tstop; t += delta) {
|
||||
for (auto line : sys.Nodes())
|
||||
@@ -72,9 +72,9 @@ void Solver::SolveImplicit(System& sys, double tstop) const {
|
||||
}
|
||||
for (auto line : sys.Nodes()) {
|
||||
for (auto node : line)
|
||||
EmplicitOut << t + 1 << ' ' << node->X() << ' ' << node->Y() << ' ' << node->T() << '\n';
|
||||
output << t + 1 << ' ' << node->X() << ' ' << node->Y() << ' ' << node->T() << '\n';
|
||||
}
|
||||
EmplicitOut << "\n\n";
|
||||
output << "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user