Масштабное переобозначение

Улучшение читаемости и понимания кода
This commit is contained in:
ParkSuMin
2025-05-14 18:00:22 +03:00
parent 8100f0d4e1
commit d55f8fa5d3
7 changed files with 57 additions and 50 deletions

View File

@@ -29,16 +29,20 @@ void visualize(std::ofstream& file, std::string filename, int time_end) {
int main()
{
/* Граничные условия:
1 - нагрев*/
int l = 3;
int t = 1;
int r = 1;
int b = 4;
int r2 = 4;
int s = 4;
1 - нагрев
2 - теплоизоляция
3 - конвекция
4 - отсутствует
*/
int left = 3;
int top = 1;
int right = 3;
int bottom = 1;
int r2 = 3;
int s = 3;
double step = 10;
double step2 = 5;
double step_5 = 5;
double step_10 = 10;
double time_step = 1;
double time_end = 100;
@@ -58,17 +62,17 @@ int main()
obj.Add_Form("Arc", arc, true, r2);
obj.Add_Form("Rectangle", plate, false, 1);
System explicit5(obj, step2, CONDUCTIVITY);
System explicit10(obj, step, CONDUCTIVITY);
System explicit5(obj, step_5, CONDUCTIVITY);
System explicit10(obj, step_10, CONDUCTIVITY);
System implicit5(obj, step2, CONDUCTIVITY);
System implicit10(obj, step, CONDUCTIVITY);
System implicit5(obj, step_5, CONDUCTIVITY);
System implicit10(obj, step_10, CONDUCTIVITY);
explicit5.DefineBounds(l, t, r, b);
explicit10.DefineBounds(l, t, r, b);
explicit5.DefineBounds(left, top, right, bottom);
explicit10.DefineBounds(left, top, right, bottom);
implicit5.DefineBounds(l, t, r, b);
implicit10.DefineBounds(l, t, r, b);
implicit5.DefineBounds(left, top, right, bottom);
implicit10.DefineBounds(left, top, right, bottom);
Solver slv5("explicit5.txt", "implicit5.txt", time_step);
Solver slv10("explicit10.txt", "implicit10.txt", time_step);