| 714 | |
| 715 | |
| 716 | int MixedBeamColumn3d::revertToStart() |
| 717 | { |
| 718 | int err; |
| 719 | int i,j,k; // for loops |
| 720 | i = 0; |
| 721 | |
| 722 | // revert the sections state to start |
| 723 | do { |
| 724 | err = sections[i++]->revertToStart(); |
| 725 | } while (err == 0 && i < numSections); |
| 726 | |
| 727 | if (err) |
| 728 | return err; |
| 729 | |
| 730 | // revert the transformation to start |
| 731 | if ((err = crdTransf->revertToStart()) != 0) |
| 732 | return err; |
| 733 | |
| 734 | // revert the element state to start |
| 735 | |
| 736 | // Set initial length |
| 737 | initialLength = crdTransf->getInitialLength(); |
| 738 | |
| 739 | // Get the numerical integration weights |
| 740 | double wt[MAX_NUM_SECTIONS]; // weights of sections or gauss points of integration points |
| 741 | beamIntegr->getSectionWeights(numSections, initialLength, wt); |
| 742 | |
| 743 | // Vector of zeros to use at initial natural displacements |
| 744 | Vector myZeros(NDM_NATURAL); |
| 745 | myZeros.Zero(); |
| 746 | |
| 747 | // Set initial shape functions |
| 748 | for ( i = 0; i < numSections; i++ ){ |
| 749 | nldhat[i] = this->getNld_hat(i, myZeros, initialLength, geomLinear); |
| 750 | nd1[i] = this->getNd1(i, myZeros, initialLength, geomLinear); |
| 751 | nd2[i] = this->getNd2(i, 0, initialLength); |
| 752 | |
| 753 | for( j = 0; j < NDM_SECTION; j++ ){ |
| 754 | for( k = 0; k < NDM_NATURAL; k++ ){ |
| 755 | nd1T[i](k,j) = nd1[i](j,k); |
| 756 | nd2T[i](k,j) = nd2[i](j,k); |
| 757 | } |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | // Set initial and committed section flexibility and GJ |
| 762 | Matrix ks(NDM_SECTION,NDM_SECTION); |
| 763 | double GJ; |
| 764 | for ( i = 0; i < numSections; i++ ){ |
| 765 | getSectionTangent(i,2,ks,GJ); |
| 766 | invertMatrix(NDM_SECTION,ks,sectionFlexibility[i]); |
| 767 | committedSectionFlexibility[i] = sectionFlexibility[i]; |
| 768 | } |
| 769 | |
| 770 | // Set initial and committed section forces and deformations |
| 771 | for ( i = 0; i < numSections; i++ ){ |
| 772 | sectionForceFibers[i].Zero(); |
| 773 | committedSectionForceFibers[i].Zero(); |
no test coverage detected