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

Method setTrialVel

DEVELOPER/core/Node.cpp:852–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850}
851
852int
853Node::setTrialVel(const Vector &newTrialVel)
854{
855 // check vector arg is of correct size
856 if (newTrialVel.Size() != numberDOF) {
857 opserr << "WARNING Node::setTrialVel() - incompatable sizes\n";
858 return -2;
859 }
860
861 // construct memory and Vectors for trial and committed
862 // accel on first call to this method, getTrialVEl(),
863 // getVEl(), or incrTrialVel()
864 if (trialVel == 0) {
865 if (this->createVel() < 0) {
866 opserr << "FATAL Node::setTrialVel() - ran out of memory\n";
867 exit(-1);
868 }
869 }
870
871 // set the trial quantities
872 for (int i=0; i<numberDOF; i++)
873 vel[i] = newTrialVel(i);
874 return 0;
875}
876
877
878int

Callers 3

setPressureMethod · 0.45
setNodeVelMethod · 0.45
OPS_NodeFunction · 0.45

Calls 3

createVelMethod · 0.95
exitFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected