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

Method incrTrialVel

DEVELOPER/core/Node.cpp:938–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

936
937
938int
939Node::incrTrialVel(const Vector &incrVel)
940{
941 // check vector arg is of correct size
942 if (incrVel.Size() != numberDOF) {
943 opserr << "WARNING Node::incrTrialVel() - incompatable sizes\n";
944 return -2;
945 }
946
947 // create Vectors and array if none exist and set trial
948 if (trialVel == 0) {
949 if (this->createVel() < 0) {
950 opserr << "FATAL Node::incrTrialVel - ran out of memory\n";
951 exit(-1);
952 }
953 for (int i = 0; i<numberDOF; i++)
954 vel[i] = incrVel(i);
955
956 return 0;
957 }
958
959 // otherwise set trial = incr + trial
960 for (int i = 0; i<numberDOF; i++)
961 vel[i] += incrVel(i);
962
963 return 0;
964}
965
966
967int

Callers 1

incrNodeVelMethod · 0.45

Calls 3

createVelMethod · 0.95
exitFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected