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

Method addNodalLoad

DEVELOPER/core/Domain.cpp:865–897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865bool
866Domain::addNodalLoad(NodalLoad *load, int pattern)
867{
868 int nodTag = load->getNodeTag();
869 Node *res = this->getNode(nodTag);
870 if (res == 0) {
871 opserr << "Domain::addNodalLoad() HI - no node with tag " << nodTag <<
872 "exits in the model, not adding the nodal load" << *load << endln;
873 return false;
874 }
875
876 // now add it to the pattern
877 TaggedObject *thePattern = theLoadPatterns->getComponentPtr(pattern);
878 if (thePattern == 0) {
879 opserr << "Domain::addNodalLoad() - no pattern with tag" <<
880 pattern << "in the model, not adding the nodal load" << *load << endln;
881
882 return false;
883 }
884 LoadPattern *theLoadPattern = (LoadPattern *)thePattern;
885 bool result = theLoadPattern->addNodalLoad(load);
886 if (result == false) {
887 opserr << "Domain::addNodalLoad() - pattern with tag" <<
888 pattern << "could not add the load" << *load << endln;
889
890 return false;
891 }
892
893 load->setDomain(this); // done in LoadPattern::addNodalLoad()
894 this->domainChange();
895
896 return result;
897}
898
899
900bool

Callers 3

mainFunction · 0.45
TclPlaneTruss_addNodalLdFunction · 0.45
mainFunction · 0.45

Calls 5

getNodeMethod · 0.95
domainChangeMethod · 0.95
getNodeTagMethod · 0.45
getComponentPtrMethod · 0.45
setDomainMethod · 0.45

Tested by

no test coverage detected