| 103 | } |
| 104 | |
| 105 | int DRMLoadPatternWrapper::sendSelf(int commitTag, Channel& theChannel) |
| 106 | { |
| 107 | int dbTag = this->getDbTag(); |
| 108 | |
| 109 | static ID i_Data(22); |
| 110 | |
| 111 | i_Data(0) = this->getTag(); |
| 112 | i_Data(1) = this->fileData_size; |
| 113 | for (int i=0; i<this->fileData_size; i++) |
| 114 | i_Data(2+i) = file_data[i]; |
| 115 | i_Data(17) = this->files; |
| 116 | i_Data(18) = this->num_steps; |
| 117 | i_Data(19) = this->nd1; |
| 118 | i_Data(20) = this->nd2; |
| 119 | i_Data(21) = this->steps_to_cache; |
| 120 | |
| 121 | if ( theChannel.sendID(dbTag, commitTag, i_Data) < 0 ) { |
| 122 | opserr << "DRMLoadPatternWrapper::sendSelf L.121 failed to sendID \n"; |
| 123 | return -1; |
| 124 | } |
| 125 | |
| 126 | static Vector d_Data(11); |
| 127 | |
| 128 | d_Data(0) = this->dt; |
| 129 | for (int i=0; i<6; i++) |
| 130 | d_Data(1+i) = this->drm_box_crds[i]; |
| 131 | for (int i=0; i<3; i++) |
| 132 | d_Data(7+i) = this->eleD[i]; |
| 133 | d_Data(10) = this->factor; |
| 134 | |
| 135 | if ( theChannel.sendVector(dbTag, commitTag, d_Data) < 0 ) { |
| 136 | opserr << "DRMLoadPatternWrapper::sendSelf L.135 failed to sendVector \n"; |
| 137 | return -1; |
| 138 | } |
| 139 | |
| 140 | static ID c_Data_sz(this->files+1); |
| 141 | // int pos =0; |
| 142 | std::string final_str; |
| 143 | for (int i=0; i<this->files; i++) { |
| 144 | char* tmp = this->infiles[i]; |
| 145 | std::string str(tmp); |
| 146 | int sz = str.size(); |
| 147 | c_Data_sz(i) = sz; |
| 148 | final_str.append(str); |
| 149 | } |
| 150 | |
| 151 | int ssz = final_str.size()+1; |
| 152 | c_Data_sz(this->files) = ssz; |
| 153 | |
| 154 | Message c_Data(((char*) final_str.c_str()), ssz); |
| 155 | |
| 156 | if ( theChannel.sendID(dbTag, commitTag, c_Data_sz) < 0) { |
| 157 | opserr << "DRMLoadPatternWrapper::sendSelf L.156 failed to sendID2 \n"; |
| 158 | return -1; |
| 159 | } |
| 160 | |
| 161 | if (theChannel.sendMsg(dbTag, commitTag, c_Data) ) { |
| 162 | opserr << "DRMLoadPatternWrapper::sendSelf L.161 failed to sendMsg \n"; |