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

Method recvVector

SRC/actor/channel/FileChannel.cpp:289–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289int FileChannel::recvVector(int dbTag, int commitTag,
290 Vector &theVector,
291 ChannelAddress *theAddress)
292{
293 int nleft, size;
294 size = theVector.Size();
295 double *data = new double[size];
296 void *gMsg = (void *)data;
297 nleft = theVector.Size() * sizeof(double);
298
299 if ( fread( gMsg, nleft, 1, theFile) != 1 ) {
300 printf("Error in FileChannel::recvVector, did not read\n");
301 delete [] data;
302 return -1;
303 }
304 else {
305 theVector.setData (data, size);
306 return 0;
307 }
308}
309
310int FileChannel::sendID(int dbTag, int commitTag, const ID &theID,ChannelAddress *theAddress)
311{

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected