|
From: <le...@us...> - 2007-01-21 19:37:16
|
Revision: 225
http://svn.sourceforge.net/qcell/?rev=225&view=rev
Author: lessm
Date: 2007-01-21 11:37:08 -0800 (Sun, 21 Jan 2007)
Log Message:
-----------
- 1D view updated
Modified Paths:
--------------
trunk/qcell/baseheaders/Calculator.h
trunk/qcell/baseheaders/LocalFunction.h
trunk/qcell/basesources/Calculator.cpp
trunk/qcell/basesources/LocalFunction.cpp
trunk/qcell/basesources/simulationwindow.cpp
Modified: trunk/qcell/baseheaders/Calculator.h
===================================================================
--- trunk/qcell/baseheaders/Calculator.h 2007-01-21 19:35:16 UTC (rev 224)
+++ trunk/qcell/baseheaders/Calculator.h 2007-01-21 19:37:08 UTC (rev 225)
@@ -33,12 +33,18 @@
BORDER borderType;
+ // kuska
+ int startX, startY, startZ, startT;
+ int storedCounter;
+
protected:
void clearTempData(void);
void copyData(void);
bool resizeTempDataBuffer(bool dataCopy=0, char *dataPointer=NULL);
void updateBorder(void);
-
+ // for kozka
+ void storeSetings(void);
+ //*************************************************
public:
Calculator();
@@ -49,14 +55,21 @@
int getTempDataSizeInByte(void);
+ // for kozka
void calculate(void);
+ bool isFreezed(void);
+ void resumeCalculation(void);
+ // ************************************************
Calculator & operator = (CalculationData &cData);
protected slots:
void setupSpace(void);
+
signals:
void calculated(QVector<int> coordinates, QVector<int> arguments, int result);
+
+ void freeze(Calculator *calculator, int index);
};
#endif
Modified: trunk/qcell/baseheaders/LocalFunction.h
===================================================================
--- trunk/qcell/baseheaders/LocalFunction.h 2007-01-21 19:35:16 UTC (rev 224)
+++ trunk/qcell/baseheaders/LocalFunction.h 2007-01-21 19:37:08 UTC (rev 225)
@@ -161,6 +161,7 @@
signals:
// signal emit when resolv used
void valueCalculate(QVector<int> args);
+ void unknownValue(int index);
};
#endif
Modified: trunk/qcell/basesources/Calculator.cpp
===================================================================
--- trunk/qcell/basesources/Calculator.cpp 2007-01-21 19:35:16 UTC (rev 224)
+++ trunk/qcell/basesources/Calculator.cpp 2007-01-21 19:37:08 UTC (rev 225)
@@ -110,6 +110,11 @@
}
+void Calculator::storeSetings(void)
+{
+
+}
+
Calculator::Calculator()
{
tempData = NULL;
@@ -122,6 +127,9 @@
borderType = Calculator::TORUS;
connect(this, SIGNAL(dataResized()), SLOT(setupSpace()));
+
+ startX = startY = startZ = startT = 0;
+ storedCounter = 0;
}
Calculator::~Calculator()
@@ -238,16 +246,16 @@
copyData();
- for(int t=0;t<st;++t)
+ for(int t=startT;t<st;++t)
{
coordinates[3] = t;
- for(int z=0;z<sz;++z)
+ for(int z=startZ;z<sz;++z)
{
coordinates[2] = z;
- for(int y=0;y<sy;++y)
+ for(int y=startY;y<sy;++y)
{
coordinates[1] = y;
- for(int x=0;x<sx;++x)
+ for(int x=startX;x<sx;++x)
{
coordinates[0] = x;
neighbourhood->resolveValues(tempData + (x - minBorder[0]) + ((y - minBorder[1]) * tempDataSize[0]) + (z - minBorder[2]) * (tempDataSize[0] * tempDataSize[1]) + (t - minBorder[3]) * (tempDataSize[0] * tempDataSize[1] * tempDataSize[2]) * dataSize);
@@ -266,7 +274,11 @@
*((double *)temp) = localfunction->resolve(neighbourhood->valuesToVector_d());
break;
}
-
+ if(*((int *)temp)<0)
+ {
+ //kuska
+ return;
+ }
emit calculated(coordinates, neighbourhood->valuesToVector_i(), (int)*temp);
memcpy(data + counter, temp, dataSize);
counter += dataSize;
@@ -277,6 +289,15 @@
}
+bool Calculator::isFreezed(void)
+{
+ return 0;
+}
+
+void Calculator::resumeCalculation(void)
+{
+}
+
Calculator & Calculator::operator = (CalculationData &cData)
{
if(cData.getDimension()!=getDimension() || cData.getSizeX() != getSizeX() || cData.getSizeY() != getSizeY() || cData.getSizeZ() != getSizeZ() || cData.getSizeT() != getSizeT())
Modified: trunk/qcell/basesources/LocalFunction.cpp
===================================================================
--- trunk/qcell/basesources/LocalFunction.cpp 2007-01-21 19:35:16 UTC (rev 224)
+++ trunk/qcell/basesources/LocalFunction.cpp 2007-01-21 19:37:08 UTC (rev 225)
@@ -584,6 +584,12 @@
break;
}
emit valueCalculate(args);
+
+ // for kuska
+ if(valueTable[index]<0)
+ emit unknownValue(index);
+ //***********************
+
return valueTable[index];
}
Modified: trunk/qcell/basesources/simulationwindow.cpp
===================================================================
--- trunk/qcell/basesources/simulationwindow.cpp 2007-01-21 19:35:16 UTC (rev 224)
+++ trunk/qcell/basesources/simulationwindow.cpp 2007-01-21 19:37:08 UTC (rev 225)
@@ -782,7 +782,9 @@
ui.tabWidget->setTabEnabled(1, 0);
ui.tabWidget->setTabEnabled(2, 0);
ui.tabWidget->setTabEnabled(3, 1);
- table1DUpdateRequest = 2;
+ //table1DUpdateRequest = 2;
+ update1DTable();
+ update1DTableMem();
maxTime = sqrt((float)(getStorage()->getSizeX() * getStorage()->getSizeX()));
//maxTime = getStorage()->getSizeX() + 1;
loclaViewMemory.resize(maxTime);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|