| 731 | } |
| 732 | |
| 733 | bool |
| 734 | Domain::addLoadPattern(LoadPattern *load) |
| 735 | { |
| 736 | // first check if a load pattern with a similar tag exists in model |
| 737 | int tag = load->getTag(); |
| 738 | TaggedObject *other = theLoadPatterns->getComponentPtr(tag); |
| 739 | if (other != 0) { |
| 740 | opserr << "Domain::addLoadPattern - cannot add as LoadPattern with tag" << |
| 741 | tag << "already exists in model\n"; |
| 742 | |
| 743 | return false; |
| 744 | } |
| 745 | |
| 746 | // now we add the load pattern to the container for load pattrens |
| 747 | bool result = theLoadPatterns->addComponent(load); |
| 748 | if (result == true) { |
| 749 | load->setDomain(this); |
| 750 | this->domainChange(); |
| 751 | } |
| 752 | else |
| 753 | opserr << "Domain::addLoadPattern - cannot add LoadPattern with tag" << |
| 754 | tag << "to the container\n"; |
| 755 | |
| 756 | return result; |
| 757 | } |
| 758 | |
| 759 | bool |
| 760 | Domain::addParameter(Parameter *theParam) |
no test coverage detected