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

Method addUnbalancedLoad

DEVELOPER/core/Node.cpp:1003–1029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003int
1004Node::addUnbalancedLoad(const Vector &add, double fact)
1005{
1006 // check vector arg is of correct size
1007 if (add.Size() != numberDOF) {
1008 opserr << "Node::addunbalLoad - load to add of incorrect size ";
1009 opserr << add.Size() << " should be " << numberDOF << endln;
1010 return -1;
1011 }
1012
1013 // if no load yet create it and assign
1014 if (unbalLoad == 0) {
1015 unbalLoad = new Vector(add);
1016 if (unbalLoad == 0) {
1017 opserr << "FATAL Node::addunbalLoad - ran out of memory\n";
1018 exit(-1);
1019 }
1020 if (fact != 1.0)
1021 (*unbalLoad) *= fact;
1022 return 0;
1023 }
1024
1025 // add fact*add to the unbalanced load
1026 unbalLoad->addVector(1.0, add,fact);
1027
1028 return 0;
1029}
1030
1031
1032

Callers 2

applyLoadMethod · 0.45
applyLoadSensitivityMethod · 0.45

Calls 3

exitFunction · 0.85
SizeMethod · 0.45
addVectorMethod · 0.45

Tested by

no test coverage detected