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

Method addLoadPattern

SRC/domain/domain/Domain.cpp:831–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831bool
832Domain::addLoadPattern(LoadPattern *load)
833{
834 // first check if a load pattern with a similar tag exists in model
835 int tag = load->getTag();
836 TaggedObject *other = theLoadPatterns->getComponentPtr(tag);
837 if (other != 0) {
838 opserr << "Domain::addLoadPattern - cannot add as LoadPattern with tag" <<
839 tag << " already exists in model\n";
840
841 return false;
842 }
843
844 int numSPs = 0;
845 SP_Constraint *theSP_Constraint;
846 SP_ConstraintIter &theSP_Constraints = load->getSPs();
847 while ((theSP_Constraint = theSP_Constraints()) != 0)
848 numSPs++;
849
850 // now we add the load pattern to the container for load patterns
851 bool result = theLoadPatterns->addComponent(load);
852 if (result == true) {
853 load->setDomain(this);
854 if (numSPs > 0)
855 this->domainChange();
856 }
857 else
858 opserr << "Domain::addLoadPattern - cannot add LoadPattern with tag" <<
859 tag << "to the container\n";
860
861 return result;
862}
863
864bool
865Domain::addParameter(Parameter *theParam)

Callers 11

recvSelfMethod · 0.95
ops_addPatternFunction · 0.45
OPS_PatternFunction · 0.45
buildFE_ModelMethod · 0.45
TclPatternCommandFunction · 0.45
TclPatternCommandFunction · 0.45
partitionMethod · 0.45
TclCommand_addPatternFunction · 0.45
pattern.cppFile · 0.45
TclPatternCommandFunction · 0.45

Calls 5

domainChangeMethod · 0.95
getTagMethod · 0.45
getComponentPtrMethod · 0.45
addComponentMethod · 0.45
setDomainMethod · 0.45

Tested by

no test coverage detected