| 635 | |
| 636 | |
| 637 | int |
| 638 | Element::addResistingForceToNodalReaction(int flag) |
| 639 | { |
| 640 | int result = 0; |
| 641 | int numNodes = this->getNumExternalNodes(); |
| 642 | Node **theNodes = this->getNodePtrs(); |
| 643 | |
| 644 | static Vector theVector(48); |
| 645 | |
| 646 | // |
| 647 | // now determine the resisting force |
| 648 | // |
| 649 | |
| 650 | const Vector *theResistingForce =0; |
| 651 | if (flag == 0) |
| 652 | theResistingForce = &(this->getResistingForce()); |
| 653 | else if (flag == 1) { |
| 654 | theResistingForce = &(this->getResistingForceIncInertia()); |
| 655 | } |
| 656 | else if (flag == 2) |
| 657 | theResistingForce = &(this->getRayleighDampingForces()); |
| 658 | |
| 659 | |
| 660 | // |
| 661 | // iterate over the elements nodes; determine nodes contribution & add it |
| 662 | // |
| 663 | |
| 664 | int nodalDOFCount = 0; |
| 665 | |
| 666 | for (int i=0; i<numNodes; i++) { |
| 667 | Node *theNode = theNodes[i]; |
| 668 | |
| 669 | int numNodalDOF = theNode->getNumberDOF(); |
| 670 | theVector.resize(numNodalDOF); |
| 671 | |
| 672 | for (int j=0; j<numNodalDOF; j++) { |
| 673 | (theVector)(j) = (*theResistingForce)(nodalDOFCount); |
| 674 | nodalDOFCount++; |
| 675 | } |
| 676 | result +=theNode->addReactionForce(theVector, 1.0); |
| 677 | } |
| 678 | |
| 679 | return result; |
| 680 | } |
| 681 | |
| 682 | double Element::getCharacteristicLength(void) |
| 683 | { |
nothing calls this directly
no test coverage detected