MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / recvMatrix

Method recvMatrix

SRC/actor/channel/FileChannel.cpp:239–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237
238}
239int FileChannel::recvMatrix(int dbTag, int commitTag,
240 Matrix &theMatrix,
241 ChannelAddress *theAddress)
242{
243 // if o.k. get a pointer to the data in the Matrix and
244 // place the incoming data there
245 int nleft, rows, cols;
246 rows = theMatrix.noRows();
247 cols = theMatrix.noCols();
248
249 double *data = new double[rows*cols];
250 void *gMsg = (void *)data;
251 nleft = rows*cols* sizeof(double);
252
253 if ( fread( gMsg, nleft, 1, theFile) != 1 ) {
254 printf("Error in FileChannel::recvMatrix, did not read\n");
255 delete []data;
256 return -1;
257 }
258
259 else {
260 theMatrix.setData(data, rows, cols);
261 return 0;
262 }
263}
264
265int FileChannel::sendVector(int dbTag, int commitTag,
266 const Vector &theVector, ChannelAddress *theAddress )

Callers

nothing calls this directly

Calls 3

noRowsMethod · 0.45
noColsMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected