| 689 | |
| 690 | |
| 691 | int MixedBeamColumn2d::revertToStart() { |
| 692 | int err; |
| 693 | int i,j,k; // for loops |
| 694 | i = 0; |
| 695 | |
| 696 | // revert the sections state to start |
| 697 | do { |
| 698 | err = sections[i++]->revertToStart(); |
| 699 | |
| 700 | }while (err == 0 && i < numSections); |
| 701 | |
| 702 | if (err) |
| 703 | return err; |
| 704 | |
| 705 | // revert the transformation to start |
| 706 | if ((err = crdTransf->revertToStart()) != 0) |
| 707 | return err; |
| 708 | |
| 709 | // revert the element state to start |
| 710 | |
| 711 | // Set initial length |
| 712 | initialLength = crdTransf->getInitialLength(); |
| 713 | |
| 714 | // Get the numerical integration weights |
| 715 | double wt[MAX_NUM_SECTIONS]; // weights of sections or gauss points of integration points |
| 716 | beamIntegr->getSectionWeights(numSections, initialLength, wt); |
| 717 | |
| 718 | // Vector of zeros to use at initial natural displacements |
| 719 | theNaturalVector.Zero(); |
| 720 | |
| 721 | // Set initial shape functions |
| 722 | for ( i = 0; i < numSections; i++ ){ |
| 723 | nldhat[i] = this->getNld_hat(i, theNaturalVector, initialLength, geomLinear); |
| 724 | nd1[i] = this->getNd1(i, theNaturalVector, initialLength, geomLinear); |
| 725 | nd2[i] = this->getNd2(i, 0, initialLength); |
| 726 | |
| 727 | for( j = 0; j < NDM_SECTION; j++ ){ |
| 728 | for( k = 0; k < NDM_NATURAL; k++ ){ |
| 729 | nd1T[i](k,j) = nd1[i](j,k); |
| 730 | nd2T[i](k,j) = nd2[i](j,k); |
| 731 | } |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | // Set initial and committed section flexibility and GJ |
| 736 | for ( i = 0; i < numSections; i++ ){ |
| 737 | getSectionTangent(i,2,ks); |
| 738 | invertMatrix(NDM_SECTION,ks,sectionFlexibility[i]); |
| 739 | committedSectionFlexibility[i] = sectionFlexibility[i]; |
| 740 | } |
| 741 | |
| 742 | // Set initial and committed section forces and deformations |
| 743 | for ( i = 0; i < numSections; i++ ){ |
| 744 | sectionForceFibers[i].Zero(); |
| 745 | committedSectionForceFibers[i].Zero(); |
| 746 | sectionDefFibers[i].Zero(); |
| 747 | committedSectionDefFibers[i].Zero(); |
| 748 | } |
no test coverage detected