diff options
-rw-r--r-- | Temparray.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Temparray.cpp b/Temparray.cpp index dacd048..798bbc5 100644 --- a/Temparray.cpp +++ b/Temparray.cpp @@ -35,6 +35,18 @@ Temparray::Temparray(float initialtemp, int x0, int y0, int z0){ } } } + cubehole(2, 2, 2, 1).setColor(vmml::vec4f(0.0, 0.0, 0.0, 1.0), + vmml::vec4f(0.0, 0.0, 0.0, 1.0), + vmml::vec4f(0.0, 0.0, 0.0, 1.0), + vmml::vec4f(0.0, 0.0, 0.0, 1.0)); + cubehole(2, 2, 2, 2).setColor(vmml::vec4f(1.0, 1.0, 1.0, 1.0), + vmml::vec4f(1.0, 1.0, 1.0, 1.0), + vmml::vec4f(1.0, 1.0, 1.0, 1.0), + vmml::vec4f(1.0, 1.0, 1.0, 1.0)); + cubehole(2, 2, 2, 3).setColor(vmml::vec4f(0.5, 0.5, 0.5, 1.0), + vmml::vec4f(0.5, 0.5, 0.5, 1.0), + vmml::vec4f(0.5, 0.5, 0.5, 1.0), + vmml::vec4f(0.5, 0.5, 0.5, 1.0)); } void Temparray::calcTemp(){ @@ -49,8 +61,8 @@ void Temparray::calcTemp(){ for(int i = 0; i < sx; ++i) { for(int j = 0; j < sy; ++j) { for(int k = 0; k < sz; ++k) { - for(int l = 5; l > 0; --l) { - for(int m = 0; m < 4; m++) { + for(int l = 1; l < 6; ++l) { + for(int m = 0; m < 4; ++m) { width = cubehole(i, j, k, l).getWidth(); width2 = cubehole(i, j, k, l-1).getWidth(); if(l!=5)width3 = cubehole(i, j, k, l+1).getWidth(); @@ -108,8 +120,8 @@ void Temparray::calcTemp(){ } tau12 = capacity * thermalresistance; tau21 = capacity2 * thermalresistance; - if(l!=5)tau31 = capacity * thermalresistance2; - if(l!=5)tau13 = capacity3 * thermalresistance2; + if(l!=5)tau13 = capacity * thermalresistance2; + if(l!=5)tau31 = capacity3 * thermalresistance2; temperaturenew(i, j, k, l, m) = temperaturenew(i, j, k, l, m) - ((temperatureold(i, j, k, l, m) - @@ -266,9 +278,9 @@ void Temparray::calcTemp(){ // std::cerr << temperaturenew(2, 2, 2, 1, 2) << std::endl; // std::cerr << temperaturenew(2, 2, 2, 2, 2) << std::endl; // std::cerr << temperaturenew(2, 2, 2, 3, 2) << "\n" << std::endl; - std::cerr << temperatureold(2, 2, 2, 1, 2) << std::endl; - std::cerr << temperatureold(2, 2, 2, 2, 2) << std::endl; - std::cerr << temperatureold(2, 2, 2, 3, 2) << "\n" << std::endl; + std::cerr << " " << temperatureold(2, 2, 2, 1, 2) << std::endl; + std::cerr << temperatureold(2, 2, 2, 2, 1) << " " << temperatureold(2, 2, 2, 2, 2) << " " << temperatureold(2, 2, 2, 2, 3) << std::endl; + std::cerr << " " << temperatureold(2, 2, 2, 3, 2) << "\n" << std::endl; } std::list<Triangle> Temparray::getTriangles(){ |