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

Method addMP_Constraint

DEVELOPER/core/Domain.cpp:688–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686//
687
688bool
689Domain::addMP_Constraint(MP_Constraint *mpConstraint)
690{
691//#ifdef _G3DEBUG
692 // perform the checks
693 int nodeConstrained = mpConstraint->getNodeConstrained();
694 Node *nodePtr = this->getNode(nodeConstrained);
695 if (nodePtr == 0) {
696 opserr << "Domain::addMP_Constraint -cannot add as constrained node with tag" <<
697 nodeConstrained << "does not exist in model\n";
698 return false;
699 }
700
701 int nodeRetained = mpConstraint->getNodeRetained();
702 nodePtr = this->getNode(nodeRetained);
703 if (nodePtr == 0) {
704 opserr << "Domain::addMP_Constraint - cannot add as retained node with tag" <<
705 nodeRetained << "does not exist in model\n";
706
707 return false;
708 }
709 // MISSING CODE
710 //#endif
711
712 // check that no other object with similar tag exists in model
713 int tag = mpConstraint->getTag();
714 TaggedObject *other = theMPs->getComponentPtr(tag);
715 if (other != 0) {
716 opserr << "Domain::addMP_Constraint - cannot add as constraint with tag" <<
717 tag << "already exists in model";
718
719 return false;
720 }
721
722 bool result = theMPs->addComponent(mpConstraint);
723 if (result == true) {
724 mpConstraint->setDomain(this);
725 this->domainChange();
726 } else
727 opserr << "Domain::addMP_Constraint - cannot add constraint with tag" <<
728 tag << "to the container\n";
729
730 return result;
731}
732
733bool
734Domain::addLoadPattern(LoadPattern *load)

Callers 3

recvSelfMethod · 0.95
OPS_EqualDOFFunction · 0.45
OPS_EqualDOF_MixedFunction · 0.45

Calls 8

getNodeMethod · 0.95
domainChangeMethod · 0.95
getNodeConstrainedMethod · 0.45
getNodeRetainedMethod · 0.45
getTagMethod · 0.45
getComponentPtrMethod · 0.45
addComponentMethod · 0.45
setDomainMethod · 0.45

Tested by

no test coverage detected