set up the transformation matrix for orientation
| 1117 | |
| 1118 | // set up the transformation matrix for orientation |
| 1119 | void TwoNodeLinkSection::setUp() |
| 1120 | { |
| 1121 | const Vector &end1Crd = theNodes[0]->getCrds(); |
| 1122 | const Vector &end2Crd = theNodes[1]->getCrds(); |
| 1123 | Vector xp(3); |
| 1124 | for (int i = 0; i < numDIM; i++) |
| 1125 | xp(i) = end2Crd(i) - end1Crd(i); |
| 1126 | L = xp.Norm(); |
| 1127 | xp /= L; |
| 1128 | |
| 1129 | x /= x.Norm(); |
| 1130 | |
| 1131 | if (numDIM == 1) { |
| 1132 | x(0) = 1; y(0) = 0; |
| 1133 | x(1) = 0; y(1) = 1; |
| 1134 | x(2) = 0; y(2) = 0; |
| 1135 | } |
| 1136 | if (numDIM == 2) { |
| 1137 | if (L > DBL_EPSILON) { |
| 1138 | if (x != xp) { |
| 1139 | opserr << "WARNING TwoNodeLinkSection::setUp() - " |
| 1140 | << "element: " << this->getTag() << endln |
| 1141 | << "ignoring nodes and using specified " |
| 1142 | << "local x vector to determine orientation\n"; |
| 1143 | opserr << "input x: " << x; |
| 1144 | opserr << "x from nodes: " << xp; |
| 1145 | } |
| 1146 | } |
| 1147 | else { |
| 1148 | |
| 1149 | } |
| 1150 | y(0) = -x(1); |
| 1151 | y(1) = x(0); |
| 1152 | y(2) = 0; |
| 1153 | } |
| 1154 | if (numDIM == 3) { |
| 1155 | if (L > DBL_EPSILON) { |
| 1156 | if (x != xp) { |
| 1157 | opserr << "WARNING TwoNodeLinkSection::setUp() - " |
| 1158 | << "element: " << this->getTag() << endln |
| 1159 | << "ignoring nodes and using specified " |
| 1160 | << "local x vector to determine orientation\n"; |
| 1161 | } |
| 1162 | } |
| 1163 | else { |
| 1164 | |
| 1165 | } |
| 1166 | } |
| 1167 | |
| 1168 | /* |
| 1169 | // setup x and y orientation vectors |
| 1170 | if (L > DBL_EPSILON) { |
| 1171 | if (x.Size() == 0) { |
| 1172 | x.resize(3); |
| 1173 | x.Zero(); |
| 1174 | x(0) = xp(0); |
| 1175 | if (xp.Size() > 1) |
| 1176 | x(1) = xp(1); |