summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-01-18 18:41:08 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-01-18 18:41:08 +0100
commit589b97493ab9d9e59e847e667d82694e4fc497e9 (patch)
tree25a7ec2dbbe71cd715222da3435206bba4a4bc49
parent4341087e249ca73bfc1799c9427add3a080186f1 (diff)
downloadc3d-589b97493ab9d9e59e847e667d82694e4fc497e9.tar
c3d-589b97493ab9d9e59e847e667d82694e4fc497e9.zip
kl aenderung
-rw-r--r--Temparray.cpp26
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(){