constructors:
| 113 | |
| 114 | // constructors: |
| 115 | SimpleContact2D::SimpleContact2D(int tag, int Nd1, int Nd2, |
| 116 | int NdS, int NdL, NDMaterial &theMat, double tolG, double tolF ) |
| 117 | : Element(tag,ELE_TAG_SimpleContact2D), |
| 118 | externalNodes(SC_NUM_NODE), |
| 119 | tangentStiffness(SC_NUM_DOF, SC_NUM_DOF), |
| 120 | internalForces(SC_NUM_DOF), |
| 121 | n(SC_NUM_NDF), |
| 122 | T(SC_NUM_NDF), |
| 123 | Bn(SC_NUM_DDOF), |
| 124 | Bs(SC_NUM_DDOF), |
| 125 | dcrd1(SC_NUM_NDF), |
| 126 | dcrd2(SC_NUM_NDF), |
| 127 | dcrdS(SC_NUM_NDF), |
| 128 | dispL(SC_NUM_NDF) |
| 129 | { |
| 130 | #ifdef DEBUG |
| 131 | opserr << "SimpleContact2D::SimpleContact2D(...)" << endln; |
| 132 | #endif |
| 133 | externalNodes(0) = Nd1; |
| 134 | externalNodes(1) = Nd2; |
| 135 | externalNodes(2) = NdS; |
| 136 | externalNodes(3) = NdL; |
| 137 | |
| 138 | MyTag = tag; |
| 139 | |
| 140 | tolGap = tolG; |
| 141 | tolForce = tolF; |
| 142 | |
| 143 | inContact = true; |
| 144 | was_inContact = true; |
| 145 | should_be_released = false; |
| 146 | to_be_released = false; |
| 147 | in_bounds = false; |
| 148 | |
| 149 | gap = 0.0; |
| 150 | slip = 0.0; |
| 151 | lambda = 0.0; |
| 152 | |
| 153 | xsi_n = 0.0; // this is the state variable, not xsi_nplus1 |
| 154 | |
| 155 | theMaterial = 0; |
| 156 | NDMaterial *theMatCopy = theMat.getCopy("ContactMaterial2D"); |
| 157 | if (theMatCopy != 0) { |
| 158 | theMaterial = (ContactMaterial2D *)theMatCopy; |
| 159 | } else { |
| 160 | opserr << "SimpleContact2D::SimpleContact2D - material needs to be of type Contact2D for ele: " << this->getTag() << endln; |
| 161 | } |
| 162 | |
| 163 | if (theMaterial == 0) { |
| 164 | opserr << "SimpleContact2D::SimpleContact2D - failed allocate material model pointer\n"; |
| 165 | exit(-1); |
| 166 | } |
| 167 | #ifdef DEBUG |
| 168 | if (DEBUG_LEVEL > 1) { |
| 169 | opserr << " external nodes: " << externalNodes; |
| 170 | opserr << " T: " << T ; |
| 171 | opserr << " n: " << n ; |
| 172 | opserr << " Bn: " << Bn; |