| 889 | } |
| 890 | |
| 891 | int MixedBeamColumn3d::update() { |
| 892 | |
| 893 | // If things haven't be initialized, then do so |
| 894 | if (initialFlag == 0) { |
| 895 | this->revertToStart(); |
| 896 | } |
| 897 | |
| 898 | int i,j,k; // integers for loops |
| 899 | |
| 900 | // Update iteration counter |
| 901 | // says how many times update has been called since the last commit state |
| 902 | itr++; |
| 903 | |
| 904 | // Update Coordinate Transformation |
| 905 | crdTransf->update(); |
| 906 | |
| 907 | // Current Length |
| 908 | double currentLength; |
| 909 | if (geomLinear) { |
| 910 | currentLength = initialLength; |
| 911 | } else { |
| 912 | currentLength = crdTransf->getDeformedLength(); |
| 913 | } |
| 914 | |
| 915 | // Compute the natural displacements |
| 916 | Vector naturalDispWithTorsion = crdTransf->getBasicTrialDisp(); |
| 917 | naturalDispWithTorsion = transformNaturalCoords*naturalDispWithTorsion; |
| 918 | // convert to the arrangement of natural deformations that the element likes |
| 919 | |
| 920 | Vector naturalDisp(NDM_NATURAL); |
| 921 | for ( i = 0; i < NDM_NATURAL; i++ ) { |
| 922 | naturalDisp(i) = naturalDispWithTorsion(i); //all but the torsional component |
| 923 | } |
| 924 | double twist = naturalDispWithTorsion(5); |
| 925 | |
| 926 | Vector naturalIncrDeltaDisp(NDM_NATURAL); |
| 927 | naturalIncrDeltaDisp = naturalDisp - lastNaturalDisp; |
| 928 | lastNaturalDisp = naturalDisp; |
| 929 | |
| 930 | // Get the numerical integration weights |
| 931 | double wt[MAX_NUM_SECTIONS]; // weights of sections or gauss points of integration points |
| 932 | beamIntegr->getSectionWeights(numSections, initialLength, wt); |
| 933 | |
| 934 | // Define Variables |
| 935 | double GJ; |
| 936 | double torsionalForce; |
| 937 | for ( i = 0; i < numSections; i++ ) { |
| 938 | sectionForceShapeFcn[i] = Vector(NDM_SECTION); |
| 939 | } |
| 940 | |
| 941 | // Compute shape functions and their transposes |
| 942 | for ( i = 0; i < numSections; i++ ){ |
| 943 | // Shape Functions |
| 944 | nldhat[i] = this->getNld_hat(i, naturalDisp, currentLength, geomLinear); |
| 945 | sectionDefShapeFcn[i] = this->getd_hat(i, naturalDisp, currentLength, geomLinear); |
| 946 | nd1[i] = this->getNd1(i, naturalDisp, currentLength, geomLinear); |
| 947 | if (geomLinear) { |
| 948 | nd2[i].Zero(); |
no test coverage detected