summaryrefslogtreecommitdiffstats
path: root/Temparray.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-01-18 17:51:32 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-01-18 17:51:32 +0100
commit4341087e249ca73bfc1799c9427add3a080186f1 (patch)
tree7bc562ebacbf27d2cc10c06c0101bbaf9c29aae6 /Temparray.h
parenta9312d80a44872fb627ccb8fdf8a743b04d512b6 (diff)
downloadc3d-4341087e249ca73bfc1799c9427add3a080186f1.tar
c3d-4341087e249ca73bfc1799c9427add3a080186f1.zip
zweiter Waermeaustausch...
Diffstat (limited to 'Temparray.h')
-rw-r--r--Temparray.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Temparray.h b/Temparray.h
index 04250c4..921de69 100644
--- a/Temparray.h
+++ b/Temparray.h
@@ -35,10 +35,15 @@ class Temparray
int sx, sy, sz;
float averagetemp;
-
Cubehole& cubehole(int x, int y, int z, int line) {
return cubearray[x*sy*sz*6 + y*sz*6 + z*6 + line];
}
+ void mergetemperature(){
+ for(int i=0; i<sx; i++){
+ for(int j=0; j<sy; j++){
+ for(int k=0; k<sz; k++){
+ for(int l=0; l<6; l++){
+ for(int m=0; m<4; m++){temperatureold(i, j, k, l, m)=temperaturenew(i, j, k, l, m);}}}}}}
void tempInit(float temp0, int x0, int y0, int z0){
for(int i=0; i<x0; i++){
for(int j=0; j<y0; j++){
@@ -53,6 +58,7 @@ class Temparray
}
}
temperatureold(2, 2, 2, 2, 2) = 90;
+ temperaturenew(2, 2, 2, 2, 2) = 90;
}
/* void calcAverage(){
float tempcache = 0;