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

Method setTrialDisp

SRC/domain/node/Node.cpp:719–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719int
720Node::setTrialDisp(double value, int dof)
721{
722 // check vector arg is of correct size
723 if (dof < 0 || dof >= numberDOF) {
724 opserr << "WARNING Node::setTrialDisp() - incompatible sizes\n";
725 opserr << "node: " << this->getTag() << endln;
726 return -2;
727 }
728
729 // construct memory and Vectors for trial and committed
730 // accel on first call to this method, getTrialDisp(),
731 // getDisp(), or incrTrialDisp()
732 if (trialDisp == 0) {
733 if (this->createDisp() < 0) {
734 opserr << "FATAL Node::setTrialDisp() - ran out of memory\n";
735 exit(-1);
736 }
737 }
738
739 // perform the assignment .. we don't go through Vector interface
740 // as we are sure of size and this way is quicker
741 double tDisp = value;
742 disp[dof+2*numberDOF] = tDisp - disp[dof+numberDOF];
743 disp[dof+3*numberDOF] = tDisp - disp[dof];
744 disp[dof] = tDisp;
745
746 return 0;
747}
748
749int
750Node::setTrialDisp(const Vector &newTrialDisp)

Callers 15

updateNodeMethod · 0.45
identifyMethod · 0.45
tryFixMethod · 0.45
commitStateMethod · 0.45
setDomainMethod · 0.45
MP_Joint3D.cppFile · 0.45
MP_Joint2D.cppFile · 0.45
updateMethod · 0.45
OPS_setNodeDispFunction · 0.45
TclCommand_addNodeFunction · 0.45
OPS_NodeFunction · 0.45
solveModeMethod · 0.45

Calls 4

createDispMethod · 0.95
exitFunction · 0.85
getTagMethod · 0.45
SizeMethod · 0.45

Tested by 2

solveModeMethod · 0.36
solveModeMethod · 0.36