| 686 | // |
| 687 | |
| 688 | bool |
| 689 | Domain::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 | |
| 733 | bool |
| 734 | Domain::addLoadPattern(LoadPattern *load) |
no test coverage detected