From 5d7a521945e8dab3855b01f27d6b8db0735ff566 Mon Sep 17 00:00:00 2001 From: ParkSuMin Date: Wed, 14 May 2025 22:22:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Уточнение ГУ --- MemMAPR_winda.sln | 10 +--------- es10.plt | 10 ---------- es5.plt | 10 ---------- is10.plt | 10 ---------- is5.plt | 10 ---------- src/Node.cpp | 50 +++++++++++++++++++++++------------------------ src/main.cpp | 8 ++++---- 7 files changed, 30 insertions(+), 78 deletions(-) delete mode 100644 es10.plt delete mode 100644 es5.plt delete mode 100644 is10.plt delete mode 100644 is5.plt diff --git a/MemMAPR_winda.sln b/MemMAPR_winda.sln index 7b8044a..337f9ab 100644 --- a/MemMAPR_winda.sln +++ b/MemMAPR_winda.sln @@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.12.35707.178 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Main_program", "MemMAPR_winda.vcxproj", "{86DC468D-3A9F-48AB-80FC-059A120499AA}" -EndProject -Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "MemMAPR_visual", "..\MemMAPR_visual\MemMAPR_visual.pyproj", "{C56779D9-6429-49A0-8E09-0AE6A666EA21}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MemMAPR_main", "MemMAPR_winda.vcxproj", "{86DC468D-3A9F-48AB-80FC-059A120499AA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -29,12 +27,6 @@ Global {86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x64.Build.0 = Release|x64 {86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x86.ActiveCfg = Release|Win32 {86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x86.Build.0 = Release|Win32 - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|x64.ActiveCfg = Debug|Any CPU - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|x86.ActiveCfg = Debug|Any CPU - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|x64.ActiveCfg = Release|Any CPU - {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/es10.plt b/es10.plt deleted file mode 100644 index 7f06c25..0000000 --- a/es10.plt +++ /dev/null @@ -1,10 +0,0 @@ -set cbrange [0:100] -set size ratio 0.8 -unset key - -set palette defined (0 0 0 1, 0.25 0 1 1, 0.5 0 1 0, 0.75 1 1 0, 1 1 0 0) - -do for [i=0:99]{ -plot 'explicit10.txt' u 1:2:3 index i w points pt 5 palette -pause 1e-09} -pause mouse \ No newline at end of file diff --git a/es5.plt b/es5.plt deleted file mode 100644 index 53ef058..0000000 --- a/es5.plt +++ /dev/null @@ -1,10 +0,0 @@ -set cbrange [0:100] -set size ratio 0.8 -unset key - -set palette defined (0 0 0 1, 0.25 0 1 1, 0.5 0 1 0, 0.75 1 1 0, 1 1 0 0) - -do for [i=0:99]{ -plot 'explicit5.txt' u 1:2:3 index i w points pt 5 palette -pause 1e-09} -pause mouse \ No newline at end of file diff --git a/is10.plt b/is10.plt deleted file mode 100644 index 2709fd0..0000000 --- a/is10.plt +++ /dev/null @@ -1,10 +0,0 @@ -set cbrange [0:100] -set size ratio 0.8 -unset key - -set palette defined (0 0 0 1, 0.25 0 1 1, 0.5 0 1 0, 0.75 1 1 0, 1 1 0 0) - -do for [i=0:99]{ -plot 'implicit10.txt' u 1:2:3 index i w points pt 5 palette -pause 1e-09} -pause mouse \ No newline at end of file diff --git a/is5.plt b/is5.plt deleted file mode 100644 index 7c67833..0000000 --- a/is5.plt +++ /dev/null @@ -1,10 +0,0 @@ -set cbrange [0:100] -set size ratio 0.8 -unset key - -set palette defined (0 0 0 1, 0.25 0 1 1, 0.5 0 1 0, 0.75 1 1 0, 1 1 0 0) - -do for [i=0:99]{ -plot 'implicit5.txt' u 1:2:3 index i w points pt 5 palette -pause 1e-09} -pause mouse \ No newline at end of file diff --git a/src/Node.cpp b/src/Node.cpp index 29b0fbd..cf0d0f9 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -7,31 +7,6 @@ double Node::T() const { return 100.; if (_btype == 2) { - if (!_left) - if (_right) - return _right->T() / (1 + Dist(_right)); - if (!_right) - if (_left) - return _left->T() / (1 + Dist(_left)); - if (!_above) - if (_below) - return _below->T() / (1 + Dist(_below)); - if (!_below) - if (_above) - return _above->T() / (1 + Dist(_above)); - if (_right && _left) { - if (_right->IsBound()) - return _left->T() / (1 + Dist(_left)); - return _right->T() / (1 + Dist(_right)); - } - if (_above && _below) { - if (_above->IsBound()) - return _below->T() / (1 + Dist(_below)); - return _above->T() / (1 + Dist(_above)); - } - } - - if (_btype == 3) { if (!_left) if (_right) return _right->T(); @@ -56,6 +31,31 @@ double Node::T() const { } } + if (_btype == 3) { + if (!_left) + if (_right) + return _right->T() / (1 + Dist(_right)); + if (!_right) + if (_left) + return _left->T() / (1 + Dist(_left)); + if (!_above) + if (_below) + return _below->T() / (1 + Dist(_below)); + if (!_below) + if (_above) + return _above->T() / (1 + Dist(_above)); + if (_right && _left) { + if (_right->IsBound()) + return _left->T() / (1 + Dist(_left)); + return _right->T() / (1 + Dist(_right)); + } + if (_above && _below) { + if (_above->IsBound()) + return _below->T() / (1 + Dist(_below)); + return _above->T() / (1 + Dist(_above)); + } + } + return _t; } diff --git a/src/main.cpp b/src/main.cpp index eab61bf..464d49e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -83,19 +83,19 @@ int main() slv10.SolveExplicit(explicit10, time_end); slv10.SolveImplicit(implicit10, time_end); - std::ofstream script("es10.plt"); + std::ofstream script("ixplicit10.plt"); visualize(script, "explicit10.txt", time_end); script.close(); - script.open("is10.plt"); + script.open("implicit10.plt"); visualize(script, "implicit10.txt", time_end); script.close(); - script.open("es5.plt"); + script.open("explicit5.plt"); visualize(script, "explicit5.txt", time_end); script.close(); - script.open("is5.plt"); + script.open("explicit5.plt"); visualize(script, "implicit5.txt", time_end); script.close(); return 0;