| 154 | } |
| 155 | |
| 156 | int |
| 157 | AlgorithmIncrements::playback(int cTag) |
| 158 | { |
| 159 | |
| 160 | if (fileName != 0) { |
| 161 | |
| 162 | LinearSOE *theSOE = theAlgo->getLinearSOEptr(); |
| 163 | if (theSOE == 0) |
| 164 | return 0; |
| 165 | |
| 166 | Vector X(theSOE->getNumEqn()); |
| 167 | Vector B(theSOE->getNumEqn()); |
| 168 | |
| 169 | if (theFile) { |
| 170 | theFile.close(); |
| 171 | } |
| 172 | |
| 173 | ifstream aFile; |
| 174 | aFile.open(fileName, ios::in); |
| 175 | if (!aFile) { |
| 176 | opserr << "WARNING - AlgorithmIncrements::playback()"; |
| 177 | opserr << " - could not open file " << fileName << endln; |
| 178 | } |
| 179 | for (int i = 0; i<numRecord; i++) { |
| 180 | int ii; |
| 181 | for (ii=0; X.Size(); ii++) theFile << X(ii); |
| 182 | for (ii=0; X.Size(); ii++) theFile << B(ii); |
| 183 | |
| 184 | this->plotData(X,B); |
| 185 | // char c = getchar(); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | return 0; |
| 190 | } |
| 191 | |
| 192 | int |
| 193 | AlgorithmIncrements::restart(void) |