| 850 | } |
| 851 | |
| 852 | int |
| 853 | Node::setTrialVel(const Vector &newTrialVel) |
| 854 | { |
| 855 | // check vector arg is of correct size |
| 856 | if (newTrialVel.Size() != numberDOF) { |
| 857 | opserr << "WARNING Node::setTrialVel() - incompatable sizes\n"; |
| 858 | return -2; |
| 859 | } |
| 860 | |
| 861 | // construct memory and Vectors for trial and committed |
| 862 | // accel on first call to this method, getTrialVEl(), |
| 863 | // getVEl(), or incrTrialVel() |
| 864 | if (trialVel == 0) { |
| 865 | if (this->createVel() < 0) { |
| 866 | opserr << "FATAL Node::setTrialVel() - ran out of memory\n"; |
| 867 | exit(-1); |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | // set the trial quantities |
| 872 | for (int i=0; i<numberDOF; i++) |
| 873 | vel[i] = newTrialVel(i); |
| 874 | return 0; |
| 875 | } |
| 876 | |
| 877 | |
| 878 | int |
no test coverage detected