| 779 | } |
| 780 | |
| 781 | int |
| 782 | Node::setTrialVel(const Vector &newTrialVel) |
| 783 | { |
| 784 | // check vector arg is of correct size |
| 785 | if (newTrialVel.Size() != numberDOF) { |
| 786 | opserr << "WARNING Node::setTrialVel() - incompatible sizes\n"; |
| 787 | return -2; |
| 788 | } |
| 789 | |
| 790 | // construct memory and Vectors for trial and committed |
| 791 | // accel on first call to this method, getTrialVEl(), |
| 792 | // getVEl(), or incrTrialVel() |
| 793 | if (trialVel == 0) { |
| 794 | if (this->createVel() < 0) { |
| 795 | opserr << "FATAL Node::setTrialVel() - ran out of memory\n"; |
| 796 | exit(-1); |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | // set the trial quantities |
| 801 | for (int i=0; i<numberDOF; i++) |
| 802 | vel[i] = newTrialVel(i); |
| 803 | return 0; |
| 804 | } |
| 805 | |
| 806 | |
| 807 | int |
no test coverage detected