| 936 | |
| 937 | |
| 938 | int |
| 939 | Node::incrTrialVel(const Vector &incrVel) |
| 940 | { |
| 941 | // check vector arg is of correct size |
| 942 | if (incrVel.Size() != numberDOF) { |
| 943 | opserr << "WARNING Node::incrTrialVel() - incompatable sizes\n"; |
| 944 | return -2; |
| 945 | } |
| 946 | |
| 947 | // create Vectors and array if none exist and set trial |
| 948 | if (trialVel == 0) { |
| 949 | if (this->createVel() < 0) { |
| 950 | opserr << "FATAL Node::incrTrialVel - ran out of memory\n"; |
| 951 | exit(-1); |
| 952 | } |
| 953 | for (int i = 0; i<numberDOF; i++) |
| 954 | vel[i] = incrVel(i); |
| 955 | |
| 956 | return 0; |
| 957 | } |
| 958 | |
| 959 | // otherwise set trial = incr + trial |
| 960 | for (int i = 0; i<numberDOF; i++) |
| 961 | vel[i] += incrVel(i); |
| 962 | |
| 963 | return 0; |
| 964 | } |
| 965 | |
| 966 | |
| 967 | int |
no test coverage detected