typical constructor
| 128 | |
| 129 | // typical constructor |
| 130 | Truss2D::Truss2D(int tag, |
| 131 | int Nd1, int Nd2, |
| 132 | UniaxialMaterial &theMat, |
| 133 | double a) |
| 134 | :Element(tag, 0), |
| 135 | externalNodes(2), |
| 136 | trans(1,4), L(0.0), A(a) |
| 137 | { |
| 138 | // get a copy of the material object for our own use |
| 139 | theMaterial = theMat.getCopy(); |
| 140 | if (theMaterial == 0) { |
| 141 | opserr << "FATAL Truss2D::Truss2D() - out of memory, could not get a copy of the Material\n"; |
| 142 | exit(-1); |
| 143 | } |
| 144 | |
| 145 | // fill in the ID containing external node info with node id's |
| 146 | if (externalNodes.Size() != 2) { |
| 147 | opserr << "FATAL Truss2D::Truss2D() - out of memory, could not create an ID of size 2\n"; |
| 148 | exit(-1); |
| 149 | } |
| 150 | |
| 151 | externalNodes(0) = Nd1; |
| 152 | externalNodes(1) = Nd2; |
| 153 | |
| 154 | theNodes[0] = 0; |
| 155 | theNodes[1] = 0; |
| 156 | } |
| 157 | |
| 158 | // constructor which should be invoked by an FE_ObjectBroker only |
| 159 | Truss2D::Truss2D() |