| 115 | } |
| 116 | |
| 117 | int |
| 118 | AlgorithmIncrements::record(int cTag, double timeStamp) |
| 119 | { |
| 120 | LinearSOE *theSOE = theAlgo->getLinearSOEptr(); |
| 121 | if (theSOE == 0) |
| 122 | return 0; |
| 123 | |
| 124 | |
| 125 | const Vector &B = theSOE->getB(); |
| 126 | const Vector &X = theSOE->getX(); |
| 127 | |
| 128 | if (fileName != 0) { |
| 129 | if (cTag == 0) { |
| 130 | |
| 131 | if (theFile) |
| 132 | theFile.close(); |
| 133 | |
| 134 | numRecord = 0; |
| 135 | |
| 136 | theFile.open(fileName, ios::out); |
| 137 | if (!theFile) { |
| 138 | opserr << "WARNING - AlgorithmIncrements::record()"; |
| 139 | opserr << " - could not open file " << fileName << endln; |
| 140 | } |
| 141 | } |
| 142 | if (theFile) { |
| 143 | numRecord ++; |
| 144 | int i; |
| 145 | for (i=0; X.Size(); i++) theFile << X(i); |
| 146 | for (i=0; X.Size(); i++) theFile << B(i); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | if (displayRecord == true) |
| 151 | return this->plotData(X, B); |
| 152 | |
| 153 | return 0; |
| 154 | } |
| 155 | |
| 156 | int |
| 157 | AlgorithmIncrements::playback(int cTag) |