| 189 | } |
| 190 | |
| 191 | int |
| 192 | BFGS::setConvergenceTest(ConvergenceTest *newTest) |
| 193 | { |
| 194 | this->EquiSolnAlgo::setConvergenceTest(newTest); |
| 195 | |
| 196 | if (theTest == 0) |
| 197 | return 0; |
| 198 | |
| 199 | if ( localTest != 0 ) |
| 200 | delete localTest; |
| 201 | |
| 202 | localTest = theTest->getCopy( this->numberLoops ); |
| 203 | if (localTest == 0) { |
| 204 | opserr << "BFGS::setConvergenceTest() - could not get copy for local test\n"; |
| 205 | return -1; |
| 206 | } else |
| 207 | return 0; |
| 208 | } |
| 209 | |
| 210 | |
| 211 |