| 788 | |
| 789 | |
| 790 | int |
| 791 | Node::setTrialDisp(double value, int dof) |
| 792 | { |
| 793 | // check vector arg is of correct size |
| 794 | if (dof < 0 || dof >= numberDOF) { |
| 795 | opserr << "WARNING Node::setTrialDisp() - incompatable sizes\n"; |
| 796 | opserr << "node: " << this->getTag() << endln; |
| 797 | return -2; |
| 798 | } |
| 799 | |
| 800 | // construct memory and Vectors for trial and committed |
| 801 | // accel on first call to this method, getTrialDisp(), |
| 802 | // getDisp(), or incrTrialDisp() |
| 803 | if (trialDisp == 0) { |
| 804 | if (this->createDisp() < 0) { |
| 805 | opserr << "FATAL Node::setTrialDisp() - ran out of memory\n"; |
| 806 | exit(-1); |
| 807 | } |
| 808 | } |
| 809 | |
| 810 | // perform the assignment .. we dont't go through Vector interface |
| 811 | // as we are sure of size and this way is quicker |
| 812 | double tDisp = value; |
| 813 | disp[dof+2*numberDOF] = tDisp - disp[dof+numberDOF]; |
| 814 | disp[dof+3*numberDOF] = tDisp - disp[dof]; |
| 815 | disp[dof] = tDisp; |
| 816 | |
| 817 | return 0; |
| 818 | } |
| 819 | |
| 820 | int |
| 821 | Node::setTrialDisp(const Vector &newTrialDisp) |
no test coverage detected