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

Method sendSelf

DEVELOPER/core/MP_Constraint.cpp:331–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331int
332MP_Constraint::sendSelf(int cTag, Channel &theChannel)
333{
334 static ID data(10);
335 int dataTag = this->getDbTag();
336
337 data(0) = this->getTag();
338 data(1) = nodeRetained;
339 data(2) = nodeConstrained;
340 if (constraint == 0) data(3) = 0; else data(3) = constraint->noRows();
341 if (constraint == 0) data(4) = 0; else data(4) = constraint->noCols();
342 if (constrDOF == 0) data(5) = 0; else data(5) = constrDOF->Size();
343 if (retainDOF == 0) data(6) = 0; else data(6) = retainDOF->Size();
344
345 // need two database tags for ID objects
346 if (constrDOF != 0 && dbTag1 == 0)
347 dbTag1 = theChannel.getDbTag();
348 if (retainDOF != 0 && dbTag2 == 0)
349 dbTag2 = theChannel.getDbTag();
350
351 data(7) = dbTag1;
352 data(8) = dbTag2;
353 data(9) = nextTag;
354
355 int result = theChannel.sendID(dataTag, cTag, data);
356 if (result < 0) {
357 opserr << "WARNING MP_Constraint::sendSelf - error sending ID data\n";
358 return result;
359 }
360
361 if (constraint != 0 && constraint->noRows() != 0) {
362 int result = theChannel.sendMatrix(dataTag, cTag, *constraint);
363 if (result < 0) {
364 opserr << "WARNING MP_Constraint::sendSelf ";
365 opserr << "- error sending Matrix data\n";
366 return result;
367 }
368 }
369
370 if (constrDOF != 0 && constrDOF->Size() != 0) {
371 int result = theChannel.sendID(dbTag1, cTag, *constrDOF);
372 if (result < 0) {
373 opserr << "WARNING MP_Constraint::sendSelf ";
374 opserr << "- error sending constrained data\n";
375 return result;
376 }
377 }
378
379 if (retainDOF != 0 && retainDOF->Size() != 0) {
380 int result = theChannel.sendID(dbTag2, cTag, *retainDOF);
381 if (result < 0) {
382 opserr << "WARNING MP_Constraint::sendSelf ";
383 opserr << "- error sending retained data\n";
384 return result;
385 }
386 }
387
388 return 0;

Callers

nothing calls this directly

Calls 7

getDbTagMethod · 0.45
getTagMethod · 0.45
noRowsMethod · 0.45
noColsMethod · 0.45
SizeMethod · 0.45
sendIDMethod · 0.45
sendMatrixMethod · 0.45

Tested by

no test coverage detected